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:
2026-09-26 00:31:34 +08:00
parent 0603537f0a
commit 3d650eb848
6 changed files with 278 additions and 2 deletions
+4 -2
View File
@@ -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 ──────────────────────────────────────