Skip to content

Commit

Permalink
Merge pull request #6 from vektor-inc/fix/cope-with-terms-error
Browse files Browse the repository at this point in the history
0.6.6 / 存在しないタクソノミーを指定された時に Fatar Error にならないように修正
  • Loading branch information
kurudrive authored Aug 28, 2023
2 parents ef6d835 + f92ea48 commit c2abd28
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/VkTermColor.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @package vektor-inc/vk-term-color
* @license GPL-2.0+
*
* @version 0.6.5
* @version 0.6.6
*/

namespace VektorInc\VK_Term_Color;
Expand Down Expand Up @@ -453,10 +453,10 @@ public static function get_post_terms_html( $post = '', $args = array() ) {
}

$terms = get_the_terms( $post->ID, $taxonomy );
if ( ! $terms ) {
if ( is_wp_error( $terms ) || ! $terms) {
return;
}

$outer_class = '';
if ( ! empty( $args['outer_class'] ) ) {
$outer_class = ' class="' . $args['outer_class'] . '"';
Expand Down

0 comments on commit c2abd28

Please sign in to comment.