Skip to content

Instantly share code, notes, and snippets.

@westonruter
Created April 1, 2014 18:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save westonruter/9920084 to your computer and use it in GitHub Desktop.
Save westonruter/9920084 to your computer and use it in GitHub Desktop.
diff --git src/wp-admin/customize.php src/wp-admin/customize.php
index d3b09f2..b1485d1 100644
--- src/wp-admin/customize.php
+++ src/wp-admin/customize.php
@@ -118,6 +118,7 @@ do_action( 'customize_controls_print_scripts' );
$cannot_expand = ! ( $screenshot || $wp_customize->theme()->get('Description') );
?>
+ <div id="widgets-right"><!-- For Widget Customizer, many widgets try to look for instances under div#widgets-right, so we have to add that ID to a container div in the customizer for compat -->
<div class="wp-full-overlay-sidebar-content accordion-container" tabindex="-1">
<div id="customize-info" class="accordion-section <?php if ( $cannot_expand ) echo ' cannot-expand'; ?>">
<div class="accordion-section-title" aria-label="<?php esc_attr_e( 'Theme Customizer Options' ); ?>" tabindex="0">
@@ -146,6 +147,7 @@ do_action( 'customize_controls_print_scripts' );
?>
</ul></div>
</div>
+ </div>
<div id="customize-footer-actions" class="wp-full-overlay-footer">
<a href="#" class="collapse-sidebar button-secondary" title="<?php esc_attr_e('Collapse Sidebar'); ?>">
diff --git src/wp-admin/js/customize-widgets.js src/wp-admin/js/customize-widgets.js
index f0c1e8c..b28bba8 100644
--- src/wp-admin/js/customize-widgets.js
+++ src/wp-admin/js/customize-widgets.js
@@ -35,10 +35,6 @@ var WidgetCustomizer = ( function ($) {
window.ajaxurl = wp.ajax.settings.url;
}
- // Unfortunately many widgets try to look for instances under div#widgets-right,
- // so we have to add that ID to a container div in the customizer for compat
- $( '#customize-theme-controls' ).closest( 'div:not([id])' ).attr( 'id', 'widgets-right' );
-
/**
* Set up model
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment