WordPress.org

Make WordPress Core


Ignore:
Timestamp:
03/21/16 21:58:02 (19 months ago)
Author:
westonruter
Message:

Customize: Require opt-in for selective refresh of widgets.

  • Introduces customize-selective-refresh-widgets theme support feature and adds to themes.
  • Introduces customize_selective_refresh arg for WP_Widget::$widget_options and adds to all core widgets.
  • Remove selective_refresh from being a component that can be removed via customize_loaded_components filter.
  • Add WP_Customize_Widgets::get_selective_refreshable_widgets() and WP_Customize_Widgets::is_widget_selective_refreshable().
  • Fix default selector for Partial instances.
  • Implement and improve Masronry sidebar refresh logic in Twenty Thirteen and Twenty Fourteen, including preservation of initial widget position after refresh.
  • Re-initialize ME.js when refreshing Twenty_Fourteen_Ephemera_Widget.

See #27355.
Fixes #35855.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentytwelve/functions.php

    r36797 r37040  
    7575    add_theme_support( 'post-thumbnails' ); 
    7676    set_post_thumbnail_size( 624, 9999 ); // Unlimited height, soft crop 
     77 
     78    // Indicate widget sidebars can use selective refresh in the Customizer. 
     79    add_theme_support( 'customize-selective-refresh-widgets' ); 
    7780} 
    7881add_action( 'after_setup_theme', 'twentytwelve_setup' ); 
Note: See TracChangeset for help on using the changeset viewer.