Title: Remove jQuery from Theme
Author: Marc Tönsing
Published: <strong>2021 年 3 月 9 日</strong>
Last modified: 2021 年 3 月 9 日

---

搜索插件

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://s.w.org/plugins/geopattern-icon/remove-jquery.svg)

# Remove jQuery from Theme

 作者：[Marc Tönsing](https://profiles.wordpress.org/marcdk/)

[下载](https://downloads.wordpress.org/plugin/remove-jquery.zip)

 * [详情](https://cn.wordpress.org/plugins/remove-jquery/#description)
 * [评价](https://cn.wordpress.org/plugins/remove-jquery/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/remove-jquery/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/remove-jquery/#developers)

 [支持](https://wordpress.org/support/plugin/remove-jquery/)

## 描述

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

## 安装

Remove jQuery can be found and installed via the Plugin menu within WordPress administration(
Plugins -> Add New). Alternatively, it can be downloaded from WordPress.org and 
installed manually…

## 常见问题

### Why did you do this?

Because I needed a simple plugin to do this job and decided to do it on his own.
WordPress frontends are is much faster without jQuery.

### jQuery is still loading! The plugin does not work!

You are most likely logged-in as administrator and the admin topbar is visible. 
Many plugins rely on jQuery for backend features. So I kept it enabled for the admin
topbar, too.

## 评价

![](https://secure.gravatar.com/avatar/646a9b3e06d09e33f6820c51be9c9459e1df4e57e9f76e0c2e8e95b6ff861ef9?
s=60&d=retro&r=g)

### 󠀁[Does what it promises. Perfectly!!!](https://wordpress.org/support/topic/does-what-it-promises-perfectly/)󠁿

 [acelerawp](https://profiles.wordpress.org/acelerawp/) 2021 年 4 月 12 日

Thank You so much to the developer for this useful plugin. All the Best, Miguel

 [ 阅读所有1条评价 ](https://wordpress.org/support/plugin/remove-jquery/reviews/)

## 贡献者及开发者

「Remove jQuery from Theme」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ Marc Tönsing ](https://profiles.wordpress.org/marcdk/)

[帮助将「Remove jQuery from Theme」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/remove-jquery)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/remove-jquery/)，查看
[SVN仓库](https://plugins.svn.wordpress.org/remove-jquery/)，或通过[RSS](https://plugins.trac.wordpress.org/log/remove-jquery/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/remove-jquery/)。

## 更新日志

#### 1.0

 * Initial version.

## 额外信息

 *  版本 **1.0**
 *  最后更新：**5 年前**
 *  活跃安装数量 **100+**
 *  WordPress 版本 ** 5.0 或更高版本 **
 *  已测试的最高版本为 **5.6.17**
 *  语言
 * [English (US)](https://wordpress.org/plugins/remove-jquery/)
 * 标签
 * [jquery](https://cn.wordpress.org/plugins/tags/jquery/)
 *  [高级视图](https://cn.wordpress.org/plugins/remove-jquery/advanced/)

## 评级

 5 星（最高 5 星）。

 *  [  1 条 5 星评价     ](https://wordpress.org/support/plugin/remove-jquery/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/remove-jquery/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/remove-jquery/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/remove-jquery/reviews/?filter=2)
 *  [  0 条 1 星评价     ](https://wordpress.org/support/plugin/remove-jquery/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/remove-jquery/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/remove-jquery/reviews/)

## 贡献者

 *   [ Marc Tönsing ](https://profiles.wordpress.org/marcdk/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/remove-jquery/)

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](https://marc.tv/out/donate)