Yoast\WP\SEO\Repositories
Indexable_Repository::get_most_recent_about_page
Returns the most recently modified about page based on schema_page_type.
Метод класса: Indexable_Repository{}
Хуков нет.
Возвращает
Indexable|false. The about page if its there.
Использование
$Indexable_Repository = new Indexable_Repository(); $Indexable_Repository->get_most_recent_about_page( $post_type );
- $post_type(строка) (обязательный)
- The post type.
Код Indexable_Repository::get_most_recent_about_page() Indexable Repository::get most recent about page Yoast 28.9
public function get_most_recent_about_page( $post_type ) {
$query = $this->query()
->where( 'object_type', 'post' )
->where( 'object_sub_type', $post_type )
->where( 'schema_page_type', 'AboutPage' )
->where_raw( '( is_public IS NULL OR is_public = 1 )' )
->order_by_desc( 'object_last_modified' );
return $query->find_one();
}