@@ -1216,12 +1216,12 @@ public function create_table_error_notice() {
1216
1216
/**
1217
1217
* Ensure WordPress 6.7 compatibility by handling jQuery Migrate dependency.
1218
1218
* WordPress 6.7 removed jQuery Migrate by default, which can break plugins using deprecated jQuery methods.
1219
- *
1219
+ *
1220
1220
* @since 4.6.23
1221
1221
*/
1222
1222
public function ensure_wp67_compatibility () {
1223
1223
global $ wp_version ;
1224
-
1224
+
1225
1225
// Check if we're running WordPress 6.7 or higher
1226
1226
if ( version_compare ( $ wp_version , '6.7 ' , '>= ' ) ) {
1227
1227
// Enqueue jQuery Migrate if not already enqueued to maintain backward compatibility
@@ -1234,15 +1234,15 @@ public function ensure_wp67_compatibility() {
1234
1234
/**
1235
1235
* WordPress 6.7 compatibility scripts enqueue.
1236
1236
* Ensures jQuery Migrate is available early in the loading process.
1237
- *
1237
+ *
1238
1238
* @since 4.6.23
1239
1239
*/
1240
1240
public function wp67_compatibility_scripts () {
1241
- global $ wp_version ;
1242
-
1241
+ global $ wp_version ;
1242
+
1243
1243
// Enqueue jQuery Migrate for WordPress 6.7+ compatibility
1244
1244
if ( version_compare ( $ wp_version , '6.7 ' , '>= ' ) ) {
1245
- if ( ! wp_script_is ( 'jquery-migrate ' , 'enqueued ' ) ) {
1245
+ if ( wp_script_is ( ' jquery ' , ' enqueued ' ) && ! wp_script_is ( 'jquery-migrate ' , 'enqueued ' ) ) {
1246
1246
wp_enqueue_script ( 'jquery-migrate ' );
1247
1247
}
1248
1248
}
@@ -1251,12 +1251,12 @@ public function wp67_compatibility_scripts() {
1251
1251
/**
1252
1252
* WordPress 6.7 MediaElement.js compatibility initialization.
1253
1253
* Ensures MediaElement is properly initialized in WordPress 6.7+
1254
- *
1254
+ *
1255
1255
* @since 4.6.23
1256
1256
*/
1257
1257
public function wp67_media_element_init () {
1258
1258
global $ wp_version ;
1259
-
1259
+
1260
1260
if ( version_compare ( $ wp_version , '6.7 ' , '>= ' ) ) {
1261
1261
?>
1262
1262
<script type="text/javascript">
@@ -1265,7 +1265,7 @@ public function wp67_media_element_init() {
1265
1265
if (typeof wp !== 'undefined' && wp.mediaelement && wp.mediaelement.initialize) {
1266
1266
wp.mediaelement.initialize();
1267
1267
}
1268
-
1268
+
1269
1269
// Fallback for older MediaElement initialization
1270
1270
if (typeof $().mediaelementplayer !== 'undefined') {
1271
1271
$('.wp-audio-shortcode, .wp-video-shortcode').not('.mejs-container').mediaelementplayer({
@@ -1274,7 +1274,7 @@ public function wp67_media_element_init() {
1274
1274
}
1275
1275
});
1276
1276
}
1277
-
1277
+
1278
1278
// WordPress 6.7 compatibility: Add console log to verify fixes are working
1279
1279
if (window.console && console.log) {
1280
1280
console.log('rtMedia: WordPress 6.7 compatibility mode active');
0 commit comments