Fix wp_send_json_error() response for update-widget Ajax request, to return error code instead of error message, as the WP_Error objects are instantiated with codes and the messages are empty.
Fixes #32496. Built from https://develop.svn.wordpress.org/trunk@32601 git-svn-id: http://core.svn.wordpress.org/trunk@32571 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
19b8ef0c92
commit
0f5e6d2825
|
@ -1380,7 +1380,7 @@ final class WP_Customize_Widgets {
|
|||
|
||||
$updated_widget = $this->call_widget_update( $widget_id ); // => {instance,form}
|
||||
if ( is_wp_error( $updated_widget ) ) {
|
||||
wp_send_json_error( $updated_widget->get_error_message() );
|
||||
wp_send_json_error( $updated_widget->get_error_code() );
|
||||
}
|
||||
|
||||
$form = $updated_widget['form'];
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.3-alpha-32600';
|
||||
$wp_version = '4.3-alpha-32601';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue