['regular_text', 'all_options', 'small_text', 'large_text'], ]), Setting::description(), ]; } public function sanitizeValue($value, array $field) { return (new Validation())->dateTime($value); } /** * The date and time in the formats of the site, or in `format="..."` (PHP date format). */ public function displayValue($value, array $field, array $args): string { return Display::dateTime($value, 'Y-m-d\TH:i', get_option('date_format') . ' ' . get_option('time_format'), $args); } public function render(array $field, $value): void { printf( '%s', esc_attr($field['field_name']), esc_attr($field['field_name']), esc_attr($value), esc_attr(strtr($field['field_style'] ?? '', '_', '-')), wp_kses_post($this->descriptionHtml($field['description'] ?? '')) ); } }