@@ -388,11 +388,6 @@ public static function debug_data() {
388388 $ site_count += get_blog_count ( $ network_id );
389389 }
390390
391- $ info ['wp-core ' ]['fields ' ]['user_count ' ] = array (
392- 'label ' => __ ( 'User count ' ),
393- 'value ' => get_user_count (),
394- );
395-
396391 $ info ['wp-core ' ]['fields ' ]['site_count ' ] = array (
397392 'label ' => __ ( 'Site count ' ),
398393 'value ' => $ site_count ,
@@ -402,15 +397,13 @@ public static function debug_data() {
402397 'label ' => __ ( 'Network count ' ),
403398 'value ' => $ network_query ->found_networks ,
404399 );
405- } else {
406- $ user_count = count_users ();
407-
408- $ info ['wp-core ' ]['fields ' ]['user_count ' ] = array (
409- 'label ' => __ ( 'User count ' ),
410- 'value ' => $ user_count ['total_users ' ],
411- );
412400 }
413401
402+ $ info ['wp-core ' ]['fields ' ]['user_count ' ] = array (
403+ 'label ' => __ ( 'User count ' ),
404+ 'value ' => get_user_count (),
405+ );
406+
414407 // WordPress features requiring processing.
415408 $ wp_dotorg = wp_remote_get ( 'https://wordpress.org ' , array ( 'timeout ' => 10 ) );
416409
@@ -1471,20 +1464,20 @@ public static function debug_data() {
14711464 }
14721465
14731466 /**
1474- * Returns the value of a MySQL variable.
1467+ * Returns the value of a MySQL system variable.
14751468 *
14761469 * @since 5.9.0
14771470 *
14781471 * @global wpdb $wpdb WordPress database abstraction object.
14791472 *
1480- * @param string $var Name of the MySQL variable.
1473+ * @param string $mysql_var Name of the MySQL system variable.
14811474 * @return string|null The variable value on success. Null if the variable does not exist.
14821475 */
1483- public static function get_mysql_var ( $ var ) {
1476+ public static function get_mysql_var ( $ mysql_var ) {
14841477 global $ wpdb ;
14851478
14861479 $ result = $ wpdb ->get_row (
1487- $ wpdb ->prepare ( 'SHOW VARIABLES LIKE %s ' , $ var ),
1480+ $ wpdb ->prepare ( 'SHOW VARIABLES LIKE %s ' , $ mysql_var ),
14881481 ARRAY_A
14891482 );
14901483
@@ -1500,11 +1493,11 @@ public static function get_mysql_var( $var ) {
15001493 *
15011494 * @since 5.2.0
15021495 *
1503- * @param array $info_array Information gathered from the `WP_Debug_Data::debug_data` function.
1504- * @param string $type The data type to return, either 'info' or 'debug'.
1496+ * @param array $info_array Information gathered from the `WP_Debug_Data::debug_data() ` function.
1497+ * @param string $data_type The data type to return, either 'info' or 'debug'.
15051498 * @return string The formatted data.
15061499 */
1507- public static function format ( $ info_array , $ type ) {
1500+ public static function format ( $ info_array , $ data_type ) {
15081501 $ return = "` \n" ;
15091502
15101503 foreach ( $ info_array as $ section => $ details ) {
@@ -1513,7 +1506,7 @@ public static function format( $info_array, $type ) {
15131506 continue ;
15141507 }
15151508
1516- $ section_label = 'debug ' === $ type ? $ section : $ details ['label ' ];
1509+ $ section_label = 'debug ' === $ data_type ? $ section : $ details ['label ' ];
15171510
15181511 $ return .= sprintf (
15191512 "### %s%s ### \n\n" ,
@@ -1526,7 +1519,7 @@ public static function format( $info_array, $type ) {
15261519 continue ;
15271520 }
15281521
1529- if ( 'debug ' === $ type && isset ( $ field ['debug ' ] ) ) {
1522+ if ( 'debug ' === $ data_type && isset ( $ field ['debug ' ] ) ) {
15301523 $ debug_data = $ field ['debug ' ];
15311524 } else {
15321525 $ debug_data = $ field ['value ' ];
@@ -1547,7 +1540,7 @@ public static function format( $info_array, $type ) {
15471540 $ value = $ debug_data ;
15481541 }
15491542
1550- if ( 'debug ' === $ type ) {
1543+ if ( 'debug ' === $ data_type ) {
15511544 $ label = $ field_name ;
15521545 } else {
15531546 $ label = $ field ['label ' ];
0 commit comments