auto-patch 700-dev-dev01-2024-06-01T22_54_01
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user