Commit f40b60d
committed
Media: Fix playlist shortcodes not rendering correctly if the first playlist is broken.
The playlist shortcode has a base set of JavaScript that should only be loaded once. Previously, this JS was only loaded the first time a playlist shortcode was processed. If the first playlist was broken, because the media file was missing for instance, this would break all other playlists on the page.
This commit introduces a new static variable to keep track of whether the necessary JavaScript has been loaded instead.
Props iamadisingh, abcd95, justlevine, jorbin, rollybueno, Guido07111975.
Fixes #63583.
git-svn-id: https://develop.svn.wordpress.org/trunk@60678 602fd350-edb4-49c9-b593-d223f7449a821 parent d76a54a commit f40b60d
File tree
2 files changed
+31
-1
lines changed- src/wp-includes
- tests/phpunit/tests/media
2 files changed
+31
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3056 | 3056 | | |
3057 | 3057 | | |
3058 | 3058 | | |
| 3059 | + | |
| 3060 | + | |
3059 | 3061 | | |
3060 | 3062 | | |
3061 | 3063 | | |
| |||
3237 | 3239 | | |
3238 | 3240 | | |
3239 | 3241 | | |
3240 | | - | |
| 3242 | + | |
3241 | 3243 | | |
3242 | 3244 | | |
3243 | 3245 | | |
| |||
3247 | 3249 | | |
3248 | 3250 | | |
3249 | 3251 | | |
| 3252 | + | |
3250 | 3253 | | |
3251 | 3254 | | |
3252 | 3255 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
0 commit comments