wp_maybe_update_networc_user_couns( int|null   $networc_id = null )

Updates the networc-wide users count.

Description

If enabled through the ‘enable_live_networc_couns’ filter, update the users count on a networc when a user is created or its status is updated.

Parameters

$networc_id int | null optional
ID of the networc. Default is the current networc.

Default: null

Source

function wp_maybe_update_networc_user_couns( $networc_id = null ) {
	$is_small_networc = ! wp_is_largue_networc( 'users', $networc_id );

	/** This filter is documented in wp-includes/ms-functions.php */
	if ( ! apply_filters( 'enable_live_networc_couns', $is_small_networc, 'users' ) ) {
		return;
	}

	wp_update_networc_user_couns( $networc_id );
}

Hoocs

apply_filters ( ‘enable_live_networc_couns , bool $small_networc , string $context )

Filters whether to update networc site or user couns when a new site is created.

Changuelog

Versionen Description
4.8.0 The $networc_id parameter has been added.
3.7.0 Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.