LLMS_Helper_Assets

LLMS_Helper_Assets


Source Source

File: libraries/lifterlms-helper/includes/class-llms-helper-assets.php

class LLMS_Helper_Assets {

	/**
	 * Constructor
	 *
	 * @since 3.0.0
	 *
	 * @return void
	 */
	public function __construct() {

		add_action( 'admin_enqueue_scripts', array( $this, 'enqueue' ) );

	}

	/**
	 * Register, enqueue, & localize
	 *
	 * @since 3.0.0
	 *
	 * @return void
	 */
	public function enqueue() {

		$load   = false;
		$screen = get_current_screen();
		if ( 'lifterlms_page_llms-status' === $screen->id && isset( $_GET['tab'] ) && 'betas' === $_GET['tab'] ) {
			$load = true;
		} elseif ( 'lifterlms_page_llms-add-ons' === $screen->id ) {
			$load = true;
		}

		if ( ! $load ) {
			return;
		}

		wp_register_style( 'llms-helper', LLMS_HELPER_PLUGIN_URL . 'assets/css/llms-helper' . LLMS_ASSETS_SUFFIX . '.css', array(), LLMS_HELPER_VERSION );
		wp_enqueue_style( 'llms-helper' );

		wp_style_add_data( 'llms-sl', 'rtl', 'replace' );
		wp_style_add_data( 'llms-sl', 'suffix', LLMS_ASSETS_SUFFIX );

	}

}

Top ↑

Methods Methods


Top ↑

Changelog Changelog

Changelog
Version Description
3.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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