Make WordPress Core

Changeset 55826


Ignore:
Timestamp:
05/19/2023 12:44:54 PM (7 months ago)
Author:
spacedmonkey
Message:

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.

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/meta.php

    r55818 r55826  
    1010 * @subpackage Meta
    1111 */
     12
     13require ABSPATH . WPINC . '/class-wp-metadata-lazyloader.php';
    1214
    1315/**
     
    12151217
    12161218    if ( null === $wp_metadata_lazyloader ) {
    1217         if ( ! class_exists( 'WP_Metadata_Lazyloader' ) ) {
    1218             require_once ABSPATH . WPINC . '/class-wp-metadata-lazyloader.php';
    1219         }
    12201219        $wp_metadata_lazyloader = new WP_Metadata_Lazyloader();
    12211220    }
  • trunk/src/wp-settings.php

    r55443 r55826  
    189189require ABSPATH . WPINC . '/class-wp-session-tokens.php';
    190190require ABSPATH . WPINC . '/class-wp-user-meta-session-tokens.php';
    191 require ABSPATH . WPINC . '/class-wp-metadata-lazyloader.php';
    192191require ABSPATH . WPINC . '/general-template.php';
    193192require ABSPATH . WPINC . '/link-template.php';
Note: See TracChangeset for help on using the changeset viewer.