LLMS_Assets::get_definitions_inline( string $location )
Retrieve a list of inline asset definitions by location.
Parameters Parameters
- $location
-
(string) (Required) Location of scripts to output. Accepts "style", "header", or "footer". Inline header styles are output using "style". Inline scripts are output using either "header" or "footer", output in their respective locations.
Return Return
(array[])
Source Source
File: includes/class-llms-assets.php
* @return array[] */ protected function get_definitions_inline( $location ) { $assets = array(); foreach ( $this->inline as $handle => $definition ) { if ( $location === $definition['location'] ) { $assets[ $handle ] = $definition; } } // Sort by priority. uasort( $assets, function ( $a, $b ) { if ( $a['priority'] === $b['priority'] ) { return 0; } return $a['priority'] < $b['priority'] ? -1 : 1; } ); return $assets;
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
4.4.0 | Introduced. |