Skip to main content
4 events
when toggle format what by license comment
Nov 14, 2016 at 20:37 comment added Dave Romsey Happy to help! The sanitize_callback function is in charge of returning the value when using set_theme_mod(). So, no, the default value (set with add_setting( [ header_layout', [ 'default' => 10 ] ] ) ) would not be used if you passed in invalid value to set_theme_mod(); That value is used for the default value shown in the customizer if it has not been set..
Nov 14, 2016 at 8:20 vote accept Nikita
Nov 14, 2016 at 8:20 comment added Nikita I see, thanks. So passing a nonvalid value to 'set_theme_mod()' must fallback to the default value, right?
Nov 14, 2016 at 3:49 history answered Dave Romsey CC BY-SA 3.0