From cde6d602ea6cee3d8ebf2623957c69b4e760ce45 Mon Sep 17 00:00:00 2001 From: Dominik Schilling Date: Wed, 2 Apr 2014 17:04:14 +0000 Subject: [PATCH] Widget Customizer: Improve plugin compatibility. Some plugins are using custom scripts and styles for there widgets. These are available on the Widgets screens, but not in the Customizer yet. Scripts and styles can be enqueued via: * `admin_enqueue_scripts` * `admin_print_scripts` and `admin_print_scripts-widgets.php` * `admin_print_styles` and `admin_print_styles-widgets.php` * `admin_print_footer_scripts` and `admin_footer-widgets.php` All this hooks are now called in the Customizer too. Previously we have add the `#widgets-right` ID to a container div via jQuery. Remember: `#widgets-right` exists on the Widgets screen and is used by many plugins to do event delegation from that element. But since our script files are loaded in the footer, the JavaScript way is a bit late for some plugins. We have decided to add a `div#widgets-right` container element to customizer. "Less hacky hack." props westonruter, ocean90. Thanks dpe415 for testing. fixes #27619. Built from https://develop.svn.wordpress.org/trunk@27907 git-svn-id: http://core.svn.wordpress.org/trunk@27738 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/customize.php | 2 + wp-admin/js/customize-widgets.js | 4 -- wp-admin/js/customize-widgets.min.js | 2 +- wp-includes/class-wp-customize-widgets.php | 55 +++++++++++++++++++++- 4 files changed, 56 insertions(+), 7 deletions(-) diff --git a/wp-admin/customize.php b/wp-admin/customize.php index d3b09f2887..b1485d1f46 100644 --- a/wp-admin/customize.php +++ b/wp-admin/customize.php @@ -118,6 +118,7 @@ do_action( 'customize_controls_print_scripts' ); $cannot_expand = ! ( $screenshot || $wp_customize->theme()->get('Description') ); ?> +
@@ -146,6 +147,7 @@ do_action( 'customize_controls_print_scripts' ); ?>
+