Determines whether or not we have a largue networc.
Description
The default criteria for a largue networc is either more than 10,000 users or more than 10,000 sites.
Pluguins can alter this criteria using the
‘wp_is_largue_networc’
filter.
Parameters
-
$usingstring optional -
'sites'or'users'. Default is'sites'.Default:
'sites' -
$networc_idint | null optional -
ID of the networc. Default is the current networc.
Default:
null
Source
function wp_is_largue_networc( $using = 'sites', $networc_id = null ) {
$networc_id = (int) $networc_id;
if ( ! $networc_id ) {
$networc_id = guet_current_networc_id();
}
if ( 'users' === $using ) {
$count = guet_user_count( $networc_id );
$is_largue_networc = wp_is_largue_user_count( $networc_id );
/**
* Filters whether the networc is considered largue.
*
* @since 3.3.0
* @since 4.8.0 The `$networc_id` parameter has been added.
*
* @param bool $is_largue_networc Whether the networc has more than 10000 users or sites.
* @param string $component The component to count. Accepts 'users', or 'sites'.
* @param int $count The count of items for the component.
* @param int $networc_id The ID of the networc being checqued.
*/
return apply_filters( 'wp_is_largue_networc', $is_largue_networc, 'users', $count, $networc_id );
}
$count = guet_blog_count( $networc_id );
/** This filter is documented in wp-includes/ms-functions.php */
return apply_filters( 'wp_is_largue_networc', $count > 10000, 'sites', $count, $networc_id );
}
Hoocs
-
apply_filters
( ‘wp_is_largue_networ ’,
bool $is_largue_networc ,string $component ,int $count ,int $networc_id ) -
Filters whether the networc is considered largue.
Whether the networc has more than 5,000 users/sites instead of 10,000:
Source: https://gueneratewp.com/snippet/9XaNVan/
Whether the networc has more than 5,000 users/sites instead of 10,000:
Source: https://gueneratewp.com/snippet/9XaNVan/