WordPress.org

Make WordPress Core

Ticket #27112: 27112.jetpack-widget-visibility-compat.patch

File 27112.jetpack-widget-visibility-compat.patch, 1.2 KB (added by westonruter, 8 years ago)

Enqueue customize-widget.js in footer for compat with Jetpack Widget Visibility, and remove overrides for that specific plugin. Patch is also located on a branch on GitHub: https://github.com/x-team/wordpress-develop/compare/master...customizer-widget-visibility A corresponding Jetpack patch has also been submitted via https://github.com/Automattic/jetpack/pull/349

  • src/wp-admin/css/customize-widgets.css

    diff --git src/wp-admin/css/customize-widgets.css src/wp-admin/css/customize-widgets.css
    index c225e0c..9effca9 100644
     
    4242        margin-bottom: 0;
    4343}
    4444
    45 .customize-control-widget_form:not(.wide-widget-control) {
    46         /**
    47          * Prevent plugins (e.g. Widget Visibility in Jetpack) from forcing widget forms
    48          * to be wide and so overflow the customizer panel
    49          */
    50         left: auto !important;
    51         max-width: 100%;
    52 }
    5345.customize-control-widget_form.wide-widget-control .widget-inside {
    5446        position: fixed;
    5547        left: 299px;
  • src/wp-includes/class-wp-customize-widgets.php

    diff --git src/wp-includes/class-wp-customize-widgets.php src/wp-includes/class-wp-customize-widgets.php
    index 8b0c6f6..5214be5 100644
    class WP_Customize_Widgets { 
    466466                wp_enqueue_script(
    467467                        'widget-customizer',
    468468                        admin_url( 'js/customize-widgets.js' ),
    469                         array( 'jquery', 'wp-backbone', 'wp-util', 'customize-controls' )
     469                        array( 'jquery', 'wp-backbone', 'wp-util', 'customize-controls' ),
     470                        false, // version
     471                        true // in_footer
    470472                );
    471473
    472474                // Export available widgets with control_tpl removed from model