Ticket #40736: 40736.4.patch
File 40736.4.patch, 2.0 KB (added by , 7 years ago) |
---|
-
src/wp-includes/ms-deprecated.php
516 516 517 517 return $results; 518 518 } 519 520 /** 521 * The number of active sites on your installation. 522 * 523 * The count is cached and updated twice daily. This is not a live count. 524 * 525 * @since MU 1.0 526 * 527 * @deprecated 4.9.0 Use get_site_count() 528 * @see get_site_count() 529 * 530 * @since 3.7.0 The $network_id parameter has been deprecated. 531 * @since 4.8.0 The $network_id parameter is now being used. 532 * 533 * @param int|null $network_id ID of the network. Default is the current network. 534 * @return int Number of active sites on the network. 535 */ 536 function get_blog_count( $network_id = null ) { 537 _deprecated_function( __FUNCTION__, '4.8', 'get_site_count()' ); 538 return get_site_count( $network_id ); 539 } -
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 (int) get_network_option( $network_id, 'user_count' ); 106 106 } 107 107 108 108 /** … … 110 110 * 111 111 * The count is cached and updated twice daily. This is not a live count. 112 112 * 113 * @since MU 1.0 114 * @since 3.7.0 The $network_id parameter has been deprecated. 115 * @since 4.8.0 The $network_id parameter is now being used. 113 * @since 4.9.0 116 114 * 117 115 * @param int|null $network_id ID of the network. Default is the current network. 118 116 * @return int Number of active sites on the network. 119 117 */ 120 function get_ blog_count( $network_id = null ) {121 return get_network_option( $network_id, 'blog_count' );118 function get_site_count( $network_id = null ) { 119 return (int) get_network_option( $network_id, 'blog_count' ); 122 120 } 123 121 124 122 /**