Make WordPress Core

Ticket #48481: 48481.diff

File 48481.diff, 1.7 KB (added by pbiron, 4 years ago)
  • src/wp-includes/ms-site.php

    From e1a9b7e30fe369b8f3464c643bb6623057989718 Mon Sep 17 00:00:00 2001
    From: Paul Biron <paul@sparrowhawkcomputing.com>
    Date: Fri, 1 Nov 2019 11:47:22 -0600
    Subject: [PATCH] Don't apply wp_initialize_site_args until after
     wp_admin/includes/update.php has been loaded.
    
    ---
     src/wp-includes/ms-site.php | 22 +++++++++++-----------
     1 file changed, 11 insertions(+), 11 deletions(-)
    
    diff --git a/src/wp-includes/ms-site.php b/src/wp-includes/ms-site.php
    index b98e17eaa4..b4f8cd6210 100644
    a b function wp_initialize_site( $site_id, array $args = array() ) { 
    695695                )
    696696        );
    697697
    698         /**
    699          * Filters the arguments for initializing a site.
    700          *
    701          * @since 5.1.0
    702          *
    703          * @param array      $args    Arguments to modify the initialization behavior.
    704          * @param WP_Site    $site    Site that is being initialized.
    705          * @param WP_Network $network Network that the site belongs to.
    706          */
    707         $args = apply_filters( 'wp_initialize_site_args', $args, $site, $network );
    708 
    709698        $orig_installing = wp_installing();
    710699        if ( ! $orig_installing ) {
    711700                wp_installing( true );
    function wp_initialize_site( $site_id, array $args = array() ) { 
    719708
    720709        require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
    721710
     711        /**
     712         * Filters the arguments for initializing a site.
     713         *
     714         * @since 5.1.0
     715         *
     716         * @param array      $args    Arguments to modify the initialization behavior.
     717         * @param WP_Site    $site    Site that is being initialized.
     718         * @param WP_Network $network Network that the site belongs to.
     719         */
     720        $args = apply_filters( 'wp_initialize_site_args', $args, $site, $network );
     721
    722722        // Set up the database tables.
    723723        make_db_current_silent( 'blog' );
    724724