Yoast\WP\SEO\Schema_Aggregator\Infrastructure
Schema_Aggregator_Conditional{}└─ Conditional
Conditional for the Schema aggregator feature.
Хуков нет.
Использование
$Schema_Aggregator_Conditional = new Schema_Aggregator_Conditional(); // use class methods
Методы
- public __construct( Options_Helper $options )
- public is_met()
Код Schema_Aggregator_Conditional{} Schema Aggregator Conditional{} Yoast 28.3
class Schema_Aggregator_Conditional implements Conditional {
/**
* The options helper.
*
* @var Options_Helper
*/
private $options;
/**
* The constructor.
*
* @param Options_Helper $options The options helper.
*/
public function __construct( Options_Helper $options ) {
$this->options = $options;
}
/**
* Returns `true` when the Schema aggregator feature is enabled.
*
* @return bool `true` when the Schema aggregator feature is enabled.
*/
public function is_met(): bool {
return $this->options->get( 'enable_schema_aggregation_endpoint' ) === true;
}
}