LLMS_Blocks_Assets::__construct()

Constructor


Return Return

(void)


Top ↑

Source Source

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

	public function __construct() {

		// Load an instance of the LLMS_Assets class.
		$this->assets = new LLMS_Assets(
			'llms-blocks',
			array(
				// Base defaults shared by all asset types.
				'base'   => array(
					'base_file' => LLMS_BLOCKS_PLUGIN_FILE,
					'base_url'  => LLMS_BLOCKS_PLUGIN_DIR_URL,
					'version'   => LLMS_BLOCKS_VERSION,
					'suffix'    => '', // Only minified files are distributed.
				),
				// Script specific defaults.
				'script' => array(
					'translate' => true, // All scripts in the blocks plugin are translated.
				),
			)
		);

		// Define plugin assets.
		$this->define();
		$this->define_bc();

		// Enqueue editor assets.
		add_action( 'enqueue_block_editor_assets', array( $this, 'editor_assets' ), 5 );

	}


Top ↑

Changelog Changelog

Changelog
Version Description
2.1.0 Adjust editor_assets() priority from 999 to 5.
2.0.0 Maybe define backwards compatibility script.
1.8.0 Stop outputting editor CSS on the frontend.
1.10.0 Load LLMS_Assets and define plugin assets.
1.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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