[wp-trac] [WordPress Trac] #65403: Code Quality: Admin Bar - Simplify node retrieval using null coalescing operator
WordPress Trac
noreply at wordpress.org
Thu Jun 4 08:45:44 UTC 2026
#65403: Code Quality: Admin Bar - Simplify node retrieval using null coalescing
operator
-------------------------+---------------------
Reporter: Soean | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: 7.1
Component: Toolbar | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
-------------------------+---------------------
Changes (by sabernhardt):
* component: General => Toolbar
* milestone: Awaiting Review => 7.1
Old description:
> WP_Admin_Bar->_get_node() returns an `object` or `null` since
> [[https://core.trac.wordpress.org/changeset/62178/trunk/src/wp-includes
> /class-wp-admin-bar.php|r62178]]. Now we can use the null coalescing
> operator and simplify the code.
New description:
`WP_Admin_Bar->_get_node()` returns an `object` or `null` since
[[https://core.trac.wordpress.org/changeset/62178/trunk/src/wp-includes
/class-wp-admin-bar.php|r62178]]. Now we can use the null coalescing
operator and simplify the code.
--
--
Ticket URL: <https://core.trac.wordpress.org/ticket/65403#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list