Remove one-time variable from add_settings_error().

props niallkennedy.
fixes #22228.
Built from https://develop.svn.wordpress.org/trunk@28681


git-svn-id: http://core.svn.wordpress.org/trunk@28499 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2014-06-05 18:29:14 +00:00
parent ce508e95c2
commit 4b14fe0593
1 changed files with 3 additions and 4 deletions

View File

@ -1298,13 +1298,12 @@ function do_settings_fields($page, $section) {
function add_settings_error( $setting, $code, $message, $type = 'error' ) { function add_settings_error( $setting, $code, $message, $type = 'error' ) {
global $wp_settings_errors; global $wp_settings_errors;
$new_error = array( $wp_settings_errors[] = array(
'setting' => $setting, 'setting' => $setting,
'code' => $code, 'code' => $code,
'message' => $message, 'message' => $message,
'type' => $type 'type' => $type
); );
$wp_settings_errors[] = $new_error;
} }
/** /**