LLMS_Assets::get_definitions( string $type )
Retrieve the asset definition list for a given asset type.
Parameters Parameters
- $type
-
(string) (Required) The asset type. Accepts either "script" or "style".
Return Return
(array[])
Source Source
File: includes/class-llms-assets.php
* @return array[] */ protected function get_definitions( $type ) { switch ( $type ) { case 'script': $list = $this->scripts; break; case 'style': $list = $this->styles; break; default: $list = array(); } /** * Filter the definition list of static assets for the given type * * The dynamic portion of this filter, `{$type}`, refers to the asset type. Either "script" or "style". * * @since 4.4.0 * * @param array[] $list The definition list. * @param string $package_id An ID used to identify the originating plugin or theme that defined the asset. */ return apply_filters( "llms_get_{$type}_asset_definitions", $list, $this->package_id );
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
4.4.0 | Introduced. |