[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:39:49 UTC 2026
#65403: Code Quality: Admin Bar - Simplify node retrieval using null coalescing
operator
--------------------------+-----------------------------
Reporter: Soean | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
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>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list