Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: enable_live_network_counts

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

This hook occurs 2 times in this file.

Line Code
1898
1899      /**
1900       * Filter the decision to update network user and site counts in real time.
1901       *
1902       * @since 3.7.0
1903       *
1904       * @param bool   $small_network Based on wp_is_large_network( $context ).
1905       * @param string $context       Context. Either 'users' or 'sites'.
1906       */
1907      if ( ! apply_filters( 'enable_live_network_counts', $is_small_network, 'sites' ) )
1908           return;
1909
1910      wp_update_network_site_counts();
1911 }
1912
1913 /**
1914  * Update the network-wide users count.
1915  *
1916  * If enabled through the 'enable_live_network_counts' filter, update the users count
 
Line Code
1925
1926      /**
1927       * Filter the decision to update network user and site counts in real time.
1928       *
1929       * @since 3.7.0
1930       *
1931       * @param bool   $small_network Based on wp_is_large_network( $context ).
1932       * @param string $context       Context. Either 'users' or 'sites'.
1933       */
1934      if ( ! apply_filters( 'enable_live_network_counts', $is_small_network, 'users' ) )
1935           return;
1936
1937      wp_update_network_user_counts();
1938 }
1939
1940 /**
1941  * Update the network-wide site count.
1942  *
1943  * @since 3.7.0