Yoast\WP\SEO\Abilities\User_Interface

Abilities_Integration::get_schema_article_typesprivateYoast 1.0

Returns the allowed Schema.org article type values.

Mirrors the validation in WPSEO_Option_Titles so the ability accepts exactly the article types the editor does, including any registered through the filter.

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

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

Возвращает

Массив. string> The allowed article type values.

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

// private - только в коде основоного (родительского) класса
$result = $this->get_schema_article_types(): array;

Код Abilities_Integration::get_schema_article_types() Yoast 28.2

private function get_schema_article_types(): array {
	/**
	 * Filter: 'wpseo_schema_article_types' - Allow developers to filter the available article types.
	 *
	 * Make sure when you filter this to also filter `wpseo_schema_article_types_labels`.
	 *
	 * @param array $schema_article_types The available schema article types.
	 */
	return \array_keys( \apply_filters( 'wpseo_schema_article_types', Schema_Types::ARTICLE_TYPES ) );
}