Make WordPress Core

Changeset 59164


Ignore:
Timestamp:
10/04/2024 12:09:11 AM (2 years ago)
Author:
dmsnell
Message:

WP_Debug_Data: Normalize visibility of new methods.

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 https://github.com/wordpress/wordpress-develop/pull/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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-debug-data.php

    r59159 r59164  
    823823         * @return array
    824824         */
    825         public static function get_wp_dropins(): array {
     825        private static function get_wp_dropins(): array {
    826826                // Get a list of all drop-in replacements.
    827827                $dropins = get_dropins();
     
    858858         * @return array
    859859         */
    860         public static function get_wp_server(): array {
     860        private static function get_wp_server(): array {
    861861                // Populate the server debug fields.
    862862                if ( function_exists( 'php_uname' ) ) {
     
    10511051         * @return array
    10521052         */
    1053         public static function get_wp_media(): array {
     1053        private static function get_wp_media(): array {
    10541054                // Spare few function calls.
    10551055                $not_available = __( 'Not available' );
     
    12451245         * @return array
    12461246         */
    1247         public static function get_wp_mu_plugins(): array {
     1247        private static function get_wp_mu_plugins(): array {
    12481248                // List must use plugins if there are any.
    12491249                $mu_plugins = get_mu_plugins();
     
    12961296         * @return array
    12971297         */
    1298         public static function get_wp_constants(): array {
     1298        private static function get_wp_constants(): array {
    12991299                // Check if WP_DEBUG_LOG is set.
    13001300                $wp_debug_log_value = __( 'Disabled' );
     
    14601460         * @return array
    14611461         */
    1462         public static function get_wp_database(): array {
     1462        private static function get_wp_database(): array {
    14631463                global $wpdb;
    14641464
Note: See TracChangeset for help on using the changeset viewer.