LLMS_Assets::output_inline( string $location )

Output inline scripts


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.


Top ↑

Return Return

(void)


Top ↑

Source Source

File: includes/class-llms-assets.php

	 * @return void
	 */
	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>';

			echo $open . implode( '', $assets ) . $close;

		}


Top ↑

Changelog Changelog

Changelog
Version Description
4.4.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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