docs(2meet-data-optimizer): partner self-registration guide and deprecated AddOn notice
- Add docs/PARTNER-REGISTRATION.md: TMDO_Anti_EAV_Aware bridge setup (plugins_loaded:3), table and entity-group registration with post_types scopes, frozen definitions, and the AddOn → self-registration migration checked with [COLLISION]/[ORPHAN] - TMDO_Deprecated_Addons_Notice warns administrators while any of the 8 in-house partner AddOns is active (site or network) - Trait register_entity_fields() forwards an optional $args (post_types) to the registry - Verify: DeprecatedAddonsNoticeTest (4); core unit 645 / integration 449, HP 148, WC 10 OK - PR: PR-021
This commit is contained in:
@@ -122,12 +122,14 @@ if ( ! trait_exists( 'TMDO_Anti_EAV_Aware' ) ) {
|
||||
* @param string $entity_type 'post' | 'user' | 'term' | 'comment'.
|
||||
* @param string $group_name Logical group name (e.g. 'tmos_vendor', 'tmos_audience').
|
||||
* @param array<int,array<string,mixed>> $fields Field definitions.
|
||||
* @param array<string,mixed> $args Optional: post_types (string[]) scopes a post group
|
||||
* to those post types (see TMDO_Entity_Registry::register_group()).
|
||||
*/
|
||||
protected function register_entity_fields( string $entity_type, string $group_name, array $fields ): bool {
|
||||
protected function register_entity_fields( string $entity_type, string $group_name, array $fields, array $args = array() ): bool {
|
||||
if ( ! class_exists( 'TMDO_Entity_Registry' ) ) {
|
||||
return false;
|
||||
}
|
||||
return TMDO_Entity_Registry::register_group( $entity_type, $group_name, $fields );
|
||||
return TMDO_Entity_Registry::register_group( $entity_type, $group_name, $fields, $args );
|
||||
}
|
||||
|
||||
// ── Read/write convenience wrappers ──────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user