manifest / performance / wp-enqueue-deferred-style
WP Enqueue Deferred Style
A WordPress plugin to defer CSS to the footer.
★ 0stars
Install
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-deferred-style/archive/refs/heads/master.zipNo 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 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');