llms_focus_mode_enqueue_scripts()

Enqueue focus mode frontend scripts.


Return Return

(void)


Top ↑

Source Source

File: includes/functions/llms.functions.template.php

function llms_focus_mode_enqueue_scripts() {
	$focus_mode_post_types = apply_filters( 'llms_focus_mode_post_types', array( 'lesson', 'llms_quiz' ) );
	if ( is_singular( $focus_mode_post_types ) && llms_is_focus_mode_enabled( get_the_ID() ) ) {
		$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';

		wp_enqueue_style(
			'llms-focus-mode',
			llms()->plugin_url() . '/assets/css/llms-focus-mode' . $suffix . '.css',
			array(),
			llms()->version
		);

		wp_enqueue_script(
			'llms-focus-mode',
			llms()->plugin_url() . '/assets/js/llms-focus-mode.js',
			array(),
			llms()->version,
			true
		);
	}
}


Top ↑

Changelog Changelog

Changelog
Version Description
10.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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