| @@ -75,15 +75,8 @@ | ||
| 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 ); | |
| 86 | 79 | } |
| 87 | 80 | |
| 88 | 81 | // Phase 4.1a — filter-only "smarter minifier" features. Each is |
| 89 | 82 | // gated on its own toggle so users can enable any subset. |
| @@ -439,14 +432,8 @@ | ||
| 439 | 432 | } |
| 440 | 433 | list( , $open, $body, $close ) = $parts; |
| 441 | 434 | |
| 442 | 435 | 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 ) ) { | |
| 449 | 436 | return $block; |
| 450 | 437 | } |
| 451 | 438 | |
| 452 | 439 | // Refuse a body that is already structurally broken. balanced() only |