Files
2meet-data-optimizer/includes/back-compat/trait-wpdo-anti-eav-aware-alias.php
T
wpdev d36bb954d1 chore: initial snapshot of 2meet-data-optimizer v0.1.0
Baseline before backporting wp-data-optimizer v3.0.1-v3.4.6.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TbG1keQQ7XBa7qMQY16KCY
2026-07-31 05:06:36 +08:00

41 lines
1.3 KiB
PHP

<?php
/**
* Backward-compat trait alias.
*
* PHP class_alias() does NOT support traits or interfaces. This file declares
* a thin wrapper trait `WPDO_Anti_EAV_Aware` that simply `use`s the new
* `TMDO_Anti_EAV_Aware` trait, preserving binary compatibility for sister
* plugins (2meet-brandcards, hub-core extensions, etc.) that still reference
* the old trait name.
*
* Loaded by `class-tmdo-back-compat.php` after the new trait is loaded.
*
* @package TMDO
* @since 0.1.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( ! trait_exists( 'WPDO_Anti_EAV_Aware', false ) && trait_exists( 'TMDO_Anti_EAV_Aware', false ) ) {
/**
* Backward-compat alias trait. Sister plugins using `use WPDO_Anti_EAV_Aware;`
* inherit all methods from `TMDO_Anti_EAV_Aware` transparently.
*
* Will emit `_doing_it_wrong()` notice in v0.2.0+.
*/
trait WPDO_Anti_EAV_Aware {
use TMDO_Anti_EAV_Aware;
}
}
if ( ! interface_exists( 'WPDO_Entity_Adapter_Interface', false ) && interface_exists( 'TMDO_Entity_Adapter_Interface', false ) ) {
/**
* Backward-compat alias interface. PHP allows interface inheritance, so
* extending the new interface gives implementing classes the same
* obligations under the old name.
*/
interface WPDO_Entity_Adapter_Interface extends TMDO_Entity_Adapter_Interface {}
}