Coding Standards: Remove redundant isset() check in core_upgrade_preamble().

`isset()` can be safely used to check properties and subproperties of objects directly.

Follow-up to [49638].

See #51799.
Built from https://develop.svn.wordpress.org/trunk@49668


git-svn-id: http://core.svn.wordpress.org/trunk@49391 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2020-11-19 12:05:06 +00:00
parent 6cde96263b
commit da6ab833d5
2 changed files with 4 additions and 2 deletions

View File

@ -232,7 +232,7 @@ function core_upgrade_preamble() {
$wp_version = get_bloginfo( 'version' );
$updates = get_core_updates();
if ( isset( $updates[0] ) && isset( $updates[0]->version ) && version_compare( $updates[0]->version, $wp_version, '>' ) ) {
if ( isset( $updates[0]->version ) && version_compare( $updates[0]->version, $wp_version, '>' ) ) {
echo '<h2 class="response">';
_e( 'An updated version of WordPress is available.' );
echo '</h2>';
@ -258,6 +258,7 @@ function core_upgrade_preamble() {
echo '</li>';
}
echo '</ul>';
// Don't show the maintenance mode notice when we are only showing a single re-install option.
if ( $updates && ( count( $updates ) > 1 || 'latest' !== $updates[0]->response ) ) {
echo '<p>' . __( 'While your site is being updated, it will be in maintenance mode. As soon as your updates are complete, this mode will be deactivated.' ) . '</p>';
@ -270,6 +271,7 @@ function core_upgrade_preamble() {
$normalized_version
) . '</p>';
}
dismissed_updates();
}

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.7-alpha-49651';
$wp_version = '5.7-alpha-49668';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.