LLMS_Assets::__construct( string $package_id, array[] $defaults = array() )

Constructor


Parameters Parameters

$package_id

(string) (Required) An ID used to identify the originating package (plugin or theme) of the asset handler instance.

$defaults

(array[]) (Optional) Array of asset definitions values. Accepts a partial list of values that is merged with the default defaults.

Default value: array()


Top ↑

Source Source

File: includes/class-llms-assets.php

	 * @param array[] $defaults   Array of asset definitions values. Accepts a partial list of values that is merged with the default defaults.
	 */
	public function __construct( $package_id, $defaults = array() ) {

		$this->package_id = $package_id;
		$this->defaults   = array_replace_recursive( $this->defaults, $defaults );

		/**
		 * Filter asset debug mode.
		 *
		 * Asset debug mode is used only to help debug inline assets although the asset suffix is also controlled by the same
		 * WP Core constants.g
		 *
		 * @since 4.4.0
		 *
		 * @param bool   $debugging  Whether or not debugging is enabled. Returns `true` when `SCRIPT_DEBUG` is on, and `false` otherwise.
		 * @param string $package_id An ID used to identify the originating plugin or theme that defined the asset.
		 */
		$this->debugging_assets = apply_filters( 'llms_assets_debug', ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ), $this->package_id );


Top ↑

Changelog Changelog

Changelog
Version Description
4.9.0 Replace defaults instead of merging them.
4.4.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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