wpseo_schema_article_types
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.
Использование
add_filter( 'wpseo_schema_article_types', 'wp_kama_wpseo_schema_article_types_filter' ); /** * Function for `wpseo_schema_article_types` filter-hook. * * @param array $schema_article_types The available schema article types. * * @return array */ function wp_kama_wpseo_schema_article_types_filter( $schema_article_types ){ // filter... return $schema_article_types; }
- $schema_article_types(массив)
- The available schema article types.
Где вызывается хук
wpseo_schema_article_types
wpseo_schema_article_types
wpseo_schema_article_types
wpseo_schema_article_types
yoast/inc/options/class-wpseo-option-titles.php 663
if ( array_key_exists( $dirty[ $key ], apply_filters( 'wpseo_schema_article_types', Schema_Types::ARTICLE_TYPES ) ) ) {
yoast/inc/class-wpseo-meta.php 403
$allowed_article_types = apply_filters( 'wpseo_schema_article_types', Schema_Types::ARTICLE_TYPES );
yoast/inc/class-wpseo-meta.php 1088
self::$meta_fields['schema']['schema_article_type']['options'] = apply_filters( 'wpseo_schema_article_types', self::$meta_fields['schema']['schema_article_type']['options'] );
yoast/src/context/meta-tags-context.php 561
$allowed_article_types = \apply_filters( 'wpseo_schema_article_types', Schema_Types::ARTICLE_TYPES );