mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-03 15:08:10 +01:00
General: Do not use the new wp_get_wp_version()
in update-core.php
and class-core-upgrader.php
.
All functions that are used there must be present in both the previous version being upgraded from, and the later version that's being installed (e.g. when rolling back Core) as these files are used in both. Props djennez, SergeyBiryukov, jorbin, peterwilsoncc, azaozz. Fixes #62165. See 61627. Built from https://develop.svn.wordpress.org/trunk@59180 git-svn-id: http://core.svn.wordpress.org/trunk@58575 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
22e082f627
commit
847bac4a16
@ -13,6 +13,11 @@
|
||||
* It allows for WordPress to upgrade itself in combination with
|
||||
* the wp-admin/includes/update-core.php file.
|
||||
*
|
||||
* Note: newly introduced functions and methods cannot be used here.
|
||||
* All functions must be present in both the previous version being upgraded from,
|
||||
* and the later version that's being installed (e.g. when rolling back Core)
|
||||
* as this file is used in both.
|
||||
*
|
||||
* @since 2.8.0
|
||||
* @since 4.6.0 Moved to its own file from wp-admin/includes/class-wp-upgrader.php.
|
||||
*
|
||||
@ -391,13 +396,13 @@ class Core_Upgrader extends WP_Upgrader {
|
||||
*
|
||||
* @since 3.7.0
|
||||
*
|
||||
* @global string $wp_version The WordPress version string.
|
||||
* @global string $wp_local_package Locale code of the package.
|
||||
*
|
||||
* @return bool True if the checksums match, otherwise false.
|
||||
*/
|
||||
public function check_files() {
|
||||
global $wp_local_package;
|
||||
$wp_version = wp_get_wp_version();
|
||||
global $wp_version, $wp_local_package;
|
||||
|
||||
$checksums = get_core_checksums( $wp_version, isset( $wp_local_package ) ? $wp_local_package : 'en_US' );
|
||||
|
||||
|
@ -2,6 +2,11 @@
|
||||
/**
|
||||
* WordPress core upgrade functionality.
|
||||
*
|
||||
* Note: newly introduced functions and methods cannot be used here.
|
||||
* All functions must be present in both the previous version being upgraded from,
|
||||
* and the later version that's being installed (e.g. when rolling back Core)
|
||||
* as this file is used in both.
|
||||
*
|
||||
* @package WordPress
|
||||
* @subpackage Administration
|
||||
* @since 2.7.0
|
||||
@ -1539,12 +1544,12 @@ function update_core( $from, $to ) {
|
||||
*
|
||||
* @global array $_old_requests_files Requests files to be preloaded.
|
||||
* @global WP_Filesystem_Base $wp_filesystem WordPress filesystem subclass.
|
||||
* @global string $wp_version The WordPress version string.
|
||||
*
|
||||
* @param string $to Path to old WordPress installation.
|
||||
*/
|
||||
function _preload_old_requests_classes_and_interfaces( $to ) {
|
||||
global $_old_requests_files, $wp_filesystem;
|
||||
$wp_version = wp_get_wp_version();
|
||||
global $_old_requests_files, $wp_filesystem, $wp_version;
|
||||
|
||||
/*
|
||||
* Requests was introduced in WordPress 4.6.
|
||||
@ -1587,14 +1592,14 @@ function _preload_old_requests_classes_and_interfaces( $to ) {
|
||||
*
|
||||
* @since 3.3.0
|
||||
*
|
||||
* @global string $wp_version The WordPress version string.
|
||||
* @global string $pagenow The filename of the current screen.
|
||||
* @global string $action
|
||||
*
|
||||
* @param string $new_version
|
||||
*/
|
||||
function _redirect_to_about_wordpress( $new_version ) {
|
||||
global $pagenow, $action;
|
||||
$wp_version = wp_get_wp_version();
|
||||
global $wp_version, $pagenow, $action;
|
||||
|
||||
if ( version_compare( $wp_version, '3.4-RC1', '>=' ) ) {
|
||||
return;
|
||||
|
@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.7-beta1-59179';
|
||||
$wp_version = '6.7-beta1-59180';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user