Linux 软件免费装
Banner图

BBA Custom Types

开发者 amitworx
更新时间 2026年11月10日 21:43
PHP版本: 8.0 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

custom post types cpt custom fields custom taxonomies content types

下载

1.0.0 1.0.1 1.1.0 1.2.0 1.3.0

详情介绍:

BBA Custom Types lets site owners create and manage custom post types, taxonomies, and custom field groups without editing theme files or writing registration code. Use it when your site needs structured content beyond posts and pages: projects, testimonials, events, resources, product collections, locations, or any other content model. The plugin gives you a clear admin workflow while keeping WordPress registration keys, rewrite bases, taxonomy relationships, and postmeta fields visible and controllable. What you can do How it works BBA Custom Types stores your definitions in WordPress options and registers them using core WordPress APIs. Generated internal keys such as bbact_project identify content types in the database and remain stable across edits. Public URLs can be adjusted independently with the Frontend URL base setting. Custom fields are saved directly to native WordPress postmeta with exact-row ownership and bounded tombstones to protect historical data integrity. The plugin is dependency-free at runtime, does not send data to external services, and does not require an account.

安装:

  1. In WordPress admin, go to Plugins > Add New > Upload Plugin.
  2. Upload the BBA Custom Types ZIP file and activate it.
  3. Open BBA Custom Types from the WordPress admin menu.
  4. Create a custom post type, taxonomy, or custom field group using the steps below.

屏幕截图:

  • Custom post type cards in the expandable content-types section.

升级注意事项:

1.3.0 Introduces Native Image fields, Native WYSIWYG editor fields, Single and Multi-Field Repeaters, drag-and-drop row reordering, and unified Classic/Gutenberg editor validation. Fully backward-compatible with 1.2.0 and 1.1.0 data. 1.2.0 Introduces the developer Field API with public PHP helper bcf_get(), Gutenberg [bcf] shortcode, and field-level shortcode security controls. Fully backward-compatible with 1.1.0 field groups and data. 1.1.0 Adds custom field groups, 10 core field types, Gutenberg block editor integration, field defaults, required validation, and scoped transactional persistence. Fully backward-compatible with 1.0.0 post types and taxonomies. 1.0.0 Initial public release.

常见问题:

Does upgrading to 1.1.0 rename existing internal keys?

No. Upgrades never rename or convert existing internal keys. Existing post types (e.g. bbact_project) and taxonomies (e.g. bbact_genre) retain their exact internal keys in wp_posts and WordPress options. Newly created post types and taxonomies use modern bcpt_* and bct_* prefixes, which peacefully coexist with legacy definitions. For complete upgrade details, consult the v1.0.1 to v1.1.0 Upgrade Guide.

Are pre-existing custom meta fields automatically converted to new field groups?

No. Pre-existing postmeta (such as fields created under v1.0.1 or via the core custom fields interface) is completely preserved in wp_postmeta, but is not automatically converted or reclassified into bcf_* dynamic field definitions. You can create new Field Groups that attach to your legacy post types, and their newly generated bcf_* fields will coexist safely alongside your historical metadata.

Does BBA Custom Types create both post types and taxonomies?

Yes. You can manage post types, taxonomies, and custom field groups from the BBA Custom Types menu.

Does the plugin include a custom field builder?

Yes! BBA Custom Types includes a custom field builder supporting 13 field types (Text, Textarea, Number, Email, URL, Date, Select, Radio, Checkbox, Checkbox Group, Image, WYSIWYG, and Repeater), field defaults, required validation, REST API exposure, and Gutenberg block editor integration. Detailed usage is documented in the Custom Fields User Guide.

How do I display custom field values in my theme templates or posts?

You can retrieve and display custom field values in two ways:

  1. PHP Template Helper (bcf_get): Call bcf_get( 'field_name' ) (or bcf_get( 'field_name', $post_id )) in your PHP templates. It returns raw typed PHP data suitable for template logic and formatting with WordPress contextual escaping (esc_html, esc_url).
  2. Gutenberg Shortcode Block ([bcf]): Add the [bcf field="field_name"] shortcode in the block editor or post content. For security, fields must have the Allow in Shortcodes option enabled in their field definition, and outputs are strictly plain-text context-escaped.

What happens to my custom field values if I delete a field group?

Existing postmeta values stored in the database are preserved. Deleting a field group definition deletes only the schema configuration; existing row data in wp_postmeta remains intact. Durable tombstones prevent historical keys from colliding with newly registered fields.

Does the plugin support the Gutenberg block editor?

Yes. Both custom post types and custom fields integrate with Gutenberg. Custom fields feature client-side pre-save validation locks and transactional REST persistence for qualified scopes.

What is the exact scope of transactional Gutenberg persistence?

Scoped transactional persistence is coordinated by ScopedTransactionCoordinator. It currently coordinates native post updates with an applicable field group whose required validation criteria are scoped to atomic REST requests with InnoDB row locking (FOR UPDATE) and rollback protections. Other post types, multi-field groups, and Classic Editor saves use standard WordPress postmeta APIs and pre-save authorization workflows.

What is the difference between URL slug, Frontend URL base, and Internal key?

The URL slug is used when first creating a type and helps generate its internal key. The Frontend URL base controls the public permalink path. The Internal key is the WordPress identifier, for example bbact_project; it should remain unchanged after you create content.

Why did my posts disappear after changing the URL slug?

Changing the URL slug can generate a new internal key. WordPress then treats it as a new post type, so posts associated with the old key are no longer shown in the new menu. Restore the original internal key to access that content again. To change only public URLs, use Frontend URL base instead.

Can I edit the generated internal key?

No. The internal key is permanently locked on first save. WordPress uses this key in the post_type column of wp_posts to associate posts, taxonomies, and metadata. To adjust public permalinks without altering database identifiers, change the Frontend URL base.

Why is my new frontend URL not working yet?

Save your permalink settings at Settings > Permalinks after changing a Frontend URL base. This refreshes WordPress rewrite rules.

Does it delete my content when I deactivate the plugin?

No. Deactivation does not delete posts, terms, metadata, or saved definitions. Registered types and fields are inactive until the plugin is reactivated.

Can I display Repeater fields using the [bcf] shortcode?

No. The [bcf] shortcode is reserved for scalar values and flat checkbox groups. Repeater fields contain multi-dimensional structured data arrays. For repeaters, [bcf] fails closed and outputs an empty string to prevent broken markup or leaking PHP array representations. Developers can consume repeater fields cleanly in templates and custom blocks using bcf_get( 'field_name' ).

Does the plugin use an external API or transmit site data?

No. BBA Custom Types works entirely within your WordPress installation and does not require an account or third-party service.

更新日志:

1.3.0 1.2.0 1.1.0 1.0.1 1.0.0