Skip to content

Commit

Permalink
Administration: Replace legacy updated message type in `add_setting…
Browse files Browse the repository at this point in the history
…s_error()` calls with `success`.

See #44640.

git-svn-id: https://develop.svn.wordpress.org/trunk@45818 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
SergeyBiryukov committed Aug 16, 2019
1 parent e961891 commit f3241f4
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/wp-admin/includes/class-wp-privacy-requests-table.php
Expand Up @@ -237,7 +237,7 @@ public function process_bulk_action() {
'bulk_action',
/* translators: %d: number of requests */
sprintf( _n( 'Deleted %d request', 'Deleted %d requests', $count ), $count ),
'updated'
'success'
);
break;
case 'resend':
Expand All @@ -254,7 +254,7 @@ public function process_bulk_action() {
'bulk_action',
/* translators: %d: number of requests */
sprintf( _n( 'Re-sent %d request', 'Re-sent %d requests', $count ), $count ),
'updated'
'success'
);
break;
}
Expand Down
4 changes: 2 additions & 2 deletions src/wp-admin/includes/privacy-tools.php
Expand Up @@ -88,7 +88,7 @@ function _wp_personal_data_handle_actions() {
'privacy_action_email_retry',
'privacy_action_email_retry',
__( 'Confirmation request sent again successfully.' ),
'updated'
'success'
);
}
} elseif ( isset( $_POST['action'] ) ) {
Expand Down Expand Up @@ -166,7 +166,7 @@ function _wp_personal_data_handle_actions() {
'username_or_email_for_privacy_request',
'username_or_email_for_privacy_request',
__( 'Confirmation request initiated successfully.' ),
'updated'
'success'
);
break;
}
Expand Down
2 changes: 1 addition & 1 deletion src/wp-admin/options-head.php
Expand Up @@ -12,7 +12,7 @@

if ( isset( $_GET['updated'] ) && isset( $_GET['page'] ) ) {
// For back-compat with plugins that don't use the Settings API and just set updated=1 in the redirect.
add_settings_error( 'general', 'settings_updated', __( 'Settings saved.' ), 'updated' );
add_settings_error( 'general', 'settings_updated', __( 'Settings saved.' ), 'success' );
}

settings_errors();
2 changes: 1 addition & 1 deletion src/wp-admin/options-permalink.php
Expand Up @@ -151,7 +151,7 @@
}

if ( ! get_settings_errors() ) {
add_settings_error( 'general', 'settings_updated', $message, 'updated' );
add_settings_error( 'general', 'settings_updated', $message, 'success' );
}

set_transient( 'settings_errors', get_settings_errors(), 30 );
Expand Down
2 changes: 1 addition & 1 deletion src/wp-admin/options-privacy.php
Expand Up @@ -45,7 +45,7 @@
}
}

add_settings_error( 'page_for_privacy_policy', 'page_for_privacy_policy', $privacy_page_updated_message, 'updated' );
add_settings_error( 'page_for_privacy_policy', 'page_for_privacy_policy', $privacy_page_updated_message, 'success' );
} elseif ( 'create-privacy-page' === $action ) {

if ( ! class_exists( 'WP_Privacy_Policy_Content' ) ) {
Expand Down
2 changes: 1 addition & 1 deletion src/wp-admin/options.php
Expand Up @@ -302,7 +302,7 @@
*/
// If no settings errors were registered add a general 'updated' message.
if ( ! count( get_settings_errors() ) ) {
add_settings_error( 'general', 'settings_updated', __( 'Settings saved.' ), 'updated' );
add_settings_error( 'general', 'settings_updated', __( 'Settings saved.' ), 'success' );
}
set_transient( 'settings_errors', get_settings_errors(), 30 );

Expand Down

0 comments on commit f3241f4

Please sign in to comment.