[wp-trac] [WordPress Trac] #36389: Selective refresh for widgets gets lost once `refresh` is used
WordPress Trac
noreply at wordpress.org
Fri Apr 1 13:58:15 UTC 2016
#36389: Selective refresh for widgets gets lost once `refresh` is used
-------------------------------+------------------------------
Reporter: scamartist26 | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone: Awaiting Review
Component: Customize | Version: trunk
Severity: normal | Resolution: invalid
Keywords: reporter-feedback | Focuses:
-------------------------------+------------------------------
Comment (by scamartist26):
I think it has something to do with sidebar registration. I am not sure,
but I recreated the behavior with the Twenty Sixteen theme and no active
plugins like this:
1. Comment out line 123 from `functions.php` in Twenty Sixteen
2. Create `mu-plugins` directory with a `{plugin}.php` file
3. Add this to file:
{{{#!php
<?php
add_action( 'after_setup_theme', function() {
add_theme_support( 'customize-selective-refresh-widgets' );
});
}}}
4. Go to Customizer/Widgets/Sidebar and add a text widget with some
text. ( Note it refreshes partial )
5. Next go to Customizer/Site Identity and change "Display Site Title
and Tagline" to make preview refresh
6. At this point, anything that would do a Partial refresh is lost.
7. If you add the 11 priority to the `after_theme_setup` action,
refresh the Customizer and run the test again you will see it now behaves
correctly.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36389#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list