Networks and Sites: Load `WP_Metadata_Lazyloader` class file if class in meta.php.

In [55818] did a check to see if `WP_Metadata_Lazyloader` class existed and the loaded in the class file if it did not. However, require in wp-settings.php was not removed and resulted in the class being loaded twice. To be safe, only include the class file in meta.php and remove from wp-settings.php file.

Props spacedmonkey, ryelle.
See #58185.
Built from https://develop.svn.wordpress.org/trunk@55826


git-svn-id: http://core.svn.wordpress.org/trunk@55338 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
spacedmonkey 2023-05-19 12:46:24 +00:00
parent 2b28fea7c9
commit 0670401bae
3 changed files with 3 additions and 5 deletions

View File

@ -10,6 +10,8 @@
* @subpackage Meta
*/
require ABSPATH . WPINC . '/class-wp-metadata-lazyloader.php';
/**
* Adds metadata for the specified object.
*
@ -1214,9 +1216,6 @@ function wp_metadata_lazyloader() {
static $wp_metadata_lazyloader;
if ( null === $wp_metadata_lazyloader ) {
if ( ! class_exists( 'WP_Metadata_Lazyloader' ) ) {
require_once ABSPATH . WPINC . '/class-wp-metadata-lazyloader.php';
}
$wp_metadata_lazyloader = new WP_Metadata_Lazyloader();
}

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.3-alpha-55825';
$wp_version = '6.3-alpha-55826';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

View File

@ -188,7 +188,6 @@ require ABSPATH . WPINC . '/user.php';
require ABSPATH . WPINC . '/class-wp-user-query.php';
require ABSPATH . WPINC . '/class-wp-session-tokens.php';
require ABSPATH . WPINC . '/class-wp-user-meta-session-tokens.php';
require ABSPATH . WPINC . '/class-wp-metadata-lazyloader.php';
require ABSPATH . WPINC . '/general-template.php';
require ABSPATH . WPINC . '/link-template.php';
require ABSPATH . WPINC . '/author-template.php';