Yoast\WP\SEO\Conditionals
Should_Index_Indexables_Conditional{}└─ Conditional
Conditional that is only met when the site's indexables are being built.
Хуков нет.
Использование
$Should_Index_Indexables_Conditional = new Should_Index_Indexables_Conditional(); // use class methods
Методы
- public __construct( Indexable_Helper $indexable_helper )
- public is_met()
Код Should_Index_Indexables_Conditional{} Should Index Indexables Conditional{} Yoast 28.3
class Should_Index_Indexables_Conditional implements Conditional {
/**
* The indexable helper.
*
* @var Indexable_Helper
*/
protected $indexable_helper;
/**
* Should_Index_Indexables_Conditional constructor.
*
* @param Indexable_Helper $indexable_helper The indexable helper.
*/
public function __construct( Indexable_Helper $indexable_helper ) {
$this->indexable_helper = $indexable_helper;
}
/**
* Returns `true` when the site's indexables are being built.
*
* @return bool `true` when the site's indexables are being built.
*/
public function is_met() {
return $this->indexable_helper->should_index_indexables();
}
}