| 开发者 |
wppoland
motylanogha |
|---|---|
| 更新时间 | 2026年10月30日 19:34 |
| PHP版本: | 8.1 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPL-2.0-or-later |
| 版权网址: | 版权信息 |
wp_dequeue_script / wp_dequeue_style), so there is no page-builder lock-in and nothing proprietary to learn.
What it does
/wp-content/plugins/pagelean, or install it from the Plugins screen.Visit a few pages of your site while logged in as an administrator. Pagelean records the scripts and styles each page loads and offers them as autocomplete in the Handle field, with the file each one loads. You can still look it up by hand: the id attribute of a <script> / <link> tag usually ends in -js or -css, and the handle is that value without the suffix.
With test mode on, the rules run only for logged-in users who can manage options (administrators). Every other visitor gets the page with all its scripts and styles. Check your pages, then turn test mode off to apply the rules to everyone. A notice in the admin reminds you while it is on.
Dequeue (the default) takes the handle off the page, but WordPress still prints it when another script on that page depends on it, so nothing breaks. "Also deregister" removes the handle from WordPress entirely for that request: it is gone even as a dependency, and every script that depends on it is dropped too. Use it only when you know nothing on the page needs the handle.
Only to the two single posts/pages conditions. The other conditions (everywhere, front page, blog index, mobile, desktop) decide from the request alone, so the IDs box is greyed out for them and a rule set that way removes the handle on every page it matches.
It only removes what you configure. A dequeued handle that another script depends on is still printed for that script; with "Also deregister" ticked, scripts that depend on it are dropped as well. Use test mode to check the result before visitors see it. Change one rule at a time and verify the front end. You can remove a rule to restore the asset instantly.
Yes. It uses WordPress core functions only and works on any theme.
No. Rules apply on the front end only.