Yoast\WP\SEO\Helpers
Indexable_Helper::should_index_indexable
Determines whether indexing the specific indexable is appropriate at this time.
Метод класса: Indexable_Helper{}
Хуки из метода
Возвращает
true|false. Whether indexing the specific indexable is appropriate at this time.
Использование
$Indexable_Helper = new Indexable_Helper(); $Indexable_Helper->should_index_indexable( $indexable );
- $indexable(Indexable) (обязательный)
- The indexable.
Код Indexable_Helper::should_index_indexable() Indexable Helper::should index indexable Yoast 27.3
public function should_index_indexable( $indexable ) {
$intend_to_save = $this->should_index_indexables();
/**
* Filter: 'wpseo_should_save_indexable' - Allow developers to enable / disable
* saving the indexable when the indexable is updated. Warning: overriding
* the intended action may cause problems when moving from a staging to a
* production environment because indexable permalinks may get set incorrectly.
*
* @param bool $intend_to_save True if YoastSEO intends to save the indexable.
* @param Indexable $indexable The indexable to be saved.
*/
return \apply_filters( 'wpseo_should_save_indexable', $intend_to_save, $indexable );
}