Skip to content

Commit

Permalink
term_metadata_exists関数の作成
Browse files Browse the repository at this point in the history
  • Loading branch information
yhira committed Aug 11, 2019
1 parent 84710cb commit 3454076
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/utils.php
Expand Up @@ -2971,10 +2971,20 @@ function fix_blogcard_content($the_content){
endif;

//コメントが許可されているか
if ( !function_exists( 'is_comment_open' ) ):
function is_comment_open(){
global $post;
if ( isset($post->comment_status) ) {
return $post->comment_status == 'open';
}
return false;
}
endif;


//タームのメタデーターが存在しているか
if ( !function_exists( 'term_metadata_exists' ) ):
function term_metadata_exists($term_id, $meta_key){
return metadata_exists('term', $term_id, $meta_key);
}
endif;

0 comments on commit 3454076

Please sign in to comment.