WP_Theme_JSON_Data::__construct( array $data = array(), string $origin = ‘theme’ )

In this article

Constructor.

Parameters

$dataarrayoptional
Array following the theme.json specification.

Default:array()

$originstringoptional
The origin of the data: default, theme, user.

Default:'theme'

Source

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

Changelog

VersionDescription
6.1.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.