| 开发者 | amitworx |
|---|---|
| 更新时间 | 2026年11月10日 21:43 |
| PHP版本: | 8.0 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
FOR UPDATE) and automatic rollbacks on error for qualified post saves.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.
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.
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.
Yes. You can manage post types, taxonomies, and custom field groups from the BBA Custom Types menu.
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.
You can retrieve and display custom field values in two ways:
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).[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.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.
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.
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.
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.
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.
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.
Save your permalink settings at Settings > Permalinks after changing a Frontend URL base. This refreshes WordPress rewrite rules.
No. Deactivation does not delete posts, terms, metadata, or saved definitions. Registered types and fields are inactive until the plugin is reactivated.
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' ).
No. BBA Custom Types works entirely within your WordPress installation and does not require an account or third-party service.
.bbact-classic-notice error summaries.bcf_get() seamlessly retrieves typed arrays for repeaters and integer attachment IDs for images; [bcf] shortcode supports image rendering (size, class, alt) and rich text formatting.bcf_get() for theme and plugin developers to retrieve typed custom field values.[bcf] shortcode with support for the native Shortcode block and active post loop context.esc_html at shortcode output sink and collision protection for existing shortcode tags.post and page post types alongside custom post types via the Field Groups submenu.FOR UPDATE) and rollback safeguards for qualified REST post updates.MAX_TOMBSTONES = 500) to protect historical postmeta and prevent key collisions.