跳到内容

Massbase Custom Fields

v1.1.0

WP Mass · 2026年11月20日 上架

Database-first custom fields: every field group gets its own indexed table instead of post meta. Plus post types, taxonomies and site-wide data.

正在使用
10 以下
评分
暂无
累计下载
122
最近更新
2026年11月20日
需要 WordPress 6.9+已测试到 7.1.5PHP 8.1+

贡献者

截图

Classic custom fields keep two rows per field and post in wp_postmeta, as text. Massbase Custom Fields keeps one row per post in a table of its own, with typed columns and indexes.
Classic custom fields keep two rows per field and post in wp_postmeta, as text. Massbase Custom Fields keeps one row per post in a table of its own, with typed columns and indexes.
The field builder: name, key and type of every field, choices edited inline, and the column count of the group's table.
The field builder: name, key and type of every field, choices edited inline, and the column count of the group's table.
Location rules: show a field group on posts, pages, custom post types, users, terms, menus, comments, widgets or options pages.
Location rules: show a field group on posts, pages, custom post types, users, terms, menus, comments, widgets or options pages.
Table health: the group's own table, its size, row count and status.
Table health: the group's own table, its size, row count and status.
A field group on the post edit screen, with tabs, a range slider and the field type shown next to each field.
A field group on the post edit screen, with tabs, a range slider and the field type shown next to each field.
Repeater with row numbers, collapse, duplicate, drag and drop sorting and a row limit, free.
Repeater with row numbers, collapse, duplicate, drag and drop sorting and a row limit, free.
Create custom post types and taxonomies without code.
Create custom post types and taxonomies without code.
Global Data: site-wide values such as a phone number or an address, reusable in templates, blocks and page builders.
Global Data: site-wide values such as a phone number or an address, reusable in templates, blocks and page builders.

Massbase Custom Fields stores field values in real database tables, one table per field group and one column per field, instead of thousands of rows in wp_postmeta. Queries stay fast, values are typed (numbers are numbers, dates are dates), and you can index the columns you filter by.

Field groups

  • 30+ field types: text, text area, number, range, email, URL, password, color, select, radio buttons, checkboxes, button group, true / false, date, date and time, time, link, WYSIWYG editor, oEmbed, image, file, icon, map (OpenStreetMap or Google Maps), group, repeater, relationship, post object, page link, taxonomy, user, accordion and tab.
  • Attach groups to posts, pages and custom post types, users, terms, comments and widgets with location rules.
  • Per-field SQL control: column type, length, charset, collation, unique and regular indexes, and generated values (UUID, hash, timestamp, …).
  • Validation rules and conditional logic on the edit screen.
  • Safe schema changes: renames keep data, risky type changes keep a backup column, removed fields never drop data.
  • Schema health: see drift between the definition and the table, import orphan columns, clean up orphan tables.

Post types and taxonomies

Create and edit custom post types and taxonomies without code: labels, visibility, menus, URLs and rewrites, archives, REST API, capabilities and supported features.

Options pages

Create settings screens (top level or under Settings, Appearance, Tools, …) and show any field group on them. Read the values with wpmcf_get_option_field( 'group', 'field' ), the [wpmcf_field context="options"] shortcode, blocks and page builders.

Import, export and migration

  • Export and import field groups, post types, taxonomies and options pages as JSON, with a preview before anything is saved.
  • Local JSON: create a wpmcf-json folder in your theme and every definition is saved there too, ready for version control; changes from another site show up under Tools › Local JSON.
  • Migrate from Advanced Custom Fields: field groups, options pages, post types, taxonomies and the saved values of posts, terms, users, comments and options are copied in the background. ACF data is never changed.
  • ACF compatibility: after a migration, theme code that calls get_field(), the_field(), have_rows(), update_field() or the [acf] shortcode keeps working on the migrated fields once ACF is deactivated. Tools › ACF lists where your code still calls ACF, with the replacement code.
  • Page caches of WP Rocket, LiteSpeed Cache, W3 Total Cache, WP Super Cache, WP Fastest Cache, SiteGround Optimizer, Breeze and WP Engine are cleared after options, Global Data and field group changes (can be turned off in Settings).
  • WP-CLI: wp wpmcf export, wp wpmcf import, wp wpmcf json sync, wp wpmcf acf migrate.

Global Data

Site-wide values (phone number, address, opening hours, …) you can print anywhere.

Variables

A small, safe template language: {{ glb.phone }}, {{ fg.product.price | number(2) }}, {{ wp.post_title | upper }}. Use it in field values, placeholders and Global Data. Only whitelisted functions and filters run; no PHP is ever evaluated. Expressions in post and user field values run only when the post’s author (or that user) may post unfiltered HTML, never in comment fields, and password fields and password Global Data never appear in their output.

Output

  • [wpmcf_field group="product" field="price"] and [wpmcf_global key="phone"] shortcodes.
  • wpmcf_get_field(), wpmcf_the_field(), wpmcf_has_field() and wpmcf_format_field() (the display text) for themes.
  • A public PHP API for site builders and themes: read field groups, fields, post types, taxonomies and options pages, and create or update them from an export document (wpmcf_get_field_groups(), wpmcf_save_definitions(), …).
  • Number format for number and range fields: decimal places and a thousands separator in the site language; the field’s prefix and suffix (for example a currency sign) are shown with it everywhere.
  • REST API and WPGraphQL: per field group, values appear under wpmcf in the REST API of its post types (editable by users who can edit the post) and, with the WPGraphQL plugin, as a read-only wpmcf{Group} field.
  • Blocks: a “Massbase Field” block (text, link or image, works in query loops), a “Massbase” Block Bindings source for paragraphs, headings, buttons and images (values of the post, its author, the term of a term template or archive, or an options page) and a “Massbase Global Data” Block Bindings source.
  • Page builders: dynamic tags for Elementor Pro, Bricks, Divi 4, Breakdance and Oxygen Classic; with Elementor (free is enough) a “Field” widget, {{ }} variables in any widget’s text and links, and display conditions set up in Pro keep working.

Pro

Massbase Custom Fields Pro is a separate plugin, sold at wpmass.com. Everything described above is part of this free plugin and works without it. Pro adds:

  • Advanced fields: gallery, flexible content and clone.
  • Admin columns: filters, quick and bulk edit and CSV export of lists.
  • Data tables: standalone database tables you can fill by CSV import, a scheduled Google Sheets link or front-end forms, browse and edit in the admin, export as CSV and show on your site with a shortcode or block.
  • WooCommerce order fields: field groups on the order edit screen (HPOS and classic order storage), shown for all orders or by order status, readable in templates and emails with wpmcf_get_order_field().
  • Front-end forms: create and edit posts, edit the profile, register users, file uploads, spam protection without a CAPTCHA. Submissions of Contact Form 7, Gravity Forms, WPForms and Fluent Forms can be saved into a data table.
  • Page builder widgets: repeater, gallery, post grid and form widgets and display conditions for Elementor, styled with the builder’s own design controls.
  • Programmatic SEO: generate thousands of pages from your own data (CSV upload, Google Sheets link, or your posts, terms and WooCommerce products), with a quick start, SEO plugin and sitemap integration, and conversion of generated pages into regular posts.
  • AI content for generated pages with your own API key (OpenAI, Anthropic or Google Gemini).

External services

The plugin connects to outside services only for Map fields, oEmbed fields and, if you opt in, Freemius (usage data).

Map fields: nothing is contacted until a Map field is shown, and nothing is sent by your server: the visitor’s or editor’s browser makes these requests, so the service also receives that browser’s IP address and user agent.

oEmbed providers (oEmbed fields)
When an oEmbed field with a URL is shown, your server asks the provider of that URL for its embed code through WordPress’s built-in oEmbed support. Only the providers WordPress itself lists (for example YouTube, Vimeo, Spotify) are asked; a URL of any other site is shown as a plain link and that site is never contacted. Sent: the URL the editor entered. The plugin caches the embed code for a day, and filters it before it is printed. While an editor types the URL, the edit screen shows a preview through WordPress’s own oEmbed proxy, asking the same providers only, and loads the provider’s thumbnail image in the editor’s browser. Each provider’s own terms and privacy policy apply, for example YouTube Terms and Vimeo Terms.

OpenStreetMap tiles (default map provider)
Map images for Map fields on edit screens and on your site are loaded from tile.openstreetmap.org, operated by the OpenStreetMap Foundation. Sent: the tile coordinates of the visible map area (which reveal the location being viewed) and the page address as referrer. Tile usage policy, Terms of use, Privacy policy.

Nominatim address search (default map provider)
When an editor types an address into a Map field and presses Search or Enter, the search text is sent to nominatim.openstreetmap.org to find matching places. No request is made while typing, and at most one per second. Usage policy, Privacy policy.

Google Maps (only when selected in Settings › Maps with an API key)
The Google Maps JavaScript API is loaded from maps.googleapis.com with your API key to show maps and, on edit screens, to look up searched addresses (the search text is sent on Search or Enter). Google receives the map area viewed, the search text and the API key. OpenStreetMap is not contacted in this mode. Google Maps Platform Terms of Service, Google Privacy Policy.

Freemius (opt-in usage data)
Massbase Custom Fields uses the Freemius SDK. After activation you are asked whether to share basic usage data; nothing is sent unless you opt in. If you opt in, your server sends api.freemius.com the site URL, WordPress, PHP and plugin versions, the site language, the admin’s name and email address, and the plugin’s activation, deactivation and uninstall events. The buy and trial links of the Pro page open the Freemius checkout of the separate Pro plugin; nothing is sent until you open one. What Freemius receives and how it is used, with links to the Freemius Terms of Service and Privacy Policy: Massbase Custom Fields privacy notice.

Source code and libraries

The complete, human-readable source code of every compiled file ships inside this plugin. Nothing is downloaded from elsewhere to build it.

  • Compiled JavaScript and CSS: assets/js/build/ (minified by @wordpress/scripts, which uses webpack).
  • Their sources: assets/js/ in TypeScript and React (.ts, .tsx) and CSS.
  • Build configuration: package.json, package-lock.json, webpack.config.js, tsconfig.json, tailwind.config.js, postcss.config.js.

Each compiled file and its source (every entry point is listed in webpack.config.js; a .asset.php file next to a script only lists its WordPress dependencies):

  • assets/js/build/dashboard.js from assets/js/dashboard/index.tsx
  • assets/js/build/field-groups.js from assets/js/field-groups/index.tsx
  • assets/js/build/global-data.js from assets/js/global-data/index.tsx
  • assets/js/build/options-pages.js from assets/js/options-pages/index.tsx
  • assets/js/build/post-type.js from assets/js/post-type/index.tsx
  • assets/js/build/taxonomies.js from assets/js/taxonomies/index.tsx
  • assets/js/build/tools.js from assets/js/tools/index.tsx
  • assets/js/build/plans.js from assets/js/plans/index.tsx
  • assets/js/build/settings.js from assets/js/settings/index.tsx
  • assets/js/build/setup.js from assets/js/setup/index.tsx
  • assets/js/build/blocks.js from assets/js/blocks/index.ts
  • assets/js/build/edit-screen.js from assets/js/edit-screen/index.ts
  • assets/js/build/field-types.js and field-types.css from assets/js/field-types/index.ts
  • assets/js/build/map-field.js and map-field.css from assets/js/map/field.ts
  • assets/js/build/map-view.js and map-view.css from assets/js/map/view.ts
  • assets/js/build/map-block.js from assets/js/blocks/map/view.ts
  • assets/js/build/map-provider.js from assets/js/map/provider.ts (loaded on demand)
  • assets/js/build/map-leaflet.js and map-leaflet.css from assets/js/map/leafletMap.ts (loaded on demand)
  • assets/js/build/481.js and assets/js/build/images/ from the Leaflet 1.9.4 npm package (node_modules/leaflet, source: https://github.com/Leaflet/Leaflet)
  • assets/js/build/admin-style.css and admin-style.js from assets/js/admin-style.ts, which imports assets/css/tailwind-src.css (Tailwind CSS)
  • -rtl.css files are right-to-left copies of the CSS next to them, made by the same build.

    assets/css/tokens.css and assets/css/field-group-meta-present.css are not compiled.

To build the files yourself, use Node.js 20 or later in the plugin folder:

  1. npm ci
  2. npm run build

The result is written to assets/js/build/. npm run start rebuilds on every change while you develop.

Bundled libraries:

ACF function names (note for reviewers)

src/Portability/Acf/Compat/functions.php declares functions with Advanced Custom Fields' own names so that theme code written for ACF keeps working after a migration. They are declared only on sites that ran the ACF migration, only while neither ACF nor Secure Custom Fields is loaded, only at the end of `after_setup_theme`, after the theme had its chance to load a bundled ACF (never while a plugin is being activated), each one only if no function of that name exists, and the site owner can turn them off in Tools. The `[acf]` shortcode is added under the same conditions and only if no `acf` shortcode exists. No `ACF` class is declared. The full list: `get_field`, `get_fields`, `the_field`, `get_field_object`, `update_field`, `delete_field`, `have_rows`, `the_row`, `get_row`, `get_row_index`, `get_row_layout`, `reset_rows`, `add_row`, `update_row`, `delete_row`, `get_sub_field`, `the_sub_field`, `get_sub_field_object`, `update_sub_field`, `acf_add_local_field_group`, `acf_add_local_field`, `acf_add_options_page`, `acf_add_options_sub_page`, `acf_register_block_type` and `acf_update_setting`.

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums