Commit b057ff2
committed
Script Loader: Warn when a registered style has invalid
When a stylesheet is registered with a `path` that does not exist or which is not readable, then a `_doing_it_wrong()` is now issued. Previously, paths that did not exist were silently skipped; paths for empty styles were also needlessly skipped, since `wp_filesize()` also returns `0` for the failure case.
Developed in WordPress#10653
Follow-up to [50836].
Props westonruter, jonsurrell, soyebsalar01.
See #52620.
Fixes #64447.
git-svn-id: https://develop.svn.wordpress.org/trunk@61416 602fd350-edb4-49c9-b593-d223f7449a82path data and allow inlining empty stylesheets.1 parent 1bd29b1 commit b057ff2
File tree
4 files changed
+104
-7
lines changed- src/wp-includes
- tests/phpunit/tests
- dependencies
4 files changed
+104
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3010 | 3010 | | |
3011 | 3011 | | |
3012 | 3012 | | |
3013 | | - | |
| 3013 | + | |
| 3014 | + | |
| 3015 | + | |
| 3016 | + | |
| 3017 | + | |
| 3018 | + | |
| 3019 | + | |
| 3020 | + | |
| 3021 | + | |
| 3022 | + | |
| 3023 | + | |
| 3024 | + | |
3014 | 3025 | | |
3015 | 3026 | | |
3016 | 3027 | | |
| |||
3048 | 3059 | | |
3049 | 3060 | | |
3050 | 3061 | | |
| 3062 | + | |
| 3063 | + | |
| 3064 | + | |
| 3065 | + | |
| 3066 | + | |
| 3067 | + | |
| 3068 | + | |
| 3069 | + | |
| 3070 | + | |
| 3071 | + | |
| 3072 | + | |
| 3073 | + | |
| 3074 | + | |
| 3075 | + | |
3051 | 3076 | | |
3052 | 3077 | | |
3053 | 3078 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
716 | 716 | | |
717 | 717 | | |
718 | 718 | | |
| 719 | + | |
719 | 720 | | |
720 | 721 | | |
| 722 | + | |
721 | 723 | | |
722 | | - | |
| 724 | + | |
723 | 725 | | |
724 | 726 | | |
725 | 727 | | |
| |||
768 | 770 | | |
769 | 771 | | |
770 | 772 | | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
771 | 837 | | |
772 | 838 | | |
773 | 839 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6677 | 6677 | | |
6678 | 6678 | | |
6679 | 6679 | | |
| 6680 | + | |
| 6681 | + | |
| 6682 | + | |
| 6683 | + | |
6680 | 6684 | | |
6681 | 6685 | | |
6682 | 6686 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1677 | 1677 | | |
1678 | 1678 | | |
1679 | 1679 | | |
| 1680 | + | |
| 1681 | + | |
| 1682 | + | |
1680 | 1683 | | |
1681 | 1684 | | |
1682 | 1685 | | |
| |||
1711 | 1714 | | |
1712 | 1715 | | |
1713 | 1716 | | |
| 1717 | + | |
| 1718 | + | |
1714 | 1719 | | |
1715 | 1720 | | |
1716 | 1721 | | |
| |||
1827 | 1832 | | |
1828 | 1833 | | |
1829 | 1834 | | |
1830 | | - | |
1831 | | - | |
1832 | | - | |
1833 | | - | |
1834 | | - | |
| 1835 | + | |
| 1836 | + | |
1835 | 1837 | | |
1836 | 1838 | | |
1837 | 1839 | | |
| |||
0 commit comments