wpseek.com
WordPress开发者和主题制作者的搜索引擎
get_user_count › WordPress Function
Since
已弃用n/a
› get_user_count ( $network_id = null )
参数: |
|
返回: |
|
定义在: |
|
文档: | |
Change Log: |
|
Returns the number of active users in your installation.
Note that on a large site the count may be cached and only updated twice daily.Related Functions: get_user_option, get_user_meta, get_user_by, wp_is_large_user_count, get_blog_count
源码
function get_user_count( $network_id = null ) { if ( ! is_multisite() && null !== $network_id ) { _doing_it_wrong( __FUNCTION__, sprintf( /* translators: %s: $network_id */ __( 'Unable to pass %s if not using multisite.' ), '<code>$network_id</code>' ), '6.0.0' ); } return (int) get_network_option( $network_id, 'user_count', -1 ); }