LLMS_Assets::enqueue_style( string $handle )

Enqueue (and maybe register) a defined stylesheet


Description Description

If the stylesheet has not yet been registered, it will be automatically registered.

The stylesheet must be defined in one of the following places:

  • The stylesheet definition list found at includes/assets/llms-assets-styles.php
  • Added to the definitions list via the LLMS_Assets::define() method.
  • Added to the definition list via the llms_get_style_asset_definitions filter
  • Added "just in time" via the llms_get_style_asset filter.

If the stylesheet is not defined this function will return false because registration will fail.


Top ↑

Parameters Parameters

$handle

(string) (Required) The stylesheets's handle.


Top ↑

Return Return

(boolean)


Top ↑

Source Source

File: includes/class-llms-assets.php

	 * @return boolean
	 */
	public function enqueue_style( $handle ) {

		// Style was not registered and registration failed.
		if ( ! wp_style_is( $handle, 'registered' ) && ! $this->register_style( $handle ) ) {
			return false;
		}

		wp_enqueue_style( $handle );

		return wp_style_is( $handle, 'enqueued' );


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.