Widgets: Prevent fatal error due to calling undefined `wp_json_encode()` when requesting the `load-scripts.php` endpoint.
Props Otto42. Amends [41352]. Fixes #41610. Built from https://develop.svn.wordpress.org/trunk@41360 git-svn-id: http://core.svn.wordpress.org/trunk@41193 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d35be7a120
commit
da3b644df4
|
@ -672,7 +672,7 @@ function wp_default_scripts( &$scripts ) {
|
|||
$scripts->add( 'admin-gallery', "/wp-admin/js/gallery$suffix.js", array( 'jquery-ui-sortable' ) );
|
||||
|
||||
$scripts->add( 'admin-widgets', "/wp-admin/js/widgets$suffix.js", array( 'jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-ui-droppable' ), false, 1 );
|
||||
$scripts->add_inline_script( 'admin-widgets', sprintf( 'wpWidgets.l10n = %s;', wp_json_encode( array(
|
||||
did_action( 'init' ) && $scripts->add_inline_script( 'admin-widgets', sprintf( 'wpWidgets.l10n = %s;', wp_json_encode( array(
|
||||
'save' => __( 'Save' ),
|
||||
'saved' => __( 'Saved' ),
|
||||
'saveAlert' => __( 'The changes you made will be lost if you navigate away from this page.' ),
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.9-alpha-41359';
|
||||
$wp_version = '4.9-alpha-41360';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue