LoadGate Forge

描述

Most sites run a few plugins that are only needed on one or two pages: a form plugin used on the contact page, a gallery plugin used in the portfolio, a chat widget you only want on the homepage. Loading all of them on every request is wasted work.

LoadGate Forge lets you say “do not load this plugin on these URLs” and takes it off those requests entirely, so the code never runs there.

  • Pick a URL path and the plugins that should sit out on it.
  • Match by “contains”, “starts with”, or an exact path.
  • A master switch turns every rule off in one click.
  • Nothing is deleted and nothing is permanent. Clear a rule and the plugin loads normally again.

To take a plugin off a request, the decision has to happen before WordPress loads plugins. LoadGate Forge does that through a small must-use loader it installs for you on activation, and removes when you deactivate.

What it does not touch

Rules only ever apply to normal front-end page views. The admin area, the login screen, REST API calls, cron and WP-CLI are always left with every plugin active, so you cannot lock yourself out of the dashboard.

Good to know

  • Matching happens before the page template is known, so rules are based on the request URL, not on conditional tags like is_page().
  • Disabling a plugin that builds a page will break that page. Test each URL after you save a rule.
  • Single-site installs. Multisite network activation is not supported yet.

螢幕截圖

安裝

  1. Upload the loadgate-forge folder to /wp-content/plugins/, or install it from the Plugins screen.
  2. Activate the plugin. It installs its loader into wp-content/mu-plugins/.
  3. Go to Settings then LoadGate Forge and add your first rule.

If you see a warning that the loader could not be installed, make sure wp-content/mu-plugins/ exists and is writable, then reactivate.

常見問題

Will this break my admin area?

No. Rules never apply to admin, login, REST or cron requests. Even a rule that matches everything only affects front-end page views.

What happens to a plugin I disable on a page?

Its code simply does not load for that request, as if it were deactivated, but only there. On every other URL it runs as usual. Remove the rule and it loads everywhere again.

Why URL paths instead of “this page” or “posts in this category”?

The choice of which plugins to load happens very early, before WordPress has worked out which page you asked for. At that point the request URL is all there is to go on, so rules match the URL.

It says the loader could not be installed.

LoadGate Forge needs to write one file into wp-content/mu-plugins/. On most hosts that works automatically. If the folder is missing or not writable, create it and make it writable, then deactivate and reactivate the plugin.

Does it work on multisite?

Not yet. This first version targets single-site installs.

評價

There are no reviews for this plugin.

貢獻者及開發者

“LoadGate Forge” 是一個開源的軟體。以下的人對這個外掛作出了貢獻。

貢獻者

將 LoadGate Forge 外掛本地化為台灣繁體中文版。

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄。

修改日誌

1.1.0

  • New: each rule can now target a device. Alongside the URL match, choose “mobile only” or “desktop only” so a plugin is held back just for phones or just for desktops, which is handy for heavy sliders, chat widgets or trackers you only want on one. “Any device” keeps the old behaviour.

1.0.0

  • First release: per-URL plugin disabling through an auto-installed must-use loader, with match types, a master switch, and admin, login, REST and cron always excluded.