LLMS_Assets::output_inline( string $location )
Output inline scripts
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
(void)
Source Source
File: includes/class-llms-assets.php
public function output_inline( $location ) {
$defs = self::get_definitions_inline( $location );
if ( $defs ) {
$assets = array();
foreach ( $defs as $def ) {
$assets[] = $this->prepare_inline_asset_for_output( $def, $location );
}
$open = 'style' === $location ? '<style id="llms-inline-styles" type="text/css">' : sprintf( '<script id="llms-inline-%s-scripts" type="text/javascript">', $location );
$close = 'style' === $location ? '</style>' : '</script>';
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
echo $open . implode( '', $assets ) . $close;
}
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 4.4.0 | Introduced. |