[wp-trac] [WordPress Trac] #36389: Selective refresh for widgets gets lost once `refresh` is used
WordPress Trac
noreply at wordpress.org
Tue Apr 5 19:01:20 UTC 2016
#36389: Selective refresh for widgets gets lost once `refresh` is used
-------------------------------------------------+-------------------------
Reporter: scamartist26 | Owner:
Type: defect (bug) | westonruter
Priority: normal | Status: accepted
Component: Customize | Milestone: 4.5
Severity: normal | Version: trunk
Keywords: has-patch has-unit-tests commit | Resolution:
needs-docs | Focuses:
-------------------------------------------------+-------------------------
Comment (by westonruter):
Replying to [comment:18 DrewAPicture]:
> Side note: I recognize why we need it in core, but it definitely feels a
little weird adding a method specifically for testing purposes. Like maybe
the underlying code isn't flexible enough in its implementation to be
easily testable in the first place. I register my hesitation to make this
a habit.
You're absolutely right. See my
[https://core.trac.wordpress.org/ticket/36389#comment:13 comment above]:
> Adding unit tests also necessitated introducing a static
`WP_Customize_Setting::reset_aggregated_multidimensionals()` to reset the
protected static `$aggregated_multidimensionals` variable after each test.
(In hindsight, it may have been better to store the
`$aggregated_multidimensionals` as a non-static variable on
`WP_Customize_Manager` so that it would be cleaned up automatically after
the manager is destructed.)
So, what should be done specifically to prevent this method from being
included in docs? Let it be like it is right now, but include `@ignore`?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36389#comment:20>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list