Commit 9ad162e
committed
Posts, Post Types: Check if the post type exists in
This adds a guard to verify the result of `get_post_type_object()` before retrieving the `all_items` label, as the function returns `null` if the post type does not exist.
Follow-up to [24527].
Props pcarvalho, akshat280, mukesh27, SergeyBiryukov.
Fixes #60947.
git-svn-id: https://develop.svn.wordpress.org/trunk@58983 602fd350-edb4-49c9-b593-d223f7449a82_admin_notice_post_locked().1 parent 583bbce commit 9ad162e
1 file changed
+8
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1804 | 1804 | | |
1805 | 1805 | | |
1806 | 1806 | | |
1807 | | - | |
1808 | | - | |
| 1807 | + | |
| 1808 | + | |
1809 | 1809 | | |
1810 | | - | |
1811 | | - | |
| 1810 | + | |
1812 | 1811 | | |
1813 | 1812 | | |
1814 | 1813 | | |
1815 | 1814 | | |
1816 | 1815 | | |
1817 | 1816 | | |
1818 | | - | |
| 1817 | + | |
| 1818 | + | |
| 1819 | + | |
| 1820 | + | |
| 1821 | + | |
1819 | 1822 | | |
1820 | 1823 | | |
1821 | 1824 | | |
| |||
0 commit comments