/** * Get the attributes for a field. * * @param array $field * @param mixed $value * @return array */ static function get_attributes($field, $value = null) { $attributes = parent::get_attributes($field, $value); $attributes['type'] = 'checkbox'; $attributes['list'] = false; return $attributes; }
/** * Get the attributes for a field * * @param array $field * @param mixed $value * * @return array */ static function get_attributes($field, $value = null) { $attributes = parent::get_attributes($field, $value); $attributes = wp_parse_args($attributes, array('size' => $field['size'], 'maxlength' => $field['maxlength'], 'pattern' => $field['pattern'], 'placeholder' => $field['placeholder'])); $attributes['type'] = 'text'; return $attributes; }
/** * Get the attributes for a field * * @param array $field * @param mixed $value * * @return array */ static function get_attributes($field, $value = null) { $attributes = parent::get_attributes($field, $value); $attributes = wp_parse_args($attributes, array('step' => $field['step'], 'max' => $field['max'], 'min' => $field['min'])); $attributes['type'] = 'number'; return $attributes; }
/** * Get the attributes for a field * * @param array $field * @param mixed $value * * @return array */ public static function get_attributes($field, $value = null) { $attributes = MASHSB_RWMB_Input_Field::get_attributes($field, $value); $attributes['id'] = false; $attributes['type'] = $field['multiple'] ? 'checkbox' : 'radio'; $attributes['value'] = $value; return $attributes; }
/** * Get the attributes for a field * * @param array $field * @param mixed $value * * @return array */ static function get_attributes($field, $value = null) { $attributes = parent::get_attributes($field, $value); $attributes['type'] = 'hidden'; return $attributes; }