Make WordPress Core

Changeset 62460


Ignore:
Timestamp:
06/04/2026 01:02:50 PM (4 days ago)
Author:
audrasjb
Message:

Code Modernization: Simplify node retrieval using null coalescing operator.

This changeset makes a small code readability improvement in the _get_node() function inside the WP_Admin_Bar class.

Props Soean, mukesh27.
Fixes #65403.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-admin-bar.php

    r62178 r62460  
    219219        }
    220220
    221         if ( isset( $this->nodes[ $id ] ) ) {
    222             return $this->nodes[ $id ];
    223         }
    224         return null;
     221        return $this->nodes[ $id ] ?? null;
    225222    }
    226223
Note: See TracChangeset for help on using the changeset viewer.