[wp-trac] [WordPress Trac] #41271: Customizer sanitize_callback gets called multiple times on setting change

WordPress Trac noreply at wordpress.org
Tue Jul 11 03:29:13 UTC 2017


#41271: Customizer sanitize_callback gets called multiple times on setting change
----------------------------+------------------------------
 Reporter:  kylejennings83  |       Owner:
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  Customize       |     Version:  4.8
 Severity:  normal          |  Resolution:
 Keywords:                  |     Focuses:
----------------------------+------------------------------

Comment (by kylejennings83):

 @westonruter not quite sure I understand why that would cause it to be
 called multiple times.  If I change only a single setting (and only once)
 why would the sanitize_callback get called 4 times in a row?  I also
 noticed that validate_callback is called something like 6 times.  I would
 imagine the callback only gets called a single time.

 I threw `error_log(current_action())` and only
 `customize_sanitize_sidebar_size_setting` was logged (and again 4 times)

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


More information about the wp-trac mailing list