クラス WP_Query::is_post_type_archive()
2014/12/16
WP_Query::is_post_type_archive()
定義ファイル :/blog/wp-includes/query.php 8
1 2 3 4 5 6 7 8 9 10 11 | public function is_post_type_archive( $post_types = '' ) { if ( empty( $post_types ) || ! $this->is_post_type_archive ) return (bool) $this->is_post_type_archive; $post_type = $this->get( 'post_type' ); if ( is_array( $post_type ) ) $post_type = reset( $post_type ); $post_type_object = get_post_type_object( $post_type ); return in_array( $post_type_object->name, (array) $post_types ); } |