WP_Scripts::__construct() WordPress Method

The WP_Scripts::__construct() method is used to initialize the class and set up the object. It takes two parameters: an array of script handles and an array of options. The script handles are used to identify the scripts that are to be loaded, and the options array is used to specify the loading options for the scripts.

WP_Scripts::__construct() #

Constructor.


Source

File: wp-includes/class.wp-scripts.php

	public function __construct() {
		$this->init();
		add_action( 'init', array( $this, 'init' ), 0 );
	}


Top ↑

Changelog

Changelog
VersionDescription
2.6.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.