[wp-trac] [WordPress Trac] #39221: Customize: Prevent setting previewing logic when settings will be saved

WordPress Trac noreply at wordpress.org
Wed Aug 2 05:34:35 UTC 2017


#39221: Customize: Prevent setting previewing logic when settings will be saved
---------------------------------------------+--------------------------
 Reporter:  westonruter                      |       Owner:  westonruter
     Type:  defect (bug)                     |      Status:  closed
 Priority:  normal                           |   Milestone:  4.9
Component:  Customize                        |     Version:  4.7
 Severity:  normal                           |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests commit  |     Focuses:
---------------------------------------------+--------------------------
Changes (by westonruter):

 * status:  reviewing => closed
 * resolution:   => fixed


Comment:

 In [changeset:"41205"]:
 {{{
 #!CommitTicketReference repository="" revision="41205"
 Customize: Introduce `settings_previewed` arg and getter on
 `WP_Customize_Manager` which controls whether
 `WP_Customize_Setting::preview()` should be called on settings.

 The `settings_previewed` property eliminates the need for the Customizer
 components from having to look at global `doing_ajax` state. This is in
 particular needed when saving settings, as some settings will short-
 circuit the update operation if they detect no changes are introduced.
 This is also needed for low-level integrations with the Customizer, such
 as in REST API endpoints under development.

 Props stubgo, westonruter, utkarshpatel for testing.
 See #38900.
 Fixes #39221.
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39221#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list