[wp-trac] [WordPress Trac] #41810: Add the sanitization function for checkboxes

WordPress Trac noreply at wordpress.org
Wed Sep 6 08:00:20 UTC 2017


#41810: Add the sanitization function for checkboxes
-----------------------------+------------------------------
 Reporter:  Mirucon          |       Owner:
     Type:  feature request  |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  General          |     Version:  trunk
 Severity:  normal           |  Resolution:
 Keywords:  has-patch        |     Focuses:
-----------------------------+------------------------------

Comment (by Mirucon):

 It should work, as checkboxes always return either true or false.

 Try this to see what happens. This code will return the value of 'Display
 Site Title and Tagline', you'll see that is boolean:

 {{{
 var_dump( get_theme_mod( 'display_header_text', true ) );
 }}}

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


More information about the wp-trac mailing list