WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )
apply_filters( "hook_name", "what_to_filter" )
.Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
This hook occurs 2 times in this file.
Line | Code |
---|---|
2214 | * Filter whether to update network site or user counts when a new site is created. |
2215 | * |
2216 | * @since 3.7.0 |
2217 | * |
2218 | * @see wp_is_large_network() |
2219 | * |
2220 | * @param bool $small_network Whether the network is considered small. |
2221 | * @param string $context Context. Either 'users' or 'sites'. |
2222 | */ |
2223 | if ( ! apply_filters( 'enable_live_network_counts', $is_small_network, 'sites' ) ) |
2224 | return; |
2225 |
|
2226 | wp_update_network_site_counts(); |
2227 | } |
2228 |
|
2229 | /** |
2230 | * Update the network-wide users count. |
2231 | * |
2232 | * If enabled through the 'enable_live_network_counts' filter, update the users count |
Line | Code |
2234 | * |
2235 | * @since 3.7.0 |
2236 | * |
2237 | * @uses wp_update_network_user_counts() |
2238 | */ |
2239 | function wp_maybe_update_network_user_counts() { |
2240 | $is_small_network = ! wp_is_large_network( 'users' ); |
2241 |
|
2242 | /** This filter is documented in wp-includes/ms-functions.php */ |
2243 | if ( ! apply_filters( 'enable_live_network_counts', $is_small_network, 'users' ) ) |
2244 | return; |
2245 |
|
2246 | wp_update_network_user_counts(); |
2247 | } |
2248 |
|
2249 | /** |
2250 | * Update the network-wide site count. |
2251 | * |
2252 | * @since 3.7.0 |