chore: initial snapshot of 2meet-data-optimizer-latepoint-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:
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
/**
|
||||
* Bootstrap for 2meet Data Optimizer LatePoint AddOn.
|
||||
*
|
||||
* @package TMDO_LATEPOINT
|
||||
* @since 0.1.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
final class TMDO_Latepoint_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-latepoint',
|
||||
false,
|
||||
dirname( plugin_basename( TMDO_LATEPOINT_FILE ) ) . '/languages'
|
||||
);
|
||||
|
||||
require_once TMDO_LATEPOINT_PATH . 'includes/class-tmdo-latepoint-interceptor.php';
|
||||
|
||||
if ( class_exists( 'TMDO_LatePoint_Interceptor' ) ) {
|
||||
( new TMDO_LatePoint_Interceptor() )->register_hooks();
|
||||
}
|
||||
}
|
||||
|
||||
public static function missing_core_notice(): void {
|
||||
echo '<div class="notice notice-error"><p>';
|
||||
echo esc_html__( '2meet Data Optimizer LatePoint AddOn 需要 2meet-data-optimizer 核心外掛,請先安裝並啟用。', 'tmdo-latepoint' );
|
||||
echo '</p></div>';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user