Ticket #40736: 40736.3.patch
File 40736.3.patch, 1.6 KB (added by , 8 years ago) |
---|
-
src/wp-includes/ms-functions.php
102 102 * @return int Number of active users on the network. 103 103 */ 104 104 function get_user_count( $network_id = null ) { 105 return get_network_option( $network_id, 'user_count');105 return intval( get_network_option( $network_id, 'user_count' ) ); 106 106 } 107 107 108 108 /** … … 111 111 * The count is cached and updated twice daily. This is not a live count. 112 112 * 113 113 * @since MU 1.0 114 * 115 * @deprecated 4.8 Use get_site_count() 116 * @see get_site_count() 117 * 114 118 * @since 3.7.0 The $network_id parameter has been deprecated. 115 119 * @since 4.8.0 The $network_id parameter is now being used. 116 120 * … … 118 122 * @return int Number of active sites on the network. 119 123 */ 120 124 function get_blog_count( $network_id = null ) { 121 return get_network_option( $network_id, 'blog_count' ); 125 _deprecated_function( __FUNCTION__, '4.8', 'get_site_count()' ); 126 return get_site_count( $network_id ); 122 127 } 123 128 124 129 /** 130 * The number of active sites on your installation. 131 * 132 * The count is cached and updated twice daily. This is not a live count. 133 * 134 * @since MU 4.8 135 * 136 * @param int|null $network_id ID of the network. Default is the current network. 137 * @return int Number of active sites on the network. 138 */ 139 function get_site_count( $network_id = null ) { 140 return intval( get_network_option( $network_id, 'blog_count' ) ); 141 } 142 143 /** 125 144 * Get a blog post from any site on the network. 126 145 * 127 146 * @since MU 1.0