Make WordPress Core


Ignore:
Timestamp:
01/09/2026 04:20:21 AM (3 months ago)
Author:
westonruter
Message:

Code Modernization: Administration: Use null coalescing operator instead of isset() ternaries.

Developed as a subset of https://github.com/WordPress/wordpress-develop/pull/10654
Initially developed in https://github.com/WordPress/wordpress-develop/pull/4886

Follow-up to [61455], [61454], [61453], [61445], [61444], [61443], [61442], [61436], [61435], [61434], [61403], [61433], [61432], [61431], [61430], [61429], [61424], [61404], [61403].

Props costdev, westonruter.
See #58874, #63430.

File:
1 edited

Legend:

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

    r61300 r61456  
    809809        );
    810810
    811         $old_help = isset( self::$_old_compat_help[ $this->id ] ) ? self::$_old_compat_help[ $this->id ] : '';
     811        $old_help = self::$_old_compat_help[ $this->id ] ?? '';
    812812
    813813        /**
     
    12581258
    12591259        if ( 'edit_comments_per_page' === $option ) {
    1260             $comment_status = isset( $_REQUEST['comment_status'] ) ? $_REQUEST['comment_status'] : 'all';
     1260            $comment_status = $_REQUEST['comment_status'] ?? 'all';
    12611261
    12621262            /** This filter is documented in wp-admin/includes/class-wp-comments-list-table.php */
Note: See TracChangeset for help on using the changeset viewer.