Changeset 3446509
- Timestamp:
- 01/25/2026 11:46:41 AM (2 months ago)
- Location:
- video-conferencing-with-bbb
- Files:
-
- 4 edited
- 22 copied
-
tags/2.5.2 (copied) (copied from video-conferencing-with-bbb/trunk)
-
tags/2.5.2/README.md (copied) (copied from video-conferencing-with-bbb/trunk/README.md) (2 diffs)
-
tags/2.5.2/admin/class-bigbluebutton-admin-api.php (copied) (copied from video-conferencing-with-bbb/trunk/admin/class-bigbluebutton-admin-api.php)
-
tags/2.5.2/admin/class-bigbluebutton-admin.php (copied) (copied from video-conferencing-with-bbb/trunk/admin/class-bigbluebutton-admin.php)
-
tags/2.5.2/admin/class-bigbluebutton-register-custom-types.php (copied) (copied from video-conferencing-with-bbb/trunk/admin/class-bigbluebutton-register-custom-types.php)
-
tags/2.5.2/admin/css/bigbluebutton-admin.css (copied) (copied from video-conferencing-with-bbb/trunk/admin/css/bigbluebutton-admin.css)
-
tags/2.5.2/admin/helpers/class-bigbluebutton-admin-helper.php (copied) (copied from video-conferencing-with-bbb/trunk/admin/helpers/class-bigbluebutton-admin-helper.php)
-
tags/2.5.2/admin/partials/bigbluebutton-admin-notice.php (copied) (copied from video-conferencing-with-bbb/trunk/admin/partials/bigbluebutton-admin-notice.php)
-
tags/2.5.2/admin/partials/bigbluebutton-room-code-metabox-display.php (copied) (copied from video-conferencing-with-bbb/trunk/admin/partials/bigbluebutton-room-code-metabox-display.php)
-
tags/2.5.2/admin/partials/bigbluebutton-settings-display.php (copied) (copied from video-conferencing-with-bbb/trunk/admin/partials/bigbluebutton-settings-display.php)
-
tags/2.5.2/images/learndash-logo.webp (copied) (copied from video-conferencing-with-bbb/trunk/images/learndash-logo.webp)
-
tags/2.5.2/includes/class-bigbluebutton-activator.php (copied) (copied from video-conferencing-with-bbb/trunk/includes/class-bigbluebutton-activator.php)
-
tags/2.5.2/includes/class-bigbluebutton-api.php (copied) (copied from video-conferencing-with-bbb/trunk/includes/class-bigbluebutton-api.php)
-
tags/2.5.2/includes/class-bigbluebutton.php (copied) (copied from video-conferencing-with-bbb/trunk/includes/class-bigbluebutton.php)
-
tags/2.5.2/public/class-bigbluebutton-public-shortcode.php (copied) (copied from video-conferencing-with-bbb/trunk/public/class-bigbluebutton-public-shortcode.php)
-
tags/2.5.2/public/css/bigbluebutton-public.css (copied) (copied from video-conferencing-with-bbb/trunk/public/css/bigbluebutton-public.css)
-
tags/2.5.2/public/helpers/class-bigbluebutton-display-helper.php (copied) (copied from video-conferencing-with-bbb/trunk/public/helpers/class-bigbluebutton-display-helper.php)
-
tags/2.5.2/public/helpers/class-bigbluebutton-recording-helper.php (copied) (copied from video-conferencing-with-bbb/trunk/public/helpers/class-bigbluebutton-recording-helper.php) (2 diffs)
-
tags/2.5.2/public/helpers/class-bigbluebutton-tokens-helper.php (copied) (copied from video-conferencing-with-bbb/trunk/public/helpers/class-bigbluebutton-tokens-helper.php)
-
tags/2.5.2/public/js/bigbluebutton-public.js (copied) (copied from video-conferencing-with-bbb/trunk/public/js/bigbluebutton-public.js)
-
tags/2.5.2/public/partials/bigbluebutton-recordings-display.php (copied) (copied from video-conferencing-with-bbb/trunk/public/partials/bigbluebutton-recordings-display.php) (2 diffs)
-
tags/2.5.2/video-conferencing-with-bbb.php (copied) (copied from video-conferencing-with-bbb/trunk/video-conferencing-with-bbb.php) (9 diffs)
-
trunk/README.md (modified) (2 diffs)
-
trunk/public/helpers/class-bigbluebutton-recording-helper.php (modified) (2 diffs)
-
trunk/public/partials/bigbluebutton-recordings-display.php (modified) (2 diffs)
-
trunk/video-conferencing-with-bbb.php (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
video-conferencing-with-bbb/tags/2.5.2/README.md
r3285302 r3446509 5 5 Tags: virtual classroom, video conference, BigBlueButton, BBB, online meeting, web conferencing, online teaching, learning management system, LMS, online session, live training, video conferencing, video conference, meetings, virtual meetings 6 6 Requires at least: 5.1 7 Tested up to: 6. 8.17 Tested up to: 6.9 8 8 Requires PHP: 7.2 9 Stable tag: 2.5. 19 Stable tag: 2.5.2 10 10 License: GPLv2 or later 11 11 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 175 175 176 176 ## Changelog ## 177 ### 2.5.2 ### 178 * Fixed: Multiple recording buttons in the recording view 179 177 180 ### 2.5.1 ### 178 181 * Fixed: Fatal error in previous v2.5.0 update -
video-conferencing-with-bbb/tags/2.5.2/public/helpers/class-bigbluebutton-recording-helper.php
r2995474 r3446509 152 152 usort( 153 153 $this->recordings, 154 function( $first, $second ) use ( $direction, $field, $self ) { 155 if ( $direction == 'asc' ) { 156 return ( strcasecmp( $self->get_recording_field( $first, $field ), $self->get_recording_field( $second, $field ) ) > 0 ); 157 } else { 158 return ( strcasecmp( $self->get_recording_field( $first, $field ), $self->get_recording_field( $second, $field ) ) < 0 ); 159 } 160 } 161 ); 154 function ( $first, $second ) use ( $direction, $field, $self ) { 155 $result = strcasecmp( $self->get_recording_field( $first, $field ), $self->get_recording_field( $second, $field ) ); 156 return ( $direction === 'asc' ) ? $result : -$result; 157 } 158 ); 162 159 163 160 } else { … … 166 163 $field = sanitize_text_field( 'date' ); 167 164 $self = $this; 165 // var_dump($this->recordings); die; 168 166 169 167 usort( 170 168 $this->recordings, 171 function( $first, $second ) use ( $direction, $field, $self ) { 172 return ( strcasecmp( $self->get_recording_field( $first, $field ), $self->get_recording_field( $second, $field ) ) < 0 ); 169 function ( $first, $second ) use ( $direction, $field, $self ) { 170 $a = $self->get_recording_field( $first, $field ); 171 $b = $self->get_recording_field( $second, $field ); 172 173 // Use spaceship operator for numeric or string comparison 174 if ( is_numeric( $a ) && is_numeric( $b ) ) { 175 $result = $a <=> $b; // numeric 176 } else { 177 $result = strcasecmp( (string) $a, (string) $b ); // string 178 } 179 180 return ( $direction === 'desc' ) ? -$result : $result; 173 181 } 174 182 ); -
video-conferencing-with-bbb/tags/2.5.2/public/partials/bigbluebutton-recordings-display.php
r3106211 r3446509 60 60 <?php endif; ?> 61 61 <div class="flex-row flex-row-<?php echo esc_attr( $columns ); ?>" role="cell"> 62 <?php echo esc_html( date_i18n( $date_format, (int) $recording->startTime / 1000) ); ?>62 <?php echo esc_html( date_i18n( $date_format, (int) ( $recording->startTime / 1000 ) ) ); ?> 63 63 </div> 64 64 <div class="flex-row flex-row-<?php echo esc_attr( $columns ); ?>" role="cell"> … … 69 69 $recording_url = trim( apply_filters( 'bbb_recording_url_display', $format->url, $format->type ) ); 70 70 ?> 71 <button class="bbb-button bbb-btn-join button button-primary" onclick="window.open('<?php echo esc_url( $recording_url ); ?>', '_blank')"><?php esc_html_e( 'View Recording', 'bigbluebutton' ); ?></button> 72 <?php } ?> 71 <button class="bbb-button bbb-btn-join button button-primary" onclick="window.open('<?php echo esc_url( $recording_url ); ?>', '_blank')"><?php esc_html_e( 'View Recording', 'bigbluebutton' ); ?></button> <?php break; // Show only the first format ?> <?php } ?> 73 72 <?php } ?> 74 73 </div> -
video-conferencing-with-bbb/tags/2.5.2/video-conferencing-with-bbb.php
r3285298 r3446509 16 16 * Plugin URI: https://wordpress.org/plugins/video-conferencing-with-bbb 17 17 * Description: This plugin allows teachers to manage their virtual classrooms right from WordPress using BigBlueButton 18 * Version: 2.5. 118 * Version: 2.5.2 19 19 * Author: eLearning evolve <info@elearningevolve.com> 20 20 * Author URI: https://elearningevolve.com/ … … 24 24 * Domain Path: /languages 25 25 */ 26 $plugin_version = '2.5. 1';26 $plugin_version = '2.5.2'; 27 27 $plugin_name = 'Virtual Classroom & Video Conferencing - BigBlueButton'; 28 28 … … 48 48 } 49 49 50 /** 51 * The code that runs during plugin activation. 52 * This action is documented in includes/class-bigbluebutton-activator.php 53 */ 54 function ee_activate_video_conf_with_bbb() { 55 require_once plugin_dir_path( __FILE__ ) . 'includes/class-bigbluebutton-activator.php'; 56 Bigbluebutton_Activator::activate(); 57 } 58 register_activation_hook( __FILE__, 'ee_activate_video_conf_with_bbb' ); 59 60 //add_action( 'admin_init', 'ee_activate_video_conf_with_bbb', 1 ); 61 62 /** 63 * The code that runs during plugin deactivation. 64 * This action is documented in includes/class-bigbluebutton-deactivator.php 65 */ 66 // function deactivate_video_conf_bbb() { 67 // require_once plugin_dir_path( __FILE__ ) . 'includes/class-bigbluebutton-deactivator.php'; 68 // Bigbluebutton_Deactivator::deactivate(); 69 // } 70 //register_deactivation_hook( __FILE__, 'deactivate_video_conf_bbb' ); 71 72 // Show plugin conflict notice 50 // Show plugin conflict notice. 73 51 add_action( 74 52 'admin_notices', … … 76 54 $notice = get_transient( 'video_conf_bbb_conflict_notice' ); 77 55 if ( $notice ) { 78 echo '<div class="error"><p>' . wp_kses( $notice, 'br' ) . '</p></div>'; 56 $allowed_html = array( 57 'strong' => array(), 58 'br' => array(), 59 ); 60 echo '<div class="error"><p>' . wp_kses( $notice, $allowed_html ) . '</p></div>'; 79 61 } 80 62 } … … 82 64 83 65 /** 84 * Check plugin conflicts. 66 * Check plugin conflicts (lightweight early check without translations). 67 * 68 * @return bool True if conflict detected, false otherwise. 69 */ 70 function video_conf_bbb_check_conflict_early() { 71 $conflict_basenames = array( 72 'bigbluebutton/bigbluebutton.php' => 'BigBlueButton', 73 'bbb-administration-panel/bigbluebutton-plugin.php' => 'BBB Administration Panel', 74 ); 75 76 if ( ! function_exists( 'is_plugin_active' ) ) { 77 include_once ABSPATH . 'wp-admin' . DIRECTORY_SEPARATOR . 'includes' . DIRECTORY_SEPARATOR . 'plugin.php'; 78 } 79 80 // Check if we are already active. 81 $we_are_active = is_plugin_active( plugin_basename( __FILE__ ) ); 82 83 $deactivated_plugin = ''; 84 85 foreach ( $conflict_basenames as $basename => $plugin_name ) { 86 if ( is_plugin_active( $basename ) || is_plugin_active_for_network( $basename ) ) { 87 $deactivated_plugin = $plugin_name; 88 89 // Deactivate conflicting plugin immediately. 90 deactivate_plugins( $basename ); 91 } 92 } 93 94 if ( $deactivated_plugin ) { 95 // Set notice that we deactivated the conflicting plugin. 96 set_transient( 'video_conf_bbb_conflict_notice', '<strong>Virtual Classroom & Video Conferencing</strong> has been activated. <strong>' . $deactivated_plugin . '</strong> plugin was automatically deactivated.', 5 ); 97 // Continue loading our plugin. 98 return false; 99 } 100 101 return false; 102 } 103 104 /** 105 * Check plugin conflicts (full check with detailed messages). 106 * 107 * @param bool $is_echo Whether to show notices. 108 * @return bool|string False if no conflict, error message if conflict detected. 85 109 */ 86 110 function video_conf_bbb_check_conflict( $is_echo = true ) { 87 111 88 $conflict_basenames = array( 'bigbluebutton/bigbluebutton.php', 'bbb-administration-panel/bigbluebutton-plugin.php' ); 112 $conflict_basenames = array( 113 'bigbluebutton/bigbluebutton.php', 114 'bbb-administration-panel/bigbluebutton-plugin.php', 115 ); 89 116 90 117 if ( ! function_exists( 'get_plugin_data' ) ) { … … 95 122 $conf_plugin_file = WP_PLUGIN_DIR . DIRECTORY_SEPARATOR . $basename; 96 123 if ( file_exists( $conf_plugin_file ) ) { 97 $plugin_data = get_plugin_data( $conf_plugin_file ); 98 $plugins[ $basename ]['msg'] = sprintf( __( '%1$s is not compatible with %2$s. Please deactivate %1$s before activating %2$s.', 'bigbluebutton' ), '<strong>' . esc_html( VIDEO_CONF_WITH_BBB_PLUGIN_NAME ) . '</strong>', '<strong> ' . esc_html( $plugin_data['Name'] ) . ' </strong>' ); 124 // Don't translate plugin data to avoid early text domain loading. 125 $plugin_data = get_plugin_data( $conf_plugin_file, false, false ); 126 $plugins[ $basename ]['msg'] = sprintf( '%1$s is not compatible with %2$s. Please deactivate %1$s before activating %2$s.', '<strong>' . esc_html( VIDEO_CONF_WITH_BBB_PLUGIN_NAME ) . '</strong>', '<strong> ' . esc_html( $plugin_data['Name'] ) . ' </strong>' ); 99 127 $plugins[ $basename ]['class'] = $plugin_data['Name']; 100 128 } … … 126 154 } 127 155 156 // Early conflict check to prevent fatal errors during activation. 157 if ( video_conf_bbb_check_conflict_early() ) { 158 // Conflict detected - stop loading completely. 159 return; 160 } 161 128 162 /** 129 163 * The core plugin class that is used to define internationalization, … … 131 165 */ 132 166 require plugin_dir_path( __FILE__ ) . 'includes/class-bigbluebutton.php'; 167 168 /** 169 * The code that runs during plugin activation. 170 * This action is documented in includes/class-bigbluebutton-activator.php 171 */ 172 function ee_activate_video_conf_with_bbb() { 173 require_once plugin_dir_path( __FILE__ ) . 'includes/class-bigbluebutton-activator.php'; 174 // Load the classes required by the activator. 175 require_once plugin_dir_path( __FILE__ ) . 'includes/class-bigbluebutton-helper.php'; 176 require_once plugin_dir_path( __FILE__ ) . 'admin/helpers/class-bigbluebutton-admin-helper.php'; 177 require_once plugin_dir_path( __FILE__ ) . 'admin/class-bigbluebutton-register-custom-types.php'; 178 Bigbluebutton_Activator::activate(); 179 } 180 register_activation_hook( __FILE__, 'ee_activate_video_conf_with_bbb' ); 133 181 134 182 /** … … 141 189 * @since 3.0.0 142 190 */ 143 if ( ! function_exists( 'run_video_conf_bbb' ) && ! video_conf_bbb_check_conflict() ) { 144 function run_video_conf_bbb() { 145 $plugin = new VideoConferencingWithBBB(); 146 $plugin->run(); 147 } 148 run_video_conf_bbb(); 149 } 191 add_action( 192 'plugins_loaded', 193 function () { 194 // Full conflict check with detailed messages. 195 if ( ! function_exists( 'run_video_conf_bbb' ) && ! video_conf_bbb_check_conflict() ) { 196 function run_video_conf_bbb() { 197 $plugin = new VideoConferencingWithBBB(); 198 $plugin->run(); 199 } 200 run_video_conf_bbb(); 201 } 202 } 203 ); 204 -
video-conferencing-with-bbb/trunk/README.md
r3285302 r3446509 5 5 Tags: virtual classroom, video conference, BigBlueButton, BBB, online meeting, web conferencing, online teaching, learning management system, LMS, online session, live training, video conferencing, video conference, meetings, virtual meetings 6 6 Requires at least: 5.1 7 Tested up to: 6. 8.17 Tested up to: 6.9 8 8 Requires PHP: 7.2 9 Stable tag: 2.5. 19 Stable tag: 2.5.2 10 10 License: GPLv2 or later 11 11 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 175 175 176 176 ## Changelog ## 177 ### 2.5.2 ### 178 * Fixed: Multiple recording buttons in the recording view 179 177 180 ### 2.5.1 ### 178 181 * Fixed: Fatal error in previous v2.5.0 update -
video-conferencing-with-bbb/trunk/public/helpers/class-bigbluebutton-recording-helper.php
r2995474 r3446509 152 152 usort( 153 153 $this->recordings, 154 function( $first, $second ) use ( $direction, $field, $self ) { 155 if ( $direction == 'asc' ) { 156 return ( strcasecmp( $self->get_recording_field( $first, $field ), $self->get_recording_field( $second, $field ) ) > 0 ); 157 } else { 158 return ( strcasecmp( $self->get_recording_field( $first, $field ), $self->get_recording_field( $second, $field ) ) < 0 ); 159 } 160 } 161 ); 154 function ( $first, $second ) use ( $direction, $field, $self ) { 155 $result = strcasecmp( $self->get_recording_field( $first, $field ), $self->get_recording_field( $second, $field ) ); 156 return ( $direction === 'asc' ) ? $result : -$result; 157 } 158 ); 162 159 163 160 } else { … … 166 163 $field = sanitize_text_field( 'date' ); 167 164 $self = $this; 165 // var_dump($this->recordings); die; 168 166 169 167 usort( 170 168 $this->recordings, 171 function( $first, $second ) use ( $direction, $field, $self ) { 172 return ( strcasecmp( $self->get_recording_field( $first, $field ), $self->get_recording_field( $second, $field ) ) < 0 ); 169 function ( $first, $second ) use ( $direction, $field, $self ) { 170 $a = $self->get_recording_field( $first, $field ); 171 $b = $self->get_recording_field( $second, $field ); 172 173 // Use spaceship operator for numeric or string comparison 174 if ( is_numeric( $a ) && is_numeric( $b ) ) { 175 $result = $a <=> $b; // numeric 176 } else { 177 $result = strcasecmp( (string) $a, (string) $b ); // string 178 } 179 180 return ( $direction === 'desc' ) ? -$result : $result; 173 181 } 174 182 ); -
video-conferencing-with-bbb/trunk/public/partials/bigbluebutton-recordings-display.php
r3106211 r3446509 60 60 <?php endif; ?> 61 61 <div class="flex-row flex-row-<?php echo esc_attr( $columns ); ?>" role="cell"> 62 <?php echo esc_html( date_i18n( $date_format, (int) $recording->startTime / 1000) ); ?>62 <?php echo esc_html( date_i18n( $date_format, (int) ( $recording->startTime / 1000 ) ) ); ?> 63 63 </div> 64 64 <div class="flex-row flex-row-<?php echo esc_attr( $columns ); ?>" role="cell"> … … 69 69 $recording_url = trim( apply_filters( 'bbb_recording_url_display', $format->url, $format->type ) ); 70 70 ?> 71 <button class="bbb-button bbb-btn-join button button-primary" onclick="window.open('<?php echo esc_url( $recording_url ); ?>', '_blank')"><?php esc_html_e( 'View Recording', 'bigbluebutton' ); ?></button> 72 <?php } ?> 71 <button class="bbb-button bbb-btn-join button button-primary" onclick="window.open('<?php echo esc_url( $recording_url ); ?>', '_blank')"><?php esc_html_e( 'View Recording', 'bigbluebutton' ); ?></button> <?php break; // Show only the first format ?> <?php } ?> 73 72 <?php } ?> 74 73 </div> -
video-conferencing-with-bbb/trunk/video-conferencing-with-bbb.php
r3285298 r3446509 16 16 * Plugin URI: https://wordpress.org/plugins/video-conferencing-with-bbb 17 17 * Description: This plugin allows teachers to manage their virtual classrooms right from WordPress using BigBlueButton 18 * Version: 2.5. 118 * Version: 2.5.2 19 19 * Author: eLearning evolve <info@elearningevolve.com> 20 20 * Author URI: https://elearningevolve.com/ … … 24 24 * Domain Path: /languages 25 25 */ 26 $plugin_version = '2.5. 1';26 $plugin_version = '2.5.2'; 27 27 $plugin_name = 'Virtual Classroom & Video Conferencing - BigBlueButton'; 28 28 … … 48 48 } 49 49 50 /** 51 * The code that runs during plugin activation. 52 * This action is documented in includes/class-bigbluebutton-activator.php 53 */ 54 function ee_activate_video_conf_with_bbb() { 55 require_once plugin_dir_path( __FILE__ ) . 'includes/class-bigbluebutton-activator.php'; 56 Bigbluebutton_Activator::activate(); 57 } 58 register_activation_hook( __FILE__, 'ee_activate_video_conf_with_bbb' ); 59 60 //add_action( 'admin_init', 'ee_activate_video_conf_with_bbb', 1 ); 61 62 /** 63 * The code that runs during plugin deactivation. 64 * This action is documented in includes/class-bigbluebutton-deactivator.php 65 */ 66 // function deactivate_video_conf_bbb() { 67 // require_once plugin_dir_path( __FILE__ ) . 'includes/class-bigbluebutton-deactivator.php'; 68 // Bigbluebutton_Deactivator::deactivate(); 69 // } 70 //register_deactivation_hook( __FILE__, 'deactivate_video_conf_bbb' ); 71 72 // Show plugin conflict notice 50 // Show plugin conflict notice. 73 51 add_action( 74 52 'admin_notices', … … 76 54 $notice = get_transient( 'video_conf_bbb_conflict_notice' ); 77 55 if ( $notice ) { 78 echo '<div class="error"><p>' . wp_kses( $notice, 'br' ) . '</p></div>'; 56 $allowed_html = array( 57 'strong' => array(), 58 'br' => array(), 59 ); 60 echo '<div class="error"><p>' . wp_kses( $notice, $allowed_html ) . '</p></div>'; 79 61 } 80 62 } … … 82 64 83 65 /** 84 * Check plugin conflicts. 66 * Check plugin conflicts (lightweight early check without translations). 67 * 68 * @return bool True if conflict detected, false otherwise. 69 */ 70 function video_conf_bbb_check_conflict_early() { 71 $conflict_basenames = array( 72 'bigbluebutton/bigbluebutton.php' => 'BigBlueButton', 73 'bbb-administration-panel/bigbluebutton-plugin.php' => 'BBB Administration Panel', 74 ); 75 76 if ( ! function_exists( 'is_plugin_active' ) ) { 77 include_once ABSPATH . 'wp-admin' . DIRECTORY_SEPARATOR . 'includes' . DIRECTORY_SEPARATOR . 'plugin.php'; 78 } 79 80 // Check if we are already active. 81 $we_are_active = is_plugin_active( plugin_basename( __FILE__ ) ); 82 83 $deactivated_plugin = ''; 84 85 foreach ( $conflict_basenames as $basename => $plugin_name ) { 86 if ( is_plugin_active( $basename ) || is_plugin_active_for_network( $basename ) ) { 87 $deactivated_plugin = $plugin_name; 88 89 // Deactivate conflicting plugin immediately. 90 deactivate_plugins( $basename ); 91 } 92 } 93 94 if ( $deactivated_plugin ) { 95 // Set notice that we deactivated the conflicting plugin. 96 set_transient( 'video_conf_bbb_conflict_notice', '<strong>Virtual Classroom & Video Conferencing</strong> has been activated. <strong>' . $deactivated_plugin . '</strong> plugin was automatically deactivated.', 5 ); 97 // Continue loading our plugin. 98 return false; 99 } 100 101 return false; 102 } 103 104 /** 105 * Check plugin conflicts (full check with detailed messages). 106 * 107 * @param bool $is_echo Whether to show notices. 108 * @return bool|string False if no conflict, error message if conflict detected. 85 109 */ 86 110 function video_conf_bbb_check_conflict( $is_echo = true ) { 87 111 88 $conflict_basenames = array( 'bigbluebutton/bigbluebutton.php', 'bbb-administration-panel/bigbluebutton-plugin.php' ); 112 $conflict_basenames = array( 113 'bigbluebutton/bigbluebutton.php', 114 'bbb-administration-panel/bigbluebutton-plugin.php', 115 ); 89 116 90 117 if ( ! function_exists( 'get_plugin_data' ) ) { … … 95 122 $conf_plugin_file = WP_PLUGIN_DIR . DIRECTORY_SEPARATOR . $basename; 96 123 if ( file_exists( $conf_plugin_file ) ) { 97 $plugin_data = get_plugin_data( $conf_plugin_file ); 98 $plugins[ $basename ]['msg'] = sprintf( __( '%1$s is not compatible with %2$s. Please deactivate %1$s before activating %2$s.', 'bigbluebutton' ), '<strong>' . esc_html( VIDEO_CONF_WITH_BBB_PLUGIN_NAME ) . '</strong>', '<strong> ' . esc_html( $plugin_data['Name'] ) . ' </strong>' ); 124 // Don't translate plugin data to avoid early text domain loading. 125 $plugin_data = get_plugin_data( $conf_plugin_file, false, false ); 126 $plugins[ $basename ]['msg'] = sprintf( '%1$s is not compatible with %2$s. Please deactivate %1$s before activating %2$s.', '<strong>' . esc_html( VIDEO_CONF_WITH_BBB_PLUGIN_NAME ) . '</strong>', '<strong> ' . esc_html( $plugin_data['Name'] ) . ' </strong>' ); 99 127 $plugins[ $basename ]['class'] = $plugin_data['Name']; 100 128 } … … 126 154 } 127 155 156 // Early conflict check to prevent fatal errors during activation. 157 if ( video_conf_bbb_check_conflict_early() ) { 158 // Conflict detected - stop loading completely. 159 return; 160 } 161 128 162 /** 129 163 * The core plugin class that is used to define internationalization, … … 131 165 */ 132 166 require plugin_dir_path( __FILE__ ) . 'includes/class-bigbluebutton.php'; 167 168 /** 169 * The code that runs during plugin activation. 170 * This action is documented in includes/class-bigbluebutton-activator.php 171 */ 172 function ee_activate_video_conf_with_bbb() { 173 require_once plugin_dir_path( __FILE__ ) . 'includes/class-bigbluebutton-activator.php'; 174 // Load the classes required by the activator. 175 require_once plugin_dir_path( __FILE__ ) . 'includes/class-bigbluebutton-helper.php'; 176 require_once plugin_dir_path( __FILE__ ) . 'admin/helpers/class-bigbluebutton-admin-helper.php'; 177 require_once plugin_dir_path( __FILE__ ) . 'admin/class-bigbluebutton-register-custom-types.php'; 178 Bigbluebutton_Activator::activate(); 179 } 180 register_activation_hook( __FILE__, 'ee_activate_video_conf_with_bbb' ); 133 181 134 182 /** … … 141 189 * @since 3.0.0 142 190 */ 143 if ( ! function_exists( 'run_video_conf_bbb' ) && ! video_conf_bbb_check_conflict() ) { 144 function run_video_conf_bbb() { 145 $plugin = new VideoConferencingWithBBB(); 146 $plugin->run(); 147 } 148 run_video_conf_bbb(); 149 } 191 add_action( 192 'plugins_loaded', 193 function () { 194 // Full conflict check with detailed messages. 195 if ( ! function_exists( 'run_video_conf_bbb' ) && ! video_conf_bbb_check_conflict() ) { 196 function run_video_conf_bbb() { 197 $plugin = new VideoConferencingWithBBB(); 198 $plugin->run(); 199 } 200 run_video_conf_bbb(); 201 } 202 } 203 ); 204
Note: See TracChangeset
for help on using the changeset viewer.