parent = $framework; $this->option_name = $field['option_name']; $this->option_id = parent::beautifyid( $field['option_name'] ); $this->value = $value; $this->field = wp_parse_args( $field, array( 'id' => '', 'title' => '', 'desc' => '', 'default' => '', 'options' => null, 'readonly' => false, ) ); // If value does not set, use the default. if ( is_null( $this->value ) ) { $this->value = $this->field['default']; } parent::__construct( $this->field ); } /** * Render field * * Create the HTML interface for your field * * @since 1.0 * @return void */ public function render_field() { $options = (array) $this->field['options']; foreach ( $options as $key => $option ) { $enabled = null; $values = (array) $this->value; if ( in_array( $key, $values, true ) ) { $enabled = 1; } ?> ' . wp_kses_post( $this->field['desc'] ) . '

'; } /** * Sanitize the configured field value. * * @param mixed $input Submitted field value. */ public function sanitize( $input ) { return $input; } } endif;