[wp-trac] [WordPress Trac] #30988: Setting's default value doesn't apply on preview window

WordPress Trac noreply at wordpress.org
Thu Jan 15 17:21:15 UTC 2015


#30988: Setting's default value doesn't apply on preview window
---------------------------------------+-----------------------------
 Reporter:  Aniruddh                   |       Owner:  westonruter
     Type:  defect (bug)               |      Status:  reviewing
 Priority:  normal                     |   Milestone:  4.1.1
Component:  Customize                  |     Version:  4.1
 Severity:  normal                     |  Resolution:
 Keywords:  needs-testing needs-patch  |     Focuses:  administration
---------------------------------------+-----------------------------
Changes (by westonruter):

 * owner:  ocean90 => westonruter


Comment:

 Replying to [comment:6 Aniruddh]:
 > After further testing ( with patched class-wp-customize-manager.php &
 class-wp-customize-settings.php ) I have found out that customizer does
 not save the default values to the database. It only saves the values of
 the settings whose values are changed.

 Thanks for discovering that. It makes sense in the case of options
 specifically, because `update_option()` will do no-op if it detects that
 the value being saved is identical to the value already in the DB. So I
 think what may be happening is that since we're filtering the DB value to
 be the default value, when you try save a default into the DB then it does
 a no-op.

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


More information about the wp-trac mailing list