クラス WP_Query::is_author()
2014/12/16
定義ファイル :/blog/wp-includes/query.php 8
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | public function is_author( $author = '' ) { if ( !$this->is_author ) return false; if ( empty($author) ) return true; $author_obj = $this->get_queried_object(); $author = (array) $author; if ( in_array( $author_obj->ID, $author ) ) return true; elseif ( in_array( $author_obj->nickname, $author ) ) return true; elseif ( in_array( $author_obj->user_nicename, $author ) ) return true; return false; } |