All features
Cherry Blossom feature
Frontend Enqueues: Style base
Registers stylesheets with WordPress and tracks their enqueue lifecycle.
Registers stylesheets with WordPress and tracks their enqueue lifecycle.
Capabilities and extension points
Assigns file and/or minified file to the object.
This method is used to define the files.
- param string|false $file Unminified file URL.
- param string|false $file_minified Minified file URL.
- throws \Exception If neither a minified nor a regular file is defined.
Sets the file locations for the object.
- param string|null $location Unminified file location.
- param string|null $location_minified Minified file location.
Registers the style with WordPress.
We register and enqueue styles separately. This gives us more control over the enqueues. It also means we can optionally enqueue the same style multiple times. This is useful for single-component stylesheets, for example.
- return self
Enqueues the style with WordPress.
If the style was not registered, this also registers it.
- return self
Deregisters the style when this object registered it.
- return self Current style object for method chaining.
Filters the style registration arguments.
The handle-specific filter runs first, followed by the generic filter. Both receive the current arguments, original arguments, and style handle.
- param array $args Enqueue arguments.
- return array Enqueue arguments.
Source reference
This editable reference page is based on the PHP documentation in frontend/enqueues/abstract-style.php.