WP Manifestindependent plugin directory
manifest / performance / wp-enqueue-deferred-style

WP Enqueue Deferred Style

A WordPress plugin to defer CSS to the footer.

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

0stars
1forks

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-deferred-style/archive/refs/heads/master.zip

A WordPress plugin to defer CSS to the footer.

Functions

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

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

Use

Add a deferred style

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

Register a deferred style to be enqueued later

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

Register an existing style as deferred

wp_register_deferred_style('existing-style');