auto-patch 700-dev-dev01-2024-06-01T22_54_01

This commit is contained in:
root
2024-06-01 22:54:01 +00:00
parent a961f203c3
commit 72a1eb6e5a
123 changed files with 794 additions and 4518 deletions

View File

@@ -874,46 +874,6 @@ class WPSEO_Option_Titles extends WPSEO_Option {
unset( $rename, $taxonomy_names, $post_type_names, $defaults, $tax, $old_prefix, $new_prefix );
}
/*
* Make sure the values of the variable option key options are cleaned as they
* may be retained and would not be cleaned/validated then.
*/
if ( is_array( $option_value ) && $option_value !== [] ) {
foreach ( $option_value as $key => $value ) {
$switch_key = $this->get_switch_key( $key );
// Similar to validation routine - any changes made there should be made here too.
switch ( $switch_key ) {
/* Text fields. */
case 'title-':
case 'metadesc-':
case 'bctitle-ptarchive-':
$option_value[ $key ] = WPSEO_Utils::sanitize_text_field( $value );
break;
case 'separator':
if ( ! array_key_exists( $value, $this->get_separator_options() ) ) {
$option_value[ $key ] = false;
}
break;
/*
* Boolean fields.
*/
/*
* Covers:
* 'noindex-'
* 'hideeditbox-'
*/
default:
$option_value[ $key ] = WPSEO_Utils::validate_bool( $value );
break;
}
}
unset( $key, $value, $switch_key );
}
return $option_value;
}