Styles Handler
The styles handler exposes the following public methods:
register_public_stylefor adding a style to the internal frontend registration queuederegister_public_stylefor removing a style from the internal frontend registration queueenqueue_public_stylefor adding a style to the internal frontend enqueueing queuedequeue_public_stylefor removing a style from the internal frontend enqueueing queueregister_admin_stylefor adding a style to the internal admin-side registration queuederegister_admin_stylefor removing a style from the internal admin-side registration queueenqueue_admin_stylefor adding a style to the internal admin-side enqueueing queuedequeue_admin_stylefor removing a style from the internal admin-side enqueueing queueadd_inline_stylefor registering a CSS string to be outputted before or after another enqueued file
The methods follow almost 1-to-1 the WP scripts API, in particular the wp_register_style function, the wp_enqueue_style function, and the wp_add_inline_style function.
As mentioned on the Assets Service page, the handler will automatically attempt to register/enqueue the minified version of your script (if it exists in the same folder and has the .min.css extension) and will attempt to set the file version to the result of the PHP filemtime function.
Last updated
Was this helpful?