wordpress-seo
wordpress-seo copied to clipboard
Remove `add_settings_error()` logic in `WPSEO_Option_Social::validate_option()`
As per an investigation when renaming Twitter to X, we probably no longer use the part where we
if ( function_exists( 'add_settings_error' ) ) {
add_settings_error(
$this->group_name, // Slug title of the setting.
$key, // Suffix-ID for the error message box.
sprintf(
/* translators: %s expands to a twitter user name. */
__( '%s does not seem to be a valid Twitter Username. Please correct.', 'wordpress-seo' ),
'<strong>' . esc_html( sanitize_text_field( $dirty[ $key ] ) ) . '</strong>'
), // The error message.
'error' // Message type.
);
}
as we no longer save Social Media links using the settings API.
Let's confirm the above and if so, remove this logic.
Also, maybe there's also other places where add_settings_error() is now obsolete?