chore: initial snapshot of 2meet-data-optimizer-collab-addon 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
This commit is contained in:
2026-07-31 05:06:36 +08:00
commit 1a50ab20b8
14 changed files with 2608 additions and 0 deletions
+39
View File
@@ -0,0 +1,39 @@
<?php
/**
* Bootstrap for 2meet Data Optimizer Collab AddOn.
*
* @package TMDO_COLLAB
* @since 0.1.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
final class TMDO_Collab_Bootstrap {
public static function init(): void {
if ( ! class_exists( 'TMDO_API' ) && ! class_exists( 'WPDO_API' ) ) {
add_action( 'admin_notices', array( __CLASS__, 'missing_core_notice' ) );
return;
}
load_plugin_textdomain(
'tmdo-collab',
false,
dirname( plugin_basename( TMDO_COLLAB_FILE ) ) . '/languages'
);
require_once TMDO_COLLAB_PATH . 'includes/class-tmdo-collab.php';
if ( class_exists( 'TMDO_Collab' ) && method_exists( 'TMDO_Collab', 'register' ) ) {
TMDO_Collab::register();
}
}
public static function missing_core_notice(): void {
echo '<div class="notice notice-error"><p>';
echo esc_html__( '2meet Data Optimizer Collab AddOn 需要 2meet-data-optimizer 核心外掛,請先安裝並啟用。', 'tmdo-collab' );
echo '</p></div>';
}
}