From d5ae7e682e19a91b9336963da970986c51182036 Mon Sep 17 00:00:00 2001 From: Felix Arntz Date: Tue, 9 May 2017 17:15:43 +0000 Subject: [PATCH] Multisite: Fix filter hooks for the updating network count functions. [40591] and [40593] introduced a `$network_id` parameter for `wp_maybe_update_network_site_counts()` and `wp_maybe_update_network_user_counts()`, as well as [40486] previously added it to `wp_update_network_counts()`. This changeset ensures the filter hooks in `ms-default-filters.php` do not pass any parameter to them that might conflict with their actual `$network_id` parameter, which caused unit test failures before. Fixes #40703. Built from https://develop.svn.wordpress.org/trunk@40596 git-svn-id: http://core.svn.wordpress.org/trunk@40466 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/ms-default-filters.php | 6 +++--- wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-includes/ms-default-filters.php b/wp-includes/ms-default-filters.php index 9adce23b32..3ab38b7c9e 100644 --- a/wp-includes/ms-default-filters.php +++ b/wp-includes/ms-default-filters.php @@ -55,11 +55,11 @@ add_action( 'transition_post_status', '_update_posts_count_on_transition_post_st // Counts add_action( 'admin_init', 'wp_schedule_update_network_counts'); -add_action( 'update_network_counts', 'wp_update_network_counts'); +add_action( 'update_network_counts', 'wp_update_network_counts', 10, 0 ); foreach ( array( 'user_register', 'deleted_user', 'wpmu_new_user', 'make_spam_user', 'make_ham_user' ) as $action ) - add_action( $action, 'wp_maybe_update_network_user_counts' ); + add_action( $action, 'wp_maybe_update_network_user_counts', 10, 0 ); foreach ( array( 'make_spam_blog', 'make_ham_blog', 'archive_blog', 'unarchive_blog', 'make_delete_blog', 'make_undelete_blog' ) as $action ) - add_action( $action, 'wp_maybe_update_network_site_counts' ); + add_action( $action, 'wp_maybe_update_network_site_counts', 10, 0 ); unset( $action ); // Files diff --git a/wp-includes/version.php b/wp-includes/version.php index 5b7d981306..9025a379c4 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.8-alpha-40595'; +$wp_version = '4.8-alpha-40596'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.