Merged in feature/314-dev-dev01 (pull request #24)
auto-patch 314-dev-dev01-2024-01-25T04_09_02 * auto-patch 314-dev-dev01-2024-01-25T04_09_02
This commit is contained in:
@@ -304,7 +304,7 @@ class WPSEO_Meta {
|
||||
register_meta(
|
||||
'post',
|
||||
self::$meta_prefix . $key,
|
||||
[ 'sanitize_callback' => [ __CLASS__, 'sanitize_post_meta' ] ]
|
||||
[ 'sanitize_callback' => [ self::class, 'sanitize_post_meta' ] ]
|
||||
);
|
||||
|
||||
// Set the $fields_index property for efficiency.
|
||||
@@ -327,8 +327,8 @@ class WPSEO_Meta {
|
||||
|
||||
self::filter_schema_article_types();
|
||||
|
||||
add_filter( 'update_post_metadata', [ __CLASS__, 'remove_meta_if_default' ], 10, 5 );
|
||||
add_filter( 'add_post_metadata', [ __CLASS__, 'dont_save_meta_if_default' ], 10, 4 );
|
||||
add_filter( 'update_post_metadata', [ self::class, 'remove_meta_if_default' ], 10, 5 );
|
||||
add_filter( 'add_post_metadata', [ self::class, 'dont_save_meta_if_default' ], 10, 4 );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -402,7 +402,7 @@ class WPSEO_Meta {
|
||||
/** 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 ) ) {
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user