WP_Theme_JSON_Data::__construct()
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( foo - $origin(строка)
- The origin of the data: default, theme, user.
По умолчанию: 'theme'
Список изменений
С версии 6.1.0 | Введена. |
Код WP_Theme_JSON_Data::__construct() WP Theme JSON Data:: construct WP 6.7.1
public function __construct( $data = array( 'version' => WP_Theme_JSON::LATEST_SCHEMA ), $origin = 'theme' ) { $this->origin = $origin; $this->theme_json = new WP_Theme_JSON( $data, $this->origin ); }