/** * 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('cols' => $field['cols'], 'rows' => $field['rows'], 'maxlength' => $field['maxlength'], 'wrap' => $field['wrap'], 'readonly' => $field['readonly'], 'placeholder' => $field['placeholder'])); $attributes['class'] .= ' large-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['type'] = 'hidden'; $attributes['name'] .= !$field['clone'] && $field['multiple'] ? '[]' : ''; $attributes['disabled'] = true; $attributes['id'] = false; $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 = wp_parse_args($attributes, array('list' => $field['datalist'] ? $field['datalist']['id'] : false, 'readonly' => $field['readonly'], 'value' => $value, 'placeholder' => $field['placeholder'])); 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['class'] .= ' button hide-if-no-js'; return $attributes; }