Skip to content

Commit aa79846

Browse files
committed
Inverse default & rename hooks
1 parent e337521 commit aa79846

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/wp-admin/network/users.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,12 @@
9797
*
9898
* @since 6.7
9999
*
100-
* @param bool $update_blog_status Whether to update the blog status. Default true.
100+
* @param bool $update_blog_status Whether to update the blog status. Default false.
101101
*/
102-
if ( apply_filters( 'handle_allusers_update_blog_status', true ) ) {
102+
if ( apply_filters( 'handle_network_allusers_update_blog_status', false ) ) {
103103
$blogs = get_blogs_of_user( $user_id, true );
104104

105-
foreach ( (array) $blogs as $details ) {
105+
foreach ( $blogs as $details ) {
106106
if ( ! is_main_site( $details->userblog_id ) ) { // Main site is not a spam!
107107
update_blog_status( $details->userblog_id, 'spam', '1' );
108108
}
@@ -130,10 +130,10 @@
130130
$userfunction = 'all_notspam';
131131

132132
/** This filter is documented in wp-admin/network/users.php#L95 */
133-
if ( apply_filters( 'handle_allusers_blog_status', true ) ) {
133+
if ( apply_filters( 'handle_network_allusers_update_blog_status', false ) ) {
134134
$blogs = get_blogs_of_user( $user_id, true );
135135

136-
foreach ( (array) $blogs as $details ) {
136+
foreach ( $blogs as $details ) {
137137
if ( ! is_main_site( $details->userblog_id ) ) { // Main site is never a spam!
138138
update_blog_status( $details->userblog_id, 'spam', '0' );
139139
}

0 commit comments

Comments
 (0)