Why is it saying I don't have a sanitization callback when I do?
-
I’ve added 5 color pickers (footer background color, footer text color, that kind of thing), to Customizer, and have used the following sanitize code in each of the add_setting sections, and yet, Theme Check plugin still says:
REQUIRED: Found a Customizer setting that did not have a sanitization callback function. Every call to the add_setting() method needs to have a sanitization callback function passed.
Here’s an example of the code I use:
// add footer text color picker setting $wp_customize->add_setting( 'footer_text_color', array( 'default' => '#eeeeee', 'sanitize_callback' => 'sanitize_hex_color' ) );
Pulling my hair out here. I ONLY have 5 add_setting() methods in my functions and all 5 have the sanitize_callback line above. Any thoughts on why the Theme Check plugin would keep telling me I’m missing one?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Why is it saying I don't have a sanitization callback when I do?’ is closed to new replies.