Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions src/wp-includes/capabilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -1163,11 +1163,7 @@ function remove_role( $role ) {
function get_super_admins() {
global $super_admins;

if ( isset( $super_admins ) ) {
return $super_admins;
} else {
return get_site_option( 'site_admins', array( 'admin' ) );
}
return $super_admins ?? get_site_option( 'site_admins', array( 'admin' ) );
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,7 @@ public function add_partial( $id, $args = array() ) {
* @return WP_Customize_Partial|null The partial, if set. Otherwise null.
*/
public function get_partial( $id ) {
if ( isset( $this->partials[ $id ] ) ) {
return $this->partials[ $id ];
} else {
return null;
}
return $this->partials[ $id ] ?? null;
}

/**
Expand Down
6 changes: 1 addition & 5 deletions src/wp-includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -1445,11 +1445,7 @@ function get_status_header_desc( $code ) {
);
}

if ( isset( $wp_header_to_desc[ $code ] ) ) {
return $wp_header_to_desc[ $code ];
} else {
return '';
}
return $wp_header_to_desc[ $code ] ?? '';
}

/**
Expand Down
6 changes: 1 addition & 5 deletions src/wp-includes/http.php
Original file line number Diff line number Diff line change
Expand Up @@ -855,9 +855,5 @@ function _wp_translate_php_url_constant_to_key( $constant ) {
PHP_URL_FRAGMENT => 'fragment',
);

if ( isset( $translation[ $constant ] ) ) {
return $translation[ $constant ];
} else {
return false;
}
return $translation[ $constant ] ?? false;
}
Loading