From 0a50b50a5273601613bfbd8b2f3fdd3b6e762318 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Mon, 21 Mar 2016 21:59:29 +0000 Subject: [PATCH] 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 --- functions.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/functions.php b/functions.php index e3054474e..8ec0755e1 100644 --- a/functions.php +++ b/functions.php @@ -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' );