Linux 软件免费装
Banner图

Code Unloader

开发者 dalibord
更新时间 2026年3月24日 20:50
PHP版本: 8.0 及以上
WordPress版本: 6.9
版权: GPL-2.0-or-later
版权网址: 版权信息

标签

performance styles scripts assets dequeue

下载

1.4.1

详情介绍:

[youtube https://youtu.be/abCdOEl1cxg] Official plugin homepage: https://wpservice.pro/our-products/code-unloader/ Code Unloader gives site administrators surgical control over which JavaScript and CSS files are loaded on each individual page or post. Key Features: Compatible with: WP Rocket, W3 Total Cache, LiteSpeed Cache, WP Super Cache, WooCommerce, Elementor, Divi, WP Bakery, basically everything WP related. Requirements: PHP 8.0 or higher is required. The plugin uses modern PHP features (union types, match expressions, named functions) that are not available in PHP 7.x. Note: It's recommended to test changes on a staging environment before applying them to a live site. Unloading the wrong assets can break your site's appearance or functionality.

安装:

  1. Upload the plugin files to /wp-content/plugins/code-unloader
  2. Activate the plugin through the Plugins screen in WordPress
  3. Visit any page while logged in as an admin and click ⚡ Assets in the Admin Toolbar
  4. Toggle off any asset — a rule creation dialog will appear

屏幕截图:

  • Rule creation dialog with match type, device, and condition options
  • Global admin screen — Rules tab
  • Admin screen — Groups tab
  • Admin screen — Audit Log tab
  • Admin screen — Settings tab with kill switch

升级注意事项:

1.1.0 Panel persistence and inline block detection fixes. Bump to v1.1.0 recommended.

常见问题:

What PHP version do I need?

PHP 8.0 or higher. The plugin will not activate on PHP 7.x.

Will my rules survive a cache flush?

Yes. Rules are stored in a custom database table and are not affected by caching plugin cache clears.

What is the kill switch?

The kill switch is a one-click emergency recovery button in Settings > Code Unloader > Settings. When active, all rules are bypassed and every asset loads normally. Your rules are not deleted — they resume when you deactivate the kill switch.

What does the ?wpcu parameter do?

Appending ?wpcu to any frontend URL will automatically open the asset panel for logged-in administrators, even on pages where the Admin Toolbar is hidden. The parameter stays in the URL while the panel is open and is removed when you close it.

What does the ?nowpcu parameter do?

Appending ?nowpcu to any frontend URL disables all Code Unloader rules for that single request — the page loads exactly as if the plugin were not active. This follows the same convention as ?nowprocket (WP Rocket) and ?ao_noptimize=1 (Autoptimize). Useful for testing, debugging, or performance scanning tools that need to measure the raw unoptimized asset baseline.

Does it support regex?

Yes. When creating a rule, choose Regular Expression as the match type. Patterns are validated before saving, and a regex warning is shown to help you keep patterns specific.

What are inline blocks?

Inline blocks are <script> and <style> tags that are printed directly into the page HTML rather than being registered through WordPress's enqueue system. The Inline Blocks tab in the panel detects and lists these blocks so you can identify them.

更新日志:

1.4.1 1.4.0 1.3.9 1.3.8 1.3.7 1.3.6 1.3.5 1.3.4 1.3.3 1.3.2 1.3.1 1.3.0 1.2.5 1.2.4 1.2.3 1.2.2 1.2.1 1.2.0 1.1.9 1.1.8 1.1.7 1.1.6 1.1.5 1.1.4 1.1.3 1.1.2 1.1.0 1.0.0