WP_Theme_JSON_Data::__construct()publicWP 6.1.0

Constructor.

Метод класса: WP_Theme_JSON_Data{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$WP_Theme_JSON_Data = new WP_Theme_JSON_Data();
$WP_Theme_JSON_Data->__construct( $data, $origin );
$data(массив)
Array following the theme.json specification.
По умолчанию: array()
$origin(строка)
The origin of the data: default, theme, user.
По умолчанию: 'theme'

Список изменений

С версии 6.1.0 Введена.

Код WP_Theme_JSON_Data::__construct() WP 6.5.2

public function __construct( $data = array(), $origin = 'theme' ) {
	$this->origin     = $origin;
	$this->theme_json = new WP_Theme_JSON( $data, $this->origin );
}