I need to add a new options to my settings, the new filed shown in settings page but not saved.
My add_settings_field callback:
public function field_option_callback()
{
?>
<p>
<input type='checkbox' name='my_options[imgs][]' <?php checked( in_array( 'thumbnail', $imgs ), 1 ); ?> value='thumbnail'>
<label><?php _e('Thumbnail','do'); ?></label>
</p>
<?php
$html = "";
echo apply_filters( 'after_options_callback', $html );
}
How I can add more fields and settings to my plugin using hooks?
EDIT: It works if I remove sanitize_callback from register_setting and use add_filter in same plugin file