BACK TO DIRECTORY

Remove jQuery from Theme

by Marc Tönsing

5.0
(1 ratings)

Removes jQuery from your frontend theme if no administrator is logged-in. jQuery will continue to work in you backend and when the admin toolbar is visible. Plugins which depend on jQuery will not be loaded either.

This plugin does nothing more but this:

function init_without_jquery() {
    if (!is_admin() AND !is_admin_bar_showing()) {
        wp_deregister_script('jquery');
        wp_register_script('jquery', false);
    }
}

add_action('init', 'init_without_jquery');

Plugin Details

Active Installs
100
Total Downloads
2,686
Version
1.0
Requires WP
5.0
Requires PHP
Tested Up To
5.6.19
Added
2021-03-09
Last Updated
2021-03-09 11:22am GMT

Ratings

5
1
4
0
3
0
2
0
1
0

Tags