get_user_count() WP 3.0.0
The number of active users in your installation.
The count is cached and updated twice daily. This is not a live count.
Хуков нет.
Возвращает
Число
. Number of active users on the network.
Использование
get_user_count( $network_id );
- $network_id(число/null)
- ID of the network.
По умолчанию: current network
Список изменений
С версии 3.0.0 | Введена. |
С версии 4.8.0 | The $network_id parameter has been added. |
Код get_user_count() get user count WP 5.7
function get_user_count( $network_id = null ) {
return get_network_option( $network_id, 'user_count' );
}