Repository navigation
Commit fb78023
committed
Code Modernization: Use
This replaces `foreach` loops that return early on the first matching or failing element with `array_any()` and `array_all()`, with no change in behavior. These loops were all added in later features, so they were missed by the conversions in r62550 and r62553.
Developed in #14618.
Follow-up to r59783, r62550, r62553, r62564, r63453, r64337, r64351, r64388, r64402, r64500, r64588.
Props soean.
See #65818.
git-svn-id: https://develop.svn.wordpress.org/trunk@64690 602fd350-edb4-49c9-b593-d223f7449a82array_any() and array_all() more widely.1 parent 77393df commit fb78023
6 files changed
Lines changed: 28 additions & 48 deletions
File tree
- src
- wp-admin/includes
- wp-includes
- abilities-api
- abilities
- secrets
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2205 | 2205 | | |
2206 | 2206 | | |
2207 | 2207 | | |
2208 | | - | |
2209 | | - | |
2210 | | - | |
2211 | | - | |
2212 | | - | |
2213 | | - | |
2214 | | - | |
| 2208 | + | |
| 2209 | + | |
| 2210 | + | |
| 2211 | + | |
2215 | 2212 | | |
2216 | 2213 | | |
2217 | 2214 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
641 | 641 | | |
642 | 642 | | |
643 | 643 | | |
644 | | - | |
645 | | - | |
646 | | - | |
647 | | - | |
648 | | - | |
649 | | - | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
650 | 648 | | |
651 | 649 | | |
652 | 650 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
292 | 289 | | |
293 | 290 | | |
294 | 291 | | |
| |||
790 | 787 | | |
791 | 788 | | |
792 | 789 | | |
793 | | - | |
794 | | - | |
795 | | - | |
796 | | - | |
797 | | - | |
798 | | - | |
799 | | - | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
800 | 794 | | |
801 | 795 | | |
802 | 796 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1559 | 1559 | | |
1560 | 1560 | | |
1561 | 1561 | | |
1562 | | - | |
1563 | | - | |
1564 | | - | |
1565 | | - | |
1566 | | - | |
1567 | | - | |
1568 | | - | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
1569 | 1566 | | |
1570 | 1567 | | |
1571 | 1568 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7018 | 7018 | | |
7019 | 7019 | | |
7020 | 7020 | | |
7021 | | - | |
7022 | | - | |
7023 | | - | |
7024 | | - | |
7025 | | - | |
7026 | | - | |
7027 | | - | |
| 7021 | + | |
| 7022 | + | |
| 7023 | + | |
| 7024 | + | |
7028 | 7025 | | |
7029 | 7026 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
271 | 268 | | |
272 | 269 | | |
273 | 270 | | |
| |||
0 commit comments