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. Built from https://develop.svn.wordpress.org/trunk@37040 git-svn-id: http://core.svn.wordpress.org/trunk@37007 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d691be2b2a
commit
0a50b50a52
|
@ -74,6 +74,9 @@ function twentytwelve_setup() {
|
|||
// This theme uses a custom image size for featured images, displayed on "standard" posts.
|
||||
add_theme_support( 'post-thumbnails' );
|
||||
set_post_thumbnail_size( 624, 9999 ); // Unlimited height, soft crop
|
||||
|
||||
// Indicate widget sidebars can use selective refresh in the Customizer.
|
||||
add_theme_support( 'customize-selective-refresh-widgets' );
|
||||
}
|
||||
add_action( 'after_setup_theme', 'twentytwelve_setup' );
|
||||
|
||||
|
|
Loading…
Reference in New Issue