Commit 21490c6
committed
Media: Ensure that the image widget supports loading optimization attributes.
This changeset adds support for loading optimization attributes such as `loading="lazy"` and `fetchpriority="high"` to the image widget. A new context `widget_media_image` is introduced for that purpose.
Props spacedmonkey, thekt12, mukesh27, westonruter.
Fixes #58704.
See #58235.
git-svn-id: https://develop.svn.wordpress.org/trunk@56154 602fd350-edb4-49c9-b593-d223f7449a821 parent e9d0712 commit 21490c6
4 files changed
Lines changed: 42 additions & 10 deletions
File tree
- src/wp-includes
- widgets
- tests/phpunit/tests
- widgets
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5662 | 5662 | | |
5663 | 5663 | | |
5664 | 5664 | | |
5665 | | - | |
| 5665 | + | |
5666 | 5666 | | |
5667 | 5667 | | |
5668 | 5668 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
249 | 249 | | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
250 | 267 | | |
251 | 268 | | |
252 | 269 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4191 | 4191 | | |
4192 | 4192 | | |
4193 | 4193 | | |
4194 | | - | |
| 4194 | + | |
4195 | 4195 | | |
4196 | 4196 | | |
4197 | 4197 | | |
| |||
4208 | 4208 | | |
4209 | 4209 | | |
4210 | 4210 | | |
4211 | | - | |
| 4211 | + | |
4212 | 4212 | | |
4213 | 4213 | | |
4214 | 4214 | | |
| |||
4233 | 4233 | | |
4234 | 4234 | | |
4235 | 4235 | | |
| 4236 | + | |
| 4237 | + | |
| 4238 | + | |
| 4239 | + | |
| 4240 | + | |
| 4241 | + | |
| 4242 | + | |
| 4243 | + | |
| 4244 | + | |
| 4245 | + | |
| 4246 | + | |
| 4247 | + | |
| 4248 | + | |
4236 | 4249 | | |
4237 | 4250 | | |
4238 | 4251 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
494 | 494 | | |
495 | 495 | | |
496 | 496 | | |
| 497 | + | |
| 498 | + | |
497 | 499 | | |
498 | 500 | | |
499 | 501 | | |
| |||
0 commit comments