From e60ee04f54f411e8d026a92470073163e1cd9b88 Mon Sep 17 00:00:00 2001 From: "Dominik Schilling (ocean90)" Date: Tue, 18 Mar 2014 15:30:12 +0000 Subject: [PATCH] Widget Customizer: Move preview script to wp_default_scripts(). git-svn-id: https://develop.svn.wordpress.org/trunk@27585 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-customize-widgets.php | 6 +----- src/wp-includes/script-loader.php | 1 + 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/wp-includes/class-wp-customize-widgets.php b/src/wp-includes/class-wp-customize-widgets.php index c5f8ee2779..207084736a 100644 --- a/src/wp-includes/class-wp-customize-widgets.php +++ b/src/wp-includes/class-wp-customize-widgets.php @@ -750,11 +750,7 @@ class WP_Customize_Widgets { * @action wp_enqueue_scripts */ static function customize_preview_enqueue_deps() { - wp_enqueue_script( - 'customize-preview-widgets', - includes_url( 'js/customize-preview-widgets.js' ), - array( 'jquery', 'wp-util', 'customize-preview' ) - ); + wp_enqueue_script( 'customize-preview-widgets' ); add_action( 'wp_print_styles', array( __CLASS__, 'inject_preview_css' ), 1 ); diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php index b212d9048e..404b6a7dcc 100644 --- a/src/wp-includes/script-loader.php +++ b/src/wp-includes/script-loader.php @@ -379,6 +379,7 @@ function wp_default_scripts( &$scripts ) { ) ); $scripts->add( 'customize-widgets', "/wp-admin/js/customize-widgets$suffix.js", array( 'jquery', 'jquery-ui-sortable', 'jquery-ui-droppable', 'wp-backbone', 'customize-controls' ), false, 1 ); + $scripts->add( 'customize-preview-widgets', "/wp-includes/js/customize-preview-widgets$suffix.js", array( 'jquery', 'wp-util', 'customize-preview' ), false, 1 ); $scripts->add( 'accordion', "/wp-admin/js/accordion$suffix.js", array( 'jquery' ), false, 1 );