Yoast\WP\SEO\Schema\Application\Configuration

Schema_Configuration::is_schema_disabled_programmaticallypublicYoast 1.0

Checks if the schema is disabled programmatically via the wpseo_json_ld_output filter.

Only returns true if schema is enabled via the option (toggle) but disabled by external code.

Метод класса: Schema_Configuration{}

Хуки из метода

Возвращает

true|false. Whether schema is disabled by external code.

Использование

$Schema_Configuration = new Schema_Configuration();
$Schema_Configuration->is_schema_disabled_programmatically(): bool;

Код Schema_Configuration::is_schema_disabled_programmatically() Yoast 27.7

public function is_schema_disabled_programmatically(): bool {
	$deprecated_data = [
		'_deprecated' => 'Please use the "wpseo_schema_*" filters to extend the Yoast SEO schema data - see the WPSEO_Schema class.',
	];

	/**
	 * Filter documented in Schema_Presenter::present().
	 */
	$filtered_schema = \apply_filters( 'wpseo_json_ld_output', $deprecated_data, '' );

	return ( $filtered_schema === [] || $filtered_schema === false );
}