On this page
WP_Customize_Date_Time_Control::json(): array
Export data to JS.
Return
array
Source
File: wp-includes/customize/class-wp-customize-date-time-control.php. View all references
public function json() {
$data = parent::json();
$data['maxYear'] = (int) $this->max_year;
$data['minYear'] = (int) $this->min_year;
$data['allowPastDate'] = (bool) $this->allow_past_date;
$data['twelveHourFormat'] = (bool) $this->twelve_hour_format;
$data['includeTime'] = (bool) $this->include_time;
return $data;
}
Related
Uses
| Uses | Description |
|---|---|
| WP_Customize_Control::json() wp-includes/class-wp-customize-control.php | Get the data to export to the client via JSON. |
Used By
| Used By | Description |
|---|---|
| WP_Customize_Date_Time_Control::content_template() wp-includes/customize/class-wp-customize-date-time-control.php | Renders a JS template for the content of date time control. |
Changelog
| Version | Description |
|---|---|
| 4.9.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_customize_date_time_control/json