Remove one-time variable from add_settings_error().
props niallkennedy. fixes #22228. git-svn-id: https://develop.svn.wordpress.org/trunk@28681 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
c18f082b15
commit
c7c1a4a88a
@ -1298,13 +1298,12 @@ function do_settings_fields($page, $section) {
|
||||
function add_settings_error( $setting, $code, $message, $type = 'error' ) {
|
||||
global $wp_settings_errors;
|
||||
|
||||
$new_error = array(
|
||||
$wp_settings_errors[] = array(
|
||||
'setting' => $setting,
|
||||
'code' => $code,
|
||||
'code' => $code,
|
||||
'message' => $message,
|
||||
'type' => $type
|
||||
'type' => $type
|
||||
);
|
||||
$wp_settings_errors[] = $new_error;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user