--- a/wp/wp-admin/includes/update.php Fri Sep 05 18:40:08 2025 +0200
+++ b/wp/wp-admin/includes/update.php Fri Sep 05 18:52:52 2025 +0200
@@ -264,10 +264,7 @@
$cur->response = '';
}
- // Include an unmodified $wp_version.
- require ABSPATH . WPINC . '/version.php';
-
- $is_development_version = preg_match( '/alpha|beta|RC/', $wp_version );
+ $is_development_version = preg_match( '/alpha|beta|RC/', wp_get_wp_version() );
if ( $is_development_version ) {
return sprintf(
@@ -404,7 +401,7 @@
*
* @since 2.9.0
*
- * @return array
+ * @return object[]
*/
function get_plugin_updates() {
$all_plugins = get_plugins();
@@ -627,7 +624,7 @@
*
* @since 2.9.0
*
- * @return array
+ * @return WP_Theme[]
*/
function get_theme_updates() {
$current = get_site_transient( 'update_themes' );
@@ -854,8 +851,6 @@
* @return void|false
*/
function maintenance_nag() {
- // Include an unmodified $wp_version.
- require ABSPATH . WPINC . '/version.php';
global $upgrading;
$nag = isset( $upgrading );
@@ -873,7 +868,7 @@
* This flag is cleared whenever a successful update occurs using Core_Upgrader.
*/
$comparison = ! empty( $failed['critical'] ) ? '>=' : '>';
- if ( isset( $failed['attempted'] ) && version_compare( $failed['attempted'], $wp_version, $comparison ) ) {
+ if ( isset( $failed['attempted'] ) && version_compare( $failed['attempted'], wp_get_wp_version(), $comparison ) ) {
$nag = true;
}
}