[wp-trac] [WordPress Trac] #49374: Use get_post_states to denote special pages on the added menu item accordions
WordPress Trac
noreply at wordpress.org
Sat Jan 10 06:36:57 UTC 2026
#49374: Use get_post_states to denote special pages on the added menu item
accordions
-------------------------------------------------+-------------------------
Reporter: garrett-eclipse | Owner:
| SergeyBiryukov
Type: enhancement | Status: closed
Priority: normal | Milestone: 5.4
Component: Menus | Version: 5.3
Severity: normal | Resolution: fixed
Keywords: has-patch has-screenshots commit | Focuses: ui,
fixed-major dev-reviewed | administration
-------------------------------------------------+-------------------------
Comment (by westonruter):
In [changeset:"61465" 61465]:
{{{
#!CommitTicketReference repository="" revision="61465"
Menus: Ensure a `WP_Post` instance gets passed to `get_post_states()` in
`wp_setup_nav_menu_item()`.
The `get_post_states()` function is also hardened to short-circuit in case
a non-`WP_Post` is passed. A test is added to verify this.
Developed in https://github.com/WordPress/wordpress-develop/pull/10706
Follow-up to [47211].
Props apedog, josephscott, joemcgill, westonruter.
See #49374.
Fixes #58932.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/49374#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list