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() ) { |
695 | 695 | ) |
696 | 696 | ); |
697 | 697 | |
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 | | |
709 | 698 | $orig_installing = wp_installing(); |
710 | 699 | if ( ! $orig_installing ) { |
711 | 700 | wp_installing( true ); |
… |
… |
function wp_initialize_site( $site_id, array $args = array() ) { |
719 | 708 | |
720 | 709 | require_once( ABSPATH . 'wp-admin/includes/upgrade.php' ); |
721 | 710 | |
| 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 | |
722 | 722 | // Set up the database tables. |
723 | 723 | make_db_current_silent( 'blog' ); |
724 | 724 | |