
內容簡介
WP-PluginsUsed 外掛可列出網站已安裝的外掛,並依據啟用與否分類,適用於任何文章或頁面。每次頁面加載時,外掛會即時讀取 wp-content/plugins,確保列表始終更新。
【主要功能】
• 提供三種短碼顯示外掛摘要、啟用與停用的外掛
• 每個外掛條目可連結到其專屬頁面及作者
• 可選擇顯示或隱藏版本號
• 可隱藏不想顯示的外掛
• 提供主題模板標籤直接調用外掛列表
外掛標籤
開發者團隊
原文外掛簡介
WP-PluginsUsed lists the plugins your site has installed, split into active and
inactive, on any post or page you like. It reads what is really in
wp-content/plugins every time the page is built, so the list never goes stale.
Features
Three shortcodes: a summary line, the active plugins and the inactive ones.
Each entry links to the plugin’s own page and to its author, with the description underneath.
Version numbers can be shown or left off.
Any plugin you would rather not advertise can be left out of both the listings and the counts.
A template tag for themes that would rather call it directly.
Donations
I spent most of my free time creating, updating, maintaining and supporting these plugins, if you really love my plugins and could spare me a couple of bucks, I will really appreciate it. If not feel free to use it without any obligations.
Usage
Creating a Plugins Used page
Go to WP-Admin -> Pages -> Add New
Type any title you like in the page’s title area
Copy and paste the following into the page’s content area:
[stats_pluginsused]
Active Plugins
[active_pluginsused]
Inactive Plugins
[inactive_pluginsused]
Click ‘Publish’
Showing The Listings In A Block
Three blocks are available in the editor, under Widgets:
Plugins Used Summary — the sentence counting what is installed, active and inactive, the same one [stats_pluginsused] produces.
Active Plugins Used — the plugins your site has switched on.
Inactive Plugins Used — the ones installed but switched off.
None of them has any settings, because none of the shortcodes has any either: which plugins appear is decided on the settings screen below, so the answer is the same on every page and there is nothing to configure per post.
All three render on the server, so the block preview in the editor is the real listing rather than an approximation, and installing, activating or hiding a plugin updates every page showing one without re-saving anything.
The shortcodes still work and are not going anywhere. [stats_pluginsused], [active_pluginsused] and [inactive_pluginsused] behave exactly as they always have, and a page already containing one needs no change. The blocks call the same code the shortcodes call, so the two render identically — use whichever suits the page.
Settings
Go to WP-Admin -> Settings -> WP-PluginsUsed to choose whether version numbers
are shown and to tick any plugins you would rather not list. Hidden plugins are
left out of the counts as well as the listings.
Template Tags
display_pluginsused( $type, $display ) renders one of the listings from a theme
template. $type is stats, active or inactive; pass true as $display
to echo instead of return.
Filters
wp_pluginsused_show_version — whether version numbers are appended to plugin names.
wp_pluginsused_hidden_plugins — array of plugin names to hide, matched against the plugin’s Plugin Name header.
wp_pluginsused_plugins_used — the collected listing, keyed by active and inactive, before it is rendered.
wp_pluginsused_capability — the capability required to reach the settings screen.
The first three were renamed in 2.0.0 and the old, unprefixed names do nothing.
See Upgrade Notice.
