這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

Disable Plugins

外掛說明

One of WordPress’ biggest bottlenecks is that it loads every single plugin that
is active on your WordPress installation on every single post/page no matter
whether they are needed for that post/page or not. This plugin will allow you
to create simple rewrite rules to exclude a plugin or plugins from any URI
pattern match. This is a great way to reduce the memory footprint, SQL queries
run at page load, load times, and improve site response speed.

This is NOT a normal WordPress plugin, but an mu (must use) plugin and requires
special installation instructions. Please see the installation section for more
information.

Requirements: PHP5+, WordPress 2.9.x+

安裝方式

Create a /wp-content/mu-plugins/disable-plugins-rules directory if the plugin
has not created one for you already. Create a rules file for each site your
WordPress installation is running, naming the file after the host name for
the site followed by a .rules extension. For example mywordpresssite.com.rules
would be a rules set for mywordpresssite.com.

Populate your rules using regular expression pattern matches and plugin base
names on each line of your rules file. For example, to exclude the Hello Dolly
and Akisment plugins from being loaded on your home page, you would write
a rules file that looks like:

# Prevent the Hello Dolly plugin from loading on the home page
^\/$ hello
# Prevent the Akisment plugin from loading on the home page
^\/$ akismet

You will need to write a rule for each plugin that will be excluded for each
pattern that you wish to exclude that plugin from. C style comments are
allowed in your rules file to document your rules.

常見問題集

Q. How do I format my exception rule?

This is pretty easy to do, just two pieces to each line – the regular expression pattern and the plugin’s basename (usually the folder or file name of the plugin). See the installation section for an example of how this might look.

Q. Will this work on a multisite installation?

This plugin is made to run with multisite in mind, but it has not been tested with a multisite installation yet.

Q. How do you write regular expressions and do you have any good tools for writing them?

If you’re asking this question, you may want to consider a different plugin to help manage your site’s plugin use, but you can check out the following resources:

Unfortunately, I really can’t do much support for this plugin, but time permitting I will continue to develop it. I am considering an admin interface for easier management, but thats down the road a bit.

使用者評論

這個外掛目前沒有任何使用者評論。

參與者及開發者

以下人員參與了開源軟體〈Disable Plugins〉的開發相關工作。

參與者

將〈Disable Plugins〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

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

變更記錄

1.0.1

  • Update compatible to version number

1.0.0

  • Initial release