Title: enable_live_network_counts
Published: April 25, 2014
Last modified: April 28, 2025

---

# apply_filters( ‘enable_live_network_counts’, bool $small_network, string $context )

## In this article

 * [Description](https://developer.wordpress.org/reference/hooks/enable_live_network_counts/?output_format=md#description)
    - [See also](https://developer.wordpress.org/reference/hooks/enable_live_network_counts/?output_format=md#see-also)
 * [Parameters](https://developer.wordpress.org/reference/hooks/enable_live_network_counts/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/enable_live_network_counts/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/enable_live_network_counts/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/enable_live_network_counts/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/enable_live_network_counts/?output_format=md#wp--skip-link--target)

Filters whether to update network site or user counts when a new site is created.

## 󠀁[Description](https://developer.wordpress.org/reference/hooks/enable_live_network_counts/?output_format=md#description)󠁿

### 󠀁[See also](https://developer.wordpress.org/reference/hooks/enable_live_network_counts/?output_format=md#see-also)󠁿

 * [wp_is_large_network()](https://developer.wordpress.org/reference/functions/wp_is_large_network/)

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/enable_live_network_counts/?output_format=md#parameters)󠁿

 `$small_network`bool

Whether the network is considered small.

`$context`string

Context. Either `'users'` or `'sites'`.

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/enable_live_network_counts/?output_format=md#source)󠁿

    ```php
    if ( ! apply_filters( 'enable_live_network_counts', $is_small_network, 'sites' ) ) {
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/ms-functions.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/ms-functions.php#L2512)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/ms-functions.php#L2512-L2512)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/enable_live_network_counts/?output_format=md#related)󠁿

| Used by | Description | 
| [wp_maybe_update_user_counts()](https://developer.wordpress.org/reference/functions/wp_maybe_update_user_counts/)`wp-includes/user.php` |

Updates the total count of users on the site if live user counting is enabled.

  | 
| [wp_maybe_update_network_site_counts()](https://developer.wordpress.org/reference/functions/wp_maybe_update_network_site_counts/)`wp-includes/ms-functions.php` |

Updates the count of sites for the current network.

  | 
| [wp_maybe_update_network_user_counts()](https://developer.wordpress.org/reference/functions/wp_maybe_update_network_user_counts/)`wp-includes/ms-functions.php` |

Updates the network-wide users count.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/enable_live_network_counts/?output_format=md#changelog)󠁿

| Version | Description | 
| [3.7.0](https://developer.wordpress.org/reference/since/3.7.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fenable_live_network_counts%2F)
before being able to contribute a note or feedback.