'boolean', 'sanitize_callback' => 'aisp_protector_sanitize_checkbox', 'default' => false ) ); register_setting( 'aisp_protector_options', 'aisp_protector_enable_pages', array( 'type' => 'boolean', 'sanitize_callback' => 'aisp_protector_sanitize_checkbox', 'default' => false ) ); } add_action('admin_init', 'aisp_protector_register_settings'); // Sanitization callback for checkboxes function aisp_protector_sanitize_checkbox($input) { return (isset($input) && true === (bool) $input) ? true : false; } // Add settings form with nonce function aisp_protector_settings_form() { ?>

/>
/>