| @@ -634,8 +634,20 @@ | ||
| 634 | 634 | // to run at their original spot). |
| 635 | 635 | if ( ! empty( $reg->extra['after'] ) || ! empty( $reg->extra['before'] ) || ! empty( $reg->extra['data'] ) ) { |
| 636 | 636 | return null; |
| 637 | 637 | } |
| 638 | + // A handle the user protected from defer/delay, or one Defer JS | |
| 639 | + // auto-protects because inline code reads it, must not be absorbed | |
| 640 | + // either. Combining moves the code into a bundle printed under a | |
| 641 | + // DIFFERENT handle, so the exclusion the user wrote — matched by | |
| 642 | + // handle or URL — stops matching anything and the protection is | |
| 643 | + // silently gone. jquery-core is the case that bites: the check above | |
| 644 | + // only catches a handle carrying its OWN inline data, while a | |
| 645 | + // dependency of an inline consumer carries none, so it lands in the | |
| 646 | + // bundle and the exclusion list reads as if it were still honoured. | |
| 647 | + if ( \XSpeed\Minify_Filters::is_protected_from_bundling( $handle, $src ) ) { | |
| 648 | + return null; | |
| 649 | + } | |
| 638 | 650 | // Skip async / defer-via-strategy. |
| 639 | 651 | $strategy = $reg->extra['strategy'] ?? ''; |
| 640 | 652 | if ( 'async' === $strategy || 'defer' === $strategy ) { |
| 641 | 653 | return null; |