PluginProbe
xSpeed Cache: AI-Powered Performance Hub with MCP, Caching & CDN / 1.3.3
xSpeed Cache: AI-Powered Performance Hub with MCP, Caching & CDN v1.3.3
1.3.3 1.3.2 1.3.1 1.3.0 1.2.4 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 All 29 releases
← All changes | includes/class-minifier.php +13 -0 1.3.11.3.3 View file →
@@ -75,8 +75,15 @@
75 75 add_filter( 'style_loader_src', array( __CLASS__, 'rewrite_style' ), 10, 2 );
76 76 }
77 77 if ( ! empty( $opts['minify_js'] ) ) {
78 78 add_filter( 'script_loader_src', array( __CLASS__, 'rewrite_script' ), 10, 2 );
79 + // The src rewrite above runs before any plugin's own
80 + // `script_loader_tag` filter can stamp data-no-minify /
81 + // data-no-optimize onto the tag, so the marker arrives too late
82 + // to prevent it. Priority 15: after third-party tag filters at
83 + // the default 10 have printed their markers, before our defer
84 + // (20) and delay (30) look at the tag. (#456)
85 + add_filter( 'script_loader_tag', array( Minify_Filters::class, 'restore_marked_script_src' ), 15, 3 );
79 86 }
80 87
81 88 // Phase 4.1a — filter-only "smarter minifier" features. Each is
82 89 // gated on its own toggle so users can enable any subset.
@@ -432,8 +439,14 @@
432 439 }
433 440 list( , $open, $body, $close ) = $parts;
434 441
435 442 if ( '' === trim( $body ) ) {
443 + return $block;
444 + }
445 +
446 + // The tag asked to be left alone (data-no-optimize / data-no-minify —
447 + // the convention consent managers print on their config scripts). (#456)
448 + if ( Minify_Filters::tag_opts_out( $open ) ) {
436 449 return $block;
437 450 }
438 451
439 452 // Refuse a body that is already structurally broken. balanced() only