<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[59159] trunk/src: General: Expand use of `wp_get_wp_version()`.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="https://core.trac.wordpress.org/changeset/59159">59159</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"https://core.trac.wordpress.org/changeset/59159","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>peterwilsoncc</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2024-10-03 00:23:53 +0000 (Thu, 03 Oct 2024)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>General: Expand use of `wp_get_wp_version()`.
Expands the use of `wp_get_wp_version()` to get an unmodified value of the current WordPress version in various locations in which it would be unhelpful if a plugin has modified the global `$wp_version`.
This includes:
* Theme and plugin compatibility tests
* During the upgrade process of WP Core
* Debug and site health data reports of the current version
* Version number display in the dashboard
* Block theme export and caching utilities
* The `WPDB` class
Props peterwilsoncc, hellofromtonya.
See <a href="https://core.trac.wordpress.org/ticket/61627">#61627</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpadminincludesclasscoreupgraderphp">trunk/src/wp-admin/includes/class-core-upgrader.php</a></li>
<li><a href="#trunksrcwpadminincludesclassplugininstallerskinphp">trunk/src/wp-admin/includes/class-plugin-installer-skin.php</a></li>
<li><a href="#trunksrcwpadminincludesclasspluginupgraderphp">trunk/src/wp-admin/includes/class-plugin-upgrader.php</a></li>
<li><a href="#trunksrcwpadminincludesclassthemeinstallerskinphp">trunk/src/wp-admin/includes/class-theme-installer-skin.php</a></li>
<li><a href="#trunksrcwpadminincludesclassthemeupgraderphp">trunk/src/wp-admin/includes/class-theme-upgrader.php</a></li>
<li><a href="#trunksrcwpadminincludesclasswpautomaticupdaterphp">trunk/src/wp-admin/includes/class-wp-automatic-updater.php</a></li>
<li><a href="#trunksrcwpadminincludesclasswpdebugdataphp">trunk/src/wp-admin/includes/class-wp-debug-data.php</a></li>
<li><a href="#trunksrcwpadminincludesclasswpsitehealthphp">trunk/src/wp-admin/includes/class-wp-site-health.php</a></li>
<li><a href="#trunksrcwpadminincludesdashboardphp">trunk/src/wp-admin/includes/dashboard.php</a></li>
<li><a href="#trunksrcwpadminincludesupdatecorephp">trunk/src/wp-admin/includes/update-core.php</a></li>
<li><a href="#trunksrcwpadminupdatecorephp">trunk/src/wp-admin/update-core.php</a></li>
<li><a href="#trunksrcwpincludesblocktemplateutilsphp">trunk/src/wp-includes/block-template-utils.php</a></li>
<li><a href="#trunksrcwpincludesblocksindexphp">trunk/src/wp-includes/blocks/index.php</a></li>
<li><a href="#trunksrcwpincludesclasswpdbphp">trunk/src/wp-includes/class-wpdb.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpadminincludesclasscoreupgraderphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/class-core-upgrader.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/class-core-upgrader.php 2024-10-02 19:01:52 UTC (rev 59158)
+++ trunk/src/wp-admin/includes/class-core-upgrader.php 2024-10-03 00:23:53 UTC (rev 59159)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -391,13 +391,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.7.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @global string $wp_version The WordPress version string.
</del><span class="cx" style="display: block; padding: 0 10px"> * @global string $wp_local_package Locale code of the package.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @return bool True if the checksums match, otherwise false.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function check_files() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- global $wp_version, $wp_local_package;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ global $wp_local_package;
+ $wp_version = wp_get_wp_version();
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $checksums = get_core_checksums( $wp_version, isset( $wp_local_package ) ? $wp_local_package : 'en_US' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="trunksrcwpadminincludesclassplugininstallerskinphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/class-plugin-installer-skin.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/class-plugin-installer-skin.php 2024-10-02 19:01:52 UTC (rev 59158)
+++ trunk/src/wp-admin/includes/class-plugin-installer-skin.php 2024-10-03 00:23:53 UTC (rev 59159)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -284,7 +284,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $error = sprintf(
</span><span class="cx" style="display: block; padding: 0 10px"> /* translators: 1: Current WordPress version, 2: Version required by the uploaded plugin. */
</span><span class="cx" style="display: block; padding: 0 10px"> __( 'Your WordPress version is %1$s, however the uploaded plugin requires %2$s.' ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- get_bloginfo( 'version' ),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ esc_html( wp_get_wp_version() ),
</ins><span class="cx" style="display: block; padding: 0 10px"> $requires_wp
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="trunksrcwpadminincludesclasspluginupgraderphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/class-plugin-upgrader.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/class-plugin-upgrader.php 2024-10-02 19:01:52 UTC (rev 59158)
+++ trunk/src/wp-admin/includes/class-plugin-upgrader.php 2024-10-03 00:23:53 UTC (rev 59159)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -274,8 +274,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 2.8.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.7.0 The `$args` parameter was added, making clearing the plugin update cache optional.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @global string $wp_version The WordPress version string.
- *
</del><span class="cx" style="display: block; padding: 0 10px"> * @param string[] $plugins Array of paths to plugin files relative to the plugins directory.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array $args {
</span><span class="cx" style="display: block; padding: 0 10px"> * Optional. Other arguments for upgrading several plugins at once.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -285,7 +283,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return array|false An array of results indexed by plugin file, or false if unable to connect to the filesystem.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function bulk_upgrade( $plugins, $args = array() ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- global $wp_version;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $wp_version = wp_get_wp_version();
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $defaults = array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'clear_update_cache' => true,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -457,14 +455,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.3.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @global string $wp_version The WordPress version string.
</del><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $source The path to the downloaded package source.
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string|WP_Error The source as passed, or a WP_Error object on failure.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function check_package( $source ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- global $wp_filesystem, $wp_version;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ global $wp_filesystem;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $wp_version = wp_get_wp_version();
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->new_plugin_data = array();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( is_wp_error( $source ) ) {
</span></span></pre></div>
<a id="trunksrcwpadminincludesclassthemeinstallerskinphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/class-theme-installer-skin.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/class-theme-installer-skin.php 2024-10-02 19:01:52 UTC (rev 59158)
+++ trunk/src/wp-admin/includes/class-theme-installer-skin.php 2024-10-03 00:23:53 UTC (rev 59159)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -319,7 +319,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $error = sprintf(
</span><span class="cx" style="display: block; padding: 0 10px"> /* translators: 1: Current WordPress version, 2: Version required by the uploaded theme. */
</span><span class="cx" style="display: block; padding: 0 10px"> __( 'Your WordPress version is %1$s, however the uploaded theme requires %2$s.' ),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- get_bloginfo( 'version' ),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ esc_html( wp_get_wp_version() ),
</ins><span class="cx" style="display: block; padding: 0 10px"> $requires_wp
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="trunksrcwpadminincludesclassthemeupgraderphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/class-theme-upgrader.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/class-theme-upgrader.php 2024-10-02 19:01:52 UTC (rev 59158)
+++ trunk/src/wp-admin/includes/class-theme-upgrader.php 2024-10-03 00:23:53 UTC (rev 59159)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -371,8 +371,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.0.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.7.0 The `$args` parameter was added, making clearing the update cache optional.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @global string $wp_version The WordPress version string.
- *
</del><span class="cx" style="display: block; padding: 0 10px"> * @param string[] $themes Array of the theme slugs.
</span><span class="cx" style="display: block; padding: 0 10px"> * @param array $args {
</span><span class="cx" style="display: block; padding: 0 10px"> * Optional. Other arguments for upgrading several themes at once. Default empty array.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -383,8 +381,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @return array[]|false An array of results, or false if unable to connect to the filesystem.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function bulk_upgrade( $themes, $args = array() ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- global $wp_version;
-
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $wp_version = wp_get_wp_version();
</ins><span class="cx" style="display: block; padding: 0 10px"> $defaults = array(
</span><span class="cx" style="display: block; padding: 0 10px"> 'clear_update_cache' => true,
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -558,14 +555,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.3.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @global string $wp_version The WordPress version string.
</del><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $source The path to the downloaded package source.
</span><span class="cx" style="display: block; padding: 0 10px"> * @return string|WP_Error The source as passed, or a WP_Error object on failure.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function check_package( $source ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- global $wp_filesystem, $wp_version;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ global $wp_filesystem;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $wp_version = wp_get_wp_version();
</ins><span class="cx" style="display: block; padding: 0 10px"> $this->new_theme_data = array();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( is_wp_error( $source ) ) {
</span></span></pre></div>
<a id="trunksrcwpadminincludesclasswpautomaticupdaterphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/class-wp-automatic-updater.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/class-wp-automatic-updater.php 2024-10-02 19:01:52 UTC (rev 59158)
+++ trunk/src/wp-admin/includes/class-wp-automatic-updater.php 2024-10-03 00:23:53 UTC (rev 59159)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -752,7 +752,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Send debugging email to admin for all development installations.
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! empty( $this->update_results ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $development_version = str_contains( get_bloginfo( 'version' ), '-' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $development_version = str_contains( wp_get_wp_version(), '-' );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Filters whether to send a debugging email for each automatic background update.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -795,7 +795,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param object $update_result The result of the core update. Includes the update offer and result.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> protected function after_core_update( $update_result ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $wp_version = get_bloginfo( 'version' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $wp_version = wp_get_wp_version();
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $core_update = $update_result->item;
</span><span class="cx" style="display: block; padding: 0 10px"> $result = $update_result->result;
</span></span></pre></div>
<a id="trunksrcwpadminincludesclasswpdebugdataphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/class-wp-debug-data.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/class-wp-debug-data.php 2024-10-02 19:01:52 UTC (rev 59158)
+++ trunk/src/wp-admin/includes/class-wp-debug-data.php 2024-10-03 00:23:53 UTC (rev 59159)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -46,7 +46,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $blog_public = get_option( 'blog_public' );
</span><span class="cx" style="display: block; padding: 0 10px"> $default_comment_status = get_option( 'default_comment_status' );
</span><span class="cx" style="display: block; padding: 0 10px"> $environment_type = wp_get_environment_type();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $core_version = get_bloginfo( 'version' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $core_version = wp_get_wp_version();
</ins><span class="cx" style="display: block; padding: 0 10px"> $core_updates = get_core_updates();
</span><span class="cx" style="display: block; padding: 0 10px"> $core_update_needed = '';
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre></div>
<a id="trunksrcwpadminincludesclasswpsitehealthphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/class-wp-site-health.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/class-wp-site-health.php 2024-10-02 19:01:52 UTC (rev 59158)
+++ trunk/src/wp-admin/includes/class-wp-site-health.php 2024-10-03 00:23:53 UTC (rev 59159)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -264,7 +264,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 'test' => 'wordpress_version',
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $core_current_version = get_bloginfo( 'version' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $core_current_version = wp_get_wp_version();
</ins><span class="cx" style="display: block; padding: 0 10px"> $core_updates = get_core_updates();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! is_array( $core_updates ) ) {
</span></span></pre></div>
<a id="trunksrcwpadminincludesdashboardphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/dashboard.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/dashboard.php 2024-10-02 19:01:52 UTC (rev 59158)
+++ trunk/src/wp-admin/includes/dashboard.php 2024-10-03 00:23:53 UTC (rev 59159)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2056,7 +2056,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 5.9.0 Send users to the Site Editor if the active theme is block-based.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_welcome_panel() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- list( $display_version ) = explode( '-', get_bloginfo( 'version' ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ list( $display_version ) = explode( '-', wp_get_wp_version() );
</ins><span class="cx" style="display: block; padding: 0 10px"> $can_customize = current_user_can( 'customize' );
</span><span class="cx" style="display: block; padding: 0 10px"> $is_block_theme = wp_is_block_theme();
</span><span class="cx" style="display: block; padding: 0 10px"> ?>
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -2070,7 +2070,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <a href="<?php echo esc_url( admin_url( 'about.php' ) ); ?>">
</span><span class="cx" style="display: block; padding: 0 10px"> <?php
</span><span class="cx" style="display: block; padding: 0 10px"> /* translators: %s: Current WordPress version. */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- printf( __( 'Learn more about the %s version.' ), $display_version );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ printf( __( 'Learn more about the %s version.' ), esc_html( $display_version ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> ?>
</span><span class="cx" style="display: block; padding: 0 10px"> </a>
</span><span class="cx" style="display: block; padding: 0 10px"> </p>
</span></span></pre></div>
<a id="trunksrcwpadminincludesupdatecorephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/includes/update-core.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/includes/update-core.php 2024-10-02 19:01:52 UTC (rev 59158)
+++ trunk/src/wp-admin/includes/update-core.php 2024-10-03 00:23:53 UTC (rev 59159)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1539,12 +1539,12 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @global array $_old_requests_files Requests files to be preloaded.
</span><span class="cx" style="display: block; padding: 0 10px"> * @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @global string $wp_version The WordPress version string.
</del><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $to Path to old WordPress installation.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function _preload_old_requests_classes_and_interfaces( $to ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- global $_old_requests_files, $wp_filesystem, $wp_version;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ global $_old_requests_files, $wp_filesystem;
+ $wp_version = wp_get_wp_version();
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /*
</span><span class="cx" style="display: block; padding: 0 10px"> * Requests was introduced in WordPress 4.6.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1587,14 +1587,14 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 3.3.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @global string $wp_version The WordPress version string.
- * @global string $pagenow The filename of the current screen.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * @global string $pagenow The filename of the current screen.
</ins><span class="cx" style="display: block; padding: 0 10px"> * @global string $action
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param string $new_version
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function _redirect_to_about_wordpress( $new_version ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- global $wp_version, $pagenow, $action;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ global $pagenow, $action;
+ $wp_version = wp_get_wp_version();
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( version_compare( $wp_version, '3.4-RC1', '>=' ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return;
</span></span></pre></div>
<a id="trunksrcwpadminupdatecorephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/update-core.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/update-core.php 2024-10-02 19:01:52 UTC (rev 59158)
+++ trunk/src/wp-admin/update-core.php 2024-10-03 00:23:53 UTC (rev 59159)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -37,7 +37,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> global $wp_local_package, $wpdb;
</span><span class="cx" style="display: block; padding: 0 10px"> static $first_pass = true;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $wp_version = get_bloginfo( 'version' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $wp_version = wp_get_wp_version();
</ins><span class="cx" style="display: block; padding: 0 10px"> $version_string = sprintf( '%s–%s', $update->current, get_locale() );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( 'en_US' === $update->locale && 'en_US' === get_locale() ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -393,7 +393,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $upgrade_major ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $wp_version = get_bloginfo( 'version' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $wp_version = wp_get_wp_version();
</ins><span class="cx" style="display: block; padding: 0 10px"> $updates = get_core_updates();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( isset( $updates[0]->version ) && version_compare( $updates[0]->version, $wp_version, '>' ) ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -460,7 +460,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 2.9.0
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function list_plugin_updates() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $wp_version = get_bloginfo( 'version' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $wp_version = wp_get_wp_version();
</ins><span class="cx" style="display: block; padding: 0 10px"> $cur_wp_version = preg_replace( '/-.*$/', '', $wp_version );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> require_once ABSPATH . 'wp-admin/includes/plugin-install.php';
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1101,7 +1101,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> echo '<h2 class="wp-current-version">';
</span><span class="cx" style="display: block; padding: 0 10px"> /* translators: Current version of WordPress. */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- printf( __( 'Current version: %s' ), get_bloginfo( 'version' ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ printf( __( 'Current version: %s' ), esc_html( wp_get_wp_version() ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> echo '</h2>';
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> echo '<p class="update-last-checked">';
</span></span></pre></div>
<a id="trunksrcwpincludesblocktemplateutilsphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/block-template-utils.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/block-template-utils.php 2024-10-02 19:01:52 UTC (rev 59158)
+++ trunk/src/wp-includes/block-template-utils.php 2024-10-03 00:23:53 UTC (rev 59159)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1404,12 +1404,10 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 5.9.0
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 6.0.0 Adds the whole theme to the export archive.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @global string $wp_version The WordPress version string.
- *
</del><span class="cx" style="display: block; padding: 0 10px"> * @return WP_Error|string Path of the ZIP file or error on failure.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function wp_generate_block_templates_export_file() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- global $wp_version;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $wp_version = wp_get_wp_version();
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! class_exists( 'ZipArchive' ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return new WP_Error( 'missing_zip_package', __( 'Zip Export not supported.' ) );
</span></span></pre></div>
<a id="trunksrcwpincludesblocksindexphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/blocks/index.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/blocks/index.php 2024-10-02 19:01:52 UTC (rev 59158)
+++ trunk/src/wp-includes/blocks/index.php 2024-10-03 00:23:53 UTC (rev 59159)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -25,11 +25,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * avoids unnecessary logic and filesystem lookups in the other function.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 6.3.0
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- *
- * @global string $wp_version The WordPress version string.
</del><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> function register_core_block_style_handles() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- global $wp_version;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $wp_version = wp_get_wp_version();
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! wp_should_load_separate_core_block_assets() ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return;
</span></span></pre></div>
<a id="trunksrcwpincludesclasswpdbphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/class-wpdb.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wpdb.php 2024-10-02 19:01:52 UTC (rev 59158)
+++ trunk/src/wp-includes/class-wpdb.php 2024-10-03 00:23:53 UTC (rev 59159)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3983,12 +3983,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 2.5.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * @global string $wp_version The WordPress version string.
</del><span class="cx" style="display: block; padding: 0 10px"> * @global string $required_mysql_version The required MySQL version string.
</span><span class="cx" style="display: block; padding: 0 10px"> * @return void|WP_Error
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> public function check_database_version() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- global $wp_version, $required_mysql_version;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ global $required_mysql_version;
+ $wp_version = wp_get_wp_version();
+
</ins><span class="cx" style="display: block; padding: 0 10px"> // Make sure the server has the required MySQL version.
</span><span class="cx" style="display: block; padding: 0 10px"> if ( version_compare( $this->db_version(), $required_mysql_version, '<' ) ) {
</span><span class="cx" style="display: block; padding: 0 10px"> /* translators: 1: WordPress version number, 2: Minimum required MySQL version number. */
</span></span></pre>
</div>
</div>
</body>
</html>