/** * 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; }
/** * 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; }