wpseo_schema_article_types, Schema_Types::ARTICLE_TYPES

wpseo_schema_article_types, Schema_Types::ARTICLE_TYPES

Appears in:
Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-seo.28.1

apply_filters('wpseo_schema_article_types, Schema_Types::ARTICLE_TYPES') is found 3 times:

  • /inc/class-wpseo-meta.php line 400
    				if ( $article_helper->is_article_post_type( $post_type ) ) {
    					$default_schema_article_type = WPSEO_Options::get( 'schema-article-type-' . $post_type );
    
    					/** This filter is documented in inc/options/class-wpseo-option-titles.php */
    					$allowed_article_types = apply_filters( 'wpseo_schema_article_types', Schema_Types::ARTICLE_TYPES );
    
    					if ( ! array_key_exists( $default_schema_article_type, $allowed_article_types ) ) {
    						$default_schema_article_type = WPSEO_Options::get_default( 'wpseo_titles', 'schema-article-type-' . $post_type );
    					}
    					$field_defs['schema_article_type']['default'] = $default_schema_article_type;
    				}
    
  • /inc/options/class-wpseo-option-titles.php line 663
    						 * Make sure when you filter this to also filter `wpseo_schema_article_types_labels`.
    						 *
    						 * @param array $schema_article_types The available schema article types.
    						 */
    						if ( array_key_exists( $dirty[ $key ], apply_filters( 'wpseo_schema_article_types', Schema_Types::ARTICLE_TYPES ) ) ) {
    							$clean[ $key ] = $dirty[ $key ];
    						}
    						else {
    							$defaults      = $this->get_defaults();
    							$post_type     = str_replace( $switch_key, '', $key );
    							$clean[ $key ] = $defaults[ $switch_key . $post_type ];
    
  • /src/context/meta-tags-context.php line 557
    		$additional_type   = $this->indexable->schema_article_type;
    		$additional_type ??= $this->options->get( 'schema-article-type-' . $this->indexable->object_sub_type );
    
    		/** This filter is documented in inc/options/class-wpseo-option-titles.php */
    		$allowed_article_types = \apply_filters( 'wpseo_schema_article_types', Schema_Types::ARTICLE_TYPES );
    
    		if ( ! \array_key_exists( $additional_type, $allowed_article_types ) ) {
    			$additional_type = $this->options->get_title_default( 'schema-article-type-' . $this->indexable->object_sub_type );
    		}
    
    		// If the additional type is a subtype of Article, we're fine, and we can bail here.