Widget Customizer: Move preview script to wp_default_scripts().

git-svn-id: https://develop.svn.wordpress.org/trunk@27585 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90) 2014-03-18 15:30:12 +00:00
parent c2a4665966
commit e60ee04f54
2 changed files with 2 additions and 5 deletions

View File

@ -750,11 +750,7 @@ class WP_Customize_Widgets {
* @action wp_enqueue_scripts * @action wp_enqueue_scripts
*/ */
static function customize_preview_enqueue_deps() { static function customize_preview_enqueue_deps() {
wp_enqueue_script( wp_enqueue_script( 'customize-preview-widgets' );
'customize-preview-widgets',
includes_url( 'js/customize-preview-widgets.js' ),
array( 'jquery', 'wp-util', 'customize-preview' )
);
add_action( 'wp_print_styles', array( __CLASS__, 'inject_preview_css' ), 1 ); add_action( 'wp_print_styles', array( __CLASS__, 'inject_preview_css' ), 1 );

View File

@ -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-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 ); $scripts->add( 'accordion', "/wp-admin/js/accordion$suffix.js", array( 'jquery' ), false, 1 );