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".<br> Inline header styles are output using "style".<br> 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
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. |