WPSEO_Post_Type::has_archive()
Checks if the current post type has an archive.
Context: The has_archive value can be a string or a boolean. In most case it will be a boolean, but it can be defined as a string. When it is a string the archive_slug will be overwritten to define another endpoint.
Метод класса: WPSEO_Post_Type{}
Хуков нет.
Возвращает
true|false
. True whether the post type has an archive.
Использование
$result = WPSEO_Post_Type::has_archive( $post_type );
- $post_type(WP_Post_Type) (обязательный)
- The post type object.
Код WPSEO_Post_Type::has_archive() WPSEO Post Type::has archive Yoast 24.9
public static function has_archive( $post_type ) { return YoastSEO()->helpers->post_type->has_archive( $post_type ); }