Coding Standards: Correct db_version
check in wp-admin/admin.php
.
Follow-up to [47785]. See #49239. git-svn-id: https://develop.svn.wordpress.org/trunk@47787 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
b42fe1e654
commit
6e8ab8448a
@ -36,6 +36,7 @@ require_once dirname( __DIR__ ) . '/wp-load.php';
|
|||||||
nocache_headers();
|
nocache_headers();
|
||||||
|
|
||||||
if ( get_option( 'db_upgraded' ) ) {
|
if ( get_option( 'db_upgraded' ) ) {
|
||||||
|
|
||||||
flush_rewrite_rules();
|
flush_rewrite_rules();
|
||||||
update_option( 'db_upgraded', false );
|
update_option( 'db_upgraded', false );
|
||||||
|
|
||||||
@ -45,7 +46,9 @@ if ( get_option( 'db_upgraded' ) ) {
|
|||||||
* @since 2.8.0
|
* @since 2.8.0
|
||||||
*/
|
*/
|
||||||
do_action( 'after_db_upgrade' );
|
do_action( 'after_db_upgrade' );
|
||||||
} elseif ( get_option( 'db_version' ) !== $wp_db_version && empty( $_POST ) ) {
|
|
||||||
|
} elseif ( (int) get_option( 'db_version' ) !== $wp_db_version && empty( $_POST ) ) {
|
||||||
|
|
||||||
if ( ! is_multisite() ) {
|
if ( ! is_multisite() ) {
|
||||||
wp_redirect( admin_url( 'upgrade.php?_wp_http_referer=' . urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ) ) );
|
wp_redirect( admin_url( 'upgrade.php?_wp_http_referer=' . urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ) ) );
|
||||||
exit;
|
exit;
|
||||||
|
Loading…
Reference in New Issue
Block a user