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

WP Enqueue Inline Style

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

by Kyle Reicks · github.com/kylereicks/wp-enqueue-inline-style

3stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/kylereicks/wp-enqueue-inline-style/archive/refs/heads/master.zip

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');