Skip to content

Commit

Permalink
WP_Debug_Data: Normalize visibility of new methods.
Browse files Browse the repository at this point in the history
In ongoing work to modularize the `WP_Debug_Data` class, several methods were added with `public` visibility. This patch sets the new methods to `private` as a measure to ensure optionality as the changes progress, since it's easier to move from private to public than the other way around.

Developed in #7482
Discussed in https://core.trac.wordpress.org/ticket/61648

Follow-up to [58830], [58855], [58964], [59002], [59011], [59060], [59100].

Props apermo, jonsurrell.
Fixes #61648.


git-svn-id: https://develop.svn.wordpress.org/trunk@59164 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
dmsnell committed Oct 4, 2024
1 parent 0e69bc9 commit 7d3c488
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/wp-admin/includes/class-wp-debug-data.php
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,7 @@ public static function debug_data() {
*
* @return array
*/
public static function get_wp_dropins(): array {
private static function get_wp_dropins(): array {
// Get a list of all drop-in replacements.
$dropins = get_dropins();

Expand Down Expand Up @@ -857,7 +857,7 @@ public static function get_wp_dropins(): array {
*
* @return array
*/
public static function get_wp_server(): array {
private static function get_wp_server(): array {
// Populate the server debug fields.
if ( function_exists( 'php_uname' ) ) {
$server_architecture = sprintf( '%s %s %s', php_uname( 's' ), php_uname( 'r' ), php_uname( 'm' ) );
Expand Down Expand Up @@ -1050,7 +1050,7 @@ public static function get_wp_server(): array {
* @throws ImagickException
* @return array
*/
public static function get_wp_media(): array {
private static function get_wp_media(): array {
// Spare few function calls.
$not_available = __( 'Not available' );

Expand Down Expand Up @@ -1244,7 +1244,7 @@ public static function get_wp_media(): array {
*
* @return array
*/
public static function get_wp_mu_plugins(): array {
private static function get_wp_mu_plugins(): array {
// List must use plugins if there are any.
$mu_plugins = get_mu_plugins();
$fields = array();
Expand Down Expand Up @@ -1295,7 +1295,7 @@ public static function get_wp_mu_plugins(): array {
*
* @return array
*/
public static function get_wp_constants(): array {
private static function get_wp_constants(): array {
// Check if WP_DEBUG_LOG is set.
$wp_debug_log_value = __( 'Disabled' );
if ( is_string( WP_DEBUG_LOG ) ) {
Expand Down Expand Up @@ -1459,7 +1459,7 @@ public static function get_wp_constants(): array {
*
* @return array
*/
public static function get_wp_database(): array {
private static function get_wp_database(): array {
global $wpdb;

// Populate the database debug fields.
Expand Down

0 comments on commit 7d3c488

Please sign in to comment.