WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

Yoast\WP\SEO\Repositories

Indexable_Repository::for_current_page() public Yoast 1.0

Attempts to find the indexable for the current WordPress page. Returns false if no indexable could be found. This may be the result of the indexable not existing or of being unable to determine what type of page the current page is.

Ищем WP-разработчика! Фулл-тайм, удаленка, хорошая зарплата, соц. пакет. Подробности.
Компания Boosta.

{} Это метод класса: Indexable_Repository{}

Хуков нет.

Возвращает

true|false|Indexable. The indexable, false if none could be found.

Использование

$Indexable_Repository = new Indexable_Repository();
$Indexable_Repository->for_current_page();

Код Indexable_Repository::for_current_page() Yoast 17.6

public function for_current_page() {
	$indexable = false;

	switch ( true ) {
		case $this->current_page->is_simple_page():
			$indexable = $this->find_by_id_and_type( $this->current_page->get_simple_page_id(), 'post' );
			break;
		case $this->current_page->is_home_static_page():
			$indexable = $this->find_by_id_and_type( $this->current_page->get_front_page_id(), 'post' );
			break;
		case $this->current_page->is_home_posts_page():
			$indexable = $this->find_for_home_page();
			break;
		case $this->current_page->is_term_archive():
			$indexable = $this->find_by_id_and_type( $this->current_page->get_term_id(), 'term' );
			break;
		case $this->current_page->is_date_archive():
			$indexable = $this->find_for_date_archive();
			break;
		case $this->current_page->is_search_result():
			$indexable = $this->find_for_system_page( 'search-result' );
			break;
		case $this->current_page->is_post_type_archive():
			$indexable = $this->find_for_post_type_archive( $this->current_page->get_queried_post_type() );
			break;
		case $this->current_page->is_author_archive():
			$indexable = $this->find_by_id_and_type( $this->current_page->get_author_id(), 'user' );
			break;
		case $this->current_page->is_404():
			$indexable = $this->find_for_system_page( '404' );
			break;
	}

	if ( $indexable === false ) {
		return $this->query()->create(
			[
				'object_type' => 'unknown',
				'post_status' => 'unindexed',
				'version'     => 1,
			]
		);
	}

	return $indexable;
}