跳到内容

Remove jQuery from Theme

v1.0

Marc Tönsing · 2021年3月9日 上架

Removes jQuery from your frontend theme if no administrator is logged-in. jQuery will still be loaded and continue to work in you backend and when the …

正在使用
100+
评分
5.0 / 5
累计下载
2,906
最近更新
2021年3月9日
1 条评价需要 WordPress 5.0+已测试到 5.6.24

贡献者

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

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums