Ticket #40736: 40736.7.patch
File 40736.7.patch, 2.0 KB (added by , 7 years ago) |
---|
-
src/wp-includes/ms-deprecated.php
546 546 547 547 return isset( $current_user->$local_key ); 548 548 } 549 550 /** 551 * The number of active sites on your installation. 552 * 553 * The count is cached and updated twice daily. This is not a live count. 554 * 555 * @since MU 1.0 556 * 557 * @deprecated 5.0.0 Use get_site_count() 558 * @see get_site_count() 559 * 560 * @since 3.7.0 The $network_id parameter has been deprecated. 561 * @since 4.9.0 The $network_id parameter is now being used. 562 * 563 * @param int|null $network_id ID of the network. Default is the current network. 564 * @return int Number of active sites on the network. 565 */ 566 function get_blog_count( $network_id = null ) { 567 _deprecated_function( __FUNCTION__, '5.0', 'get_site_count()' ); 568 return get_site_count( $network_id ); 569 } -
src/wp-includes/ms-functions.php
107 107 * @return int Number of active users on the network. 108 108 */ 109 109 function get_user_count( $network_id = null ) { 110 return get_network_option( $network_id, 'user_count' );110 return (int) get_network_option( $network_id, 'user_count' ); 111 111 } 112 112 113 113 /** … … 115 115 * 116 116 * The count is cached and updated twice daily. This is not a live count. 117 117 * 118 * @since MU (3.0.0) 119 * @since 3.7.0 The $network_id parameter has been deprecated. 120 * @since 4.8.0 The $network_id parameter is now being used. 118 * @since 5.0.0 121 119 * 122 120 * @param int|null $network_id ID of the network. Default is the current network. 123 121 * @return int Number of active sites on the network. 124 122 */ 125 function get_ blog_count( $network_id = null ) {126 return get_network_option( $network_id, 'blog_count' );123 function get_site_count( $network_id = null ) { 124 return (int) get_network_option( $network_id, 'blog_count' ); 127 125 } 128 126 129 127 /**