/** * 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; }
static function get_attributes($field, $value = null) { $attributes = RWMB_Input_Field::get_attributes($field, $value); $attributes['id'] = false; $attributes['type'] = 'radio'; $attributes['value'] = $value; 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 = 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['list'] = false; $attributes['id'] = false; $attributes['type'] = 'radio'; return $attributes; }
/** * Get the attributes for a field * * @param array $field * @param mixed $value * * @return array */ static function get_attributes($field, $value = null) { switch ($field['field_type']) { case 'checkbox_list': case 'radio_list': $attributes = RWMB_Input_Field::get_attributes($field, $value); $attributes['class'] = "rwmb-choice"; $attributes['id'] = false; $attributes['type'] = 'radio_list' === $field['field_type'] ? 'radio' : 'checkbox'; break; case 'select_advanced': $attributes = RWMB_Select_Advanced_Field::get_attributes($field, $value); $attributes['class'] = "rwmb-choice rwmb-select_advanced"; break; case 'select_tree': $attributes = RWMB_Select_Field::get_attributes($field, $value); $attributes['multiple'] = false; break; case 'select': default: $attributes = RWMB_Select_Field::get_attributes($field, $value); break; } $attributes['name'] .= !$field['clone'] && $field['multiple'] ? '[]' : ''; 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; }