WP Manifestindependent plugin directory
manifest / developer / wp-enqueue-inline-style

WP Enqueue Inline Style

A WordPress plugin to add inline CSS in the `<head>`.

★ 3stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/kylereicks/wp-enqueue-inline-style/archive/refs/heads/master.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

A WordPress plugin to add inline CSS in the <head>.

Functions

wp_register_inline_style($handle, $src = '', $deps = array(), $ver = false, $media = 'all')

wp_enqueue_inline_style($handle, $src = '', $deps = array(), $ver = false, $media = 'all')

Use

Add an inline style

wp_enqueue_inline_style('priority-style', 'http://www.site.com/path/to/style/priority-style.css', array(), '1.0', 'all');

Register an inline style to be enqueued later

wp_register_inline_style('priority-style', 'http://www.site.com/path/to/style/priority-style.css', array(), '1.0', 'all');

Register an existing style as inline

wp_register_inline_style('existing-style');