'setting_id', // Unique id * 'title' => 'My Setting', // Title or label for the setting * 'description' => 'Description', // Help text description * 'options' => array( * 'value' => 'Name' * ), // The checkbox values and text * ); * ); * * @since 2.0 * @package Simple Admin Pages */ class sapAdminPageSettingCheckbox_2_7_4 extends sapAdminPageSetting_2_7_4 { //public $sanitize_callback = 'sanitize_text_field'; /** * Display this setting * @since 2.0 */ public function display_setting() { $input_name = $this->get_input_name(); $values = is_array( $this->value ) ? $this->value : array(); $values = ! empty( $values ) ? $values : $this->get_default_setting( $values ); ?>
display_description(); } public function sanitize_callback_wrapper( $values ) { return is_array( $values ) ? array_map( $this->sanitize_callback, $values ) : array(); } /** * Escape the value to display it safely HTML textarea fields */ public function esc_value( $values ) { $return = is_array( $values ) ? array_map( 'esc_attr', $values ) : $values; $return = is_string( $return ) ? esc_attr( $return ) : $return; return $return; } }