跳至主要內容
WordPress.org

Taiwan 正體中文

  • 佈景主題目錄
  • 外掛目錄
  • 最新消息
  • 技術支援
  • 關於我們
  • 團隊
  • 取得 WordPress
取得 WordPress
WordPress.org

Plugin Directory

MetaBench

  • 提交外掛
  • 我的最愛
  • 登入
  • 提交外掛
  • 我的最愛
  • 登入

MetaBench

由 Silver222 開發
下載
  • 詳細資料
  • 使用者評論
  • 安裝方式
  • 開發資訊
技術支援

外掛說明

MetaBench replaces the cramped core Custom Fields box with a panel built for
sites that actually have a lot of metadata.

  • Search across both keys and values, with matches highlighted as you type.
  • Filter by value type — text, number, long text, array, JSON or empty.
  • Sort by key, by value size, or by raw database order.
  • Edit in place, with a textarea for long values and JSON editing for
    serialised arrays.
  • Rename, create and delete fields, each independently switchable.
  • Works on posts and terms, on whichever post types and taxonomies you
    enable.
  • Works in the block editor and the classic editor with no duplicated UI.

Permissions

For ordinary meta keys, every read and write goes through the per-key
capabilities that core derives from register_meta() auth callbacks. A user who
cannot edit such a field through core cannot edit it through MetaBench either.

Protected keys — those beginning with an underscore, where ACF, SEO plugins and
WooCommerce keep their data — work differently, and the difference is worth
understanding.

map_meta_cap() denies `edit_post_meta` on a protected key for *every* role,

including administrators, unless a plugin has registered an auth_..._meta_...
filter for that specific key. That blanket denial is aimed at untrusted REST and
XML-RPC callers, and it makes the core capability unusable as a gate for a
deliberate administrative tool.

MetaBench therefore gates protected keys separately. They are listed and
editable only when both:

  1. “Show protected fields” is switched on in the settings, and
  2. the user holds manage_options (filterable via
    metabench_protected_capability).

This is an intentional step past the core denial, kept as narrow and explicit as
possible. If you do not want that behaviour on your site, leave the setting off
— which is the default — and MetaBench will never touch a protected key.

Translations

MetaBench ships translated into German, Spanish, French, Italian, Japanese,
Dutch, Polish, Brazilian Portuguese, Russian, Ukrainian and Simplified Chinese,
covering all 119 translatable strings.

Every string the JavaScript panel displays is defined in PHP and handed to the
browser through wp_localize_script(), so the whole interface translates from a
single .po file with no JavaScript build step and no separate JSON language
packs.

To retranslate or add a locale, edit the .po file in languages/ with Poedit
or any gettext editor, then recompile:

wp i18n make-mo languages/ languages/
wp i18n make-php languages/

After changing translatable strings in the source, regenerate the template with
wp i18n make-pot . languages/metabench.pot –domain=metabench.

For developers

Filters:

  • metabench_settings — the effective settings array.
  • metabench_required_capability — the capability gating the panel.
  • metabench_protected_capability — the capability gating protected keys.
  • metabench_available_post_types / metabench_available_taxonomies — the
    choices offered on the settings screen.
  • metabench_get_items — the rows returned for an object.
  • metabench_validate_key — return a WP_Error to block a write.

REST routes, all under metabench/v1:

  • GET /fields/<object_type>/<object_id>
  • POST /fields/<object_type>/<object_id>
  • POST /fields/<object_type>/<object_id>/<meta_id>
  • DELETE /fields/<object_type>/<object_id>/<meta_id>

安裝方式

  1. Upload the metabench folder to /wp-content/plugins/.
  2. Activate the plugin through the Plugins screen.
  3. Visit Settings → MetaBench and enable the post types and taxonomies you
    want the panel on.

常見問題集

Do changes save when I update the post?

No. Each field saves immediately over the REST API, independently of the post.
That means you can fix one meta value without publishing unrelated draft edits,
but it also means there is no undo — the panel says so beneath the table.

Why can I not see my ACF fields?

ACF stores its values in protected keys beginning with an underscore. Enable
“Show protected fields” under Settings → MetaBench, and note that only users
with manage_options will see them. Editing those by hand can desynchronise
ACF’s own field references, so change them only when you know what a key does.

Why is one of my fields read only?

Either you lack the capability for that key, or the stored value is a
serialised PHP object. Objects cannot round-trip through the JSON editor
without risking data loss, so MetaBench shows them but refuses to write them.

Does it handle duplicate meta keys?

Yes. Rows are addressed by meta_id, so several rows sharing one key are
listed and edited individually rather than collapsed into one.

使用者評論

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

參與者及開發者

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

參與者
  • Silver222

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

對開發相關資訊感興趣?

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

變更記錄

1.0.1

  • Hardened deserialization of stored meta values so a protected-key payload
    can no longer instantiate arbitrary PHP objects on read.
  • Corrected a docblock that claimed object-cache caching the code doesn’t do.

1.0.0

  • Initial release.

中繼資料

  • 版本 1.0.1
  • 最後更新 1 個月前
  • 啟用安裝數 少於 10 次
  • WordPress 版本需求 6.0 或更新版本
  • 已測試相容的 WordPress 版本 7.0.5
  • PHP 版本需求 7.4 或更新版本
  • 語言
    English (US)
  • 標籤:
    custom fieldsdevelopermetadatapost metaterm-meta
  • 進階檢視

評分

這個項目尚無任何評論記錄。

撰寫評分

查看全部使用者評論

參與者

  • Silver222

技術支援

使用者可在技術支援論壇提出意見反應或使用問題。

檢視技術支援論壇

  • 關於我們
  • 最新消息
  • 主機代管
  • 隱私權
  • 展示網站
  • 佈景主題目錄
  • 外掛目錄
  • 區塊版面配置目錄
  • Learn
  • 技術支援
  • 開發者資源
  • WordPress.tv ↗
  • 共同參與
  • 活動
  • 贊助基金會 ↗
  • Swag ↗
  • WordPress.com ↗
  • Matt ↗
  • bbPress ↗
  • BuddyPress ↗
WordPress.org
WordPress.org

Taiwan 正體中文

  • 查看我們的 X (之前的 Twitter) 帳號
  • 造訪我們的 Bluesky 帳號
  • 造訪我們的 Mastodon 帳號
  • 造訪我們的 Threads 帳號
  • 造訪我們的 Facebook 粉絲專頁
  • Visit our Instagram account
  • Visit our LinkedIn account
  • 造訪我們的 TikTok 帳號
  • Visit our YouTube channel
  • 造訪我們的 Tumblr 帳號
程式碼,如詩
The WordPress® trademark is the intellectual property of the WordPress Foundation.