get_blog_count()
Gets the number of active sites on the installation.
The count is cached and updated twice daily. This is not a live count.
Хуков нет.
Возвращает
int
. Number of active sites on the network.
Использование
get_blog_count( $network_id );
- $network_id(int|null)
- ID of the network.
По умолчанию: current network
Список изменений
С версии 3.0.0 | Введена. |
С версии 3.7.0 | The $network_id parameter has been deprecated. |
С версии 4.8.0 | The $network_id parameter is now being used. |
Код get_blog_count() get blog count WP 6.2.2
function get_blog_count( $network_id = null ) { return get_network_option( $network_id, 'blog_count' ); }