sanitization callback – what am I doing wrong?
-
I’ve looked at a ton of search results. I’ve tried ‘sanitize_text_field’ and ‘esc_textarea’. What am I doing wrong?
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.
$wp_customize->add_setting( ‘some_text_here’,
array(
‘default’ => “my text”,
‘type’ => ‘theme_mod’,
‘capability’ => ‘edit_theme_options’,
‘transport’ => ‘refresh’,
‘sanitize_callback’ => ‘esc_textarea’
)
);
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘sanitization callback – what am I doing wrong?’ is closed to new replies.