I want to allow HTML into a plugin input field via a user, I am using the Settings API, but it strips everything HTML out. - Code below -any pointers?
function plugin_settings(){
register_Setting(
'ng_settings_group',
'my_settings',
'plugin_prefix validate_input'
);
add_settings_section(
'my_section',
'My Settings',
'plugin_prefix my_section_callback',
'plugin'
);
add_settings_field(
'ng_menu_html',
'HTML Carat',
'plugin_prefix ng_html_callback',
'plugin',
'my_section'
);
}
add_action('admin_init', 'plugin_prefix plugin_settings');
function ng_html_callback() {
$options = get_option( 'my_settings' );
if( !isset( $options['ng_html'] ) ) $options['ng_html'] = '';
echo '<label for="ng_html">' . esc_attr_e( 'Insert additional HTML','plugin') . '</label>';
echo '<input type="text" id="ng_html" name="my_settings[ng_html]" value="' . $options['ng_html'] . '" placeholder="Add HTML">';
}