WP_Customize_Date_Time_Control::json() WordPress Method

The json() method for the WP_Customize_Date_Time_Control class outputs the json data for the control.

WP_Customize_Date_Time_Control::json() #

Export data to JS.


Return

(array)


Top ↑

Source

File: wp-includes/customize/class-wp-customize-date-time-control.php

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


Top ↑

Changelog

Changelog
VersionDescription
4.9.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.