Yoast\WP\SEO\Helpers
Indexable_Helper::should_index_indexables
Determines whether indexing indexables is appropriate at this time.
Метод класса: Indexable_Helper{}
Хуки из метода
Возвращает
true|false. Whether the indexables should be indexed.
Использование
$Indexable_Helper = new Indexable_Helper(); $Indexable_Helper->should_index_indexables();
Код Indexable_Helper::should_index_indexables() Indexable Helper::should index indexables Yoast 26.9
public function should_index_indexables() {
// Currently, the only reason to index is when we're on a production website.
$should_index = $this->environment_helper->is_production_mode();
/**
* Filter: 'Yoast\WP\SEO\should_index_indexables' - Allow developers to enable / disable
* creating indexables. Warning: overriding
* the intended action may cause problems when moving from a staging to a
* production environment because indexable permalinks may get set incorrectly.
*
* @since 18.2
*
* @param bool $should_index Whether the site's indexables should be created.
*/
return (bool) \apply_filters( 'Yoast\WP\SEO\should_index_indexables', $should_index );
}