register_hooks(); } } // 5 query interceptors foreach ( array( 'TMDO_Reviews_Query', 'TMDO_Messages_Query', 'TMDO_Memberships_Query', 'TMDO_Requests_Query', 'TMDO_Listing_Meta_Query', ) as $cls ) { if ( class_exists( $cls ) ) { ( new $cls() )->register_hooks(); } } // HP transient filter (init:5) if ( class_exists( 'TMDO_Hivepress_Transient_Filter' ) ) { add_action( 'init', array( 'TMDO_Hivepress_Transient_Filter', 'init' ), 5 ); } // Listing Stats hooks + cron if ( class_exists( 'TMDO_Listing_Stats' ) ) { TMDO_Listing_Stats::register_hooks(); TMDO_Listing_Stats::schedule_cron(); } // Term/Comment fields if ( class_exists( 'TMDO_Hivepress_Term_Comment_Fields' ) && method_exists( 'TMDO_Hivepress_Term_Comment_Fields', 'register' ) ) { TMDO_Hivepress_Term_Comment_Fields::register(); } // Admin tab if ( is_admin() ) { $admin_file = TMDO_HIVEPRESS_PATH . 'admin/class-tmdo-admin-hivepress.php'; if ( file_exists( $admin_file ) ) { require_once $admin_file; } } // CLI namespace if ( defined( 'WP_CLI' ) && WP_CLI ) { $cli_file = TMDO_HIVEPRESS_PATH . 'cli/class-tmdo-cli-hivepress.php'; if ( file_exists( $cli_file ) ) { require_once $cli_file; if ( class_exists( 'TMDO_CLI_HivePress' ) ) { \WP_CLI::add_command( 'tmdo hivepress', 'TMDO_CLI_HivePress' ); \WP_CLI::add_command( 'wpdo hivepress', 'TMDO_CLI_HivePress' ); } } } } public static function missing_core_notice(): void { echo '
'; echo esc_html__( '2meet Data Optimizer HivePress AddOn 需要 2meet-data-optimizer 核心外掛,請先安裝並啟用。', 'tmdo-hivepress' ); echo '