Yoast\WP\SEO\Actions\Indexing
Indexable_General_Indexation_Action::index() public Yoast 1.0
Creates indexables for unindexed system pages, the date archive, and the homepage.
{} Это метод класса: Indexable_General_Indexation_Action{}
Хуков нет.
Возвращает
Indexable[]
. The created indexables.
Использование
$Indexable_General_Indexation_Action = new Indexable_General_Indexation_Action(); $Indexable_General_Indexation_Action->index();
Код Indexable_General_Indexation_Action::index() Indexable General Indexation Action::index Yoast 16.1.1
public function index() {
$indexables = [];
$indexables_to_create = $this->query();
if ( isset( $indexables_to_create['404'] ) ) {
$indexables[] = $this->indexable_repository->find_for_system_page( '404' );
}
if ( isset( $indexables_to_create['search'] ) ) {
$indexables[] = $this->indexable_repository->find_for_system_page( 'search-result' );
}
if ( isset( $indexables_to_create['date_archive'] ) ) {
$indexables[] = $this->indexable_repository->find_for_date_archive();
}
if ( isset( $indexables_to_create['home_page'] ) ) {
$indexables[] = $this->indexable_repository->find_for_home_page();
}
return $indexables;
}