['regular_text', 'all_options', 'small_text', 'large_text'], ]), Setting::description(), ]; } public function sanitizeValue($value, array $field) { return sanitize_text_field($value); } public function render(array $field, $value): void { $placeholder = $this->text($field, 'placeholder'); // type="password" only masks the value on screen; it is still plain text in the page source, like any // other WordPress settings field. This is not a place to store secrets that must stay confidential. printf( '%s', esc_attr($field['field_name']), esc_attr($field['field_name']), esc_attr($value), $placeholder ? 'placeholder="' . esc_attr($placeholder) . '"' : '', esc_attr(strtr($field['field_style'] ?? '', '_', '-')), wp_kses_post($this->descriptionHtml($field['description'] ?? '')) ); } }