/** * Normalize parameters for field * * @param array $field * * @return array */ static function normalize($field) { $field = parent::normalize($field); $field['multiple'] = false; $field['attributes']['id'] = false; return $field; }
/** * 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'] = 'password'; return $attributes; }
/** * Normalize parameters for field * * @param array $field * @return array */ static function normalize($field) { $field = parent::normalize($field); $field['clone'] = true; $field['multiple'] = true; return $field; }
/** * 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('data-options' => wp_json_encode($field['js_options']))); return $attributes; }