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_definitionsfilter - Added "just in time" via the
llms_get_style_assetfilter.
If the stylesheet is not defined this function will return false because registration will fail.
Parameters Parameters
- $handle
-
(string) (Required) The stylesheets's handle.
Return Return
(boolean)
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' );
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 4.4.0 | Introduced. |