Commit 9842837
committed
Media: Remove dead srcset handling in wp_add_crossorigin_attributes().
Every entry in the $cross_origin_tag_attributes map was flagged `false`, so
the `if ( $is_srcset )` branch was never reachable; PHPStan reported it as
always false. No tag enables srcset processing, and the cross-origin
isolation tests assert that srcset-based cross-origin URLs are deliberately
left untouched (img is not handled and link only checks href).
Drop the unreachable branch and simplify the attribute map to a plain list
of attributes. Behavior is unchanged and the full cross-origin isolation
test suite still passes.
Addresses review feedback on WordPress#113241 parent 74fa556 commit 9842837
1 file changed
Lines changed: 9 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6604 | 6604 | | |
6605 | 6605 | | |
6606 | 6606 | | |
6607 | | - | |
6608 | | - | |
6609 | | - | |
6610 | | - | |
6611 | | - | |
6612 | | - | |
6613 | | - | |
6614 | | - | |
| 6607 | + | |
| 6608 | + | |
| 6609 | + | |
| 6610 | + | |
| 6611 | + | |
6615 | 6612 | | |
6616 | 6613 | | |
6617 | 6614 | | |
| |||
6633 | 6630 | | |
6634 | 6631 | | |
6635 | 6632 | | |
6636 | | - | |
6637 | | - | |
6638 | | - | |
6639 | | - | |
6640 | | - | |
6641 | | - | |
6642 | | - | |
6643 | | - | |
6644 | | - | |
6645 | | - | |
6646 | | - | |
6647 | | - | |
6648 | | - | |
6649 | | - | |
6650 | | - | |
6651 | | - | |
6652 | | - | |
| 6633 | + | |
| 6634 | + | |
| 6635 | + | |
| 6636 | + | |
6653 | 6637 | | |
6654 | 6638 | | |
6655 | 6639 | | |
| |||
0 commit comments