wpseo_schema_article_types

wpseo_schema_article_types

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-seo.22.3

apply_filters('wpseo_schema_article_types') is found 4 times:

  • /inc/class-wpseo-meta.php line 403
    				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/class-wpseo-meta.php line 1088

    Warning: Undefined array key 1090 in /home/c6974294/public_html/wp-plugin-api.com/wp-content/themes/wordpress-hooks/functions.php on line 167

    Warning: Undefined array key 1091 in /home/c6974294/public_html/wp-plugin-api.com/wp-content/themes/wordpress-hooks/functions.php on line 167

    Warning: Undefined array key 1092 in /home/c6974294/public_html/wp-plugin-api.com/wp-content/themes/wordpress-hooks/functions.php on line 167

    Warning: Undefined array key 1093 in /home/c6974294/public_html/wp-plugin-api.com/wp-content/themes/wordpress-hooks/functions.php on line 167

    	 * @return void
    	 */
    	public static function filter_schema_article_types() {
    		/** This filter is documented in inc/options/class-wpseo-option-titles.php */
    		self::$meta_fields['schema']['schema_article_type']['options'] = apply_filters( 'wpseo_schema_article_types', self::$meta_fields['schema']['schema_article_type']['options'] );
    	}
    }
    
    
    
    
    
  • /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 572
    			$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.