mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-03 06:57:35 +01:00
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:
parent
6cde96263b
commit
da6ab833d5
@ -232,7 +232,7 @@ function core_upgrade_preamble() {
|
|||||||
$wp_version = get_bloginfo( 'version' );
|
$wp_version = get_bloginfo( 'version' );
|
||||||
$updates = get_core_updates();
|
$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">';
|
echo '<h2 class="response">';
|
||||||
_e( 'An updated version of WordPress is available.' );
|
_e( 'An updated version of WordPress is available.' );
|
||||||
echo '</h2>';
|
echo '</h2>';
|
||||||
@ -258,6 +258,7 @@ function core_upgrade_preamble() {
|
|||||||
echo '</li>';
|
echo '</li>';
|
||||||
}
|
}
|
||||||
echo '</ul>';
|
echo '</ul>';
|
||||||
|
|
||||||
// Don't show the maintenance mode notice when we are only showing a single re-install option.
|
// 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 ) ) {
|
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>';
|
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
|
$normalized_version
|
||||||
) . '</p>';
|
) . '</p>';
|
||||||
}
|
}
|
||||||
|
|
||||||
dismissed_updates();
|
dismissed_updates();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user