true]) : []; $latest = (!empty($updates) && !empty($updates[0]->current)) ? $updates[0]->current : $wp_version; $behind = version_compare($wp_version, $latest, '<'); $f[] = $this->finding( 'wp_current', 'info', 'Currently installed', $wp_version, '' ); $f[] = $this->finding( 'wp_latest', $behind ? 'warn' : 'ok', 'Latest available', $latest, $behind ? 'Update available → ' . admin_url('update-core.php') : 'Up to date.' ); // Database upgrade required? if (function_exists('wp_get_db_schema')) { $required = (int) get_option('db_version'); global $wp_db_version; if ($required > 0 && $wp_db_version > $required) { $f[] = $this->finding('db_upgrade', 'warn', 'Database upgrade', 'pending', 'WP code is at v' . $wp_db_version . ', database at v' . $required . '. Visit /wp-admin/upgrade.php.'); } else { $f[] = $this->finding('db_upgrade', 'ok', 'Database upgrade', 'not needed', ''); } } // Auto-updates configured? $core_auto = get_site_option('auto_update_core_major', null); if ($core_auto === null) $core_auto = defined('WP_AUTO_UPDATE_CORE') ? (string) WP_AUTO_UPDATE_CORE : 'minor'; $f[] = $this->finding( 'auto_update', 'info', 'Core auto-update policy', (string) $core_auto, 'Configured via Updates → Auto-updates or the WP_AUTO_UPDATE_CORE constant.' ); // Safe-mode update guidance — not an action, just a reminder. if ($behind) { $f[] = $this->finding( 'safe_mode_hint', 'info', 'Safe-update sequence', 'see detail', 'Deactivate non-essential plugins → run the update → smoke-load front-end + wp-admin → reactivate plugins.' ); } return $f; } };