Skip to content

Commit

Permalink
Refactored WP_Debug_Data::debug_data() Part 1
Browse files Browse the repository at this point in the history
Changed: Moving add_filter to class-wp-site-health.php, in order to allow removing and reordering them
  • Loading branch information
apermo committed Jul 21, 2024
1 parent b3fff8f commit 7376882
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/wp-admin/includes/class-wp-debug-data.php
Original file line number Diff line number Diff line change
Expand Up @@ -1369,8 +1369,6 @@ public static function debug_data(): array {
);
}

add_filter( 'debug_information', array( __CLASS__, 'wp_filesystem' ), 9 );

/**
* Filters the debug information shown on the Tools -> Site Health -> Info screen.
*
Expand Down
3 changes: 3 additions & 0 deletions src/wp-admin/includes/class-wp-site-health.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ public function __construct() {
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
add_action( 'wp_site_health_scheduled_check', array( $this, 'wp_cron_scheduled_check' ) );

// Initializing the debug information callbacks. These are used in the Site Health Info screen.
add_filter( 'debug_information', array( WP_Debug_Data::class, 'wp_filesystem' ), 9 );

add_action( 'site_health_tab_content', array( $this, 'show_site_health_tab' ) );
}

Expand Down

0 comments on commit 7376882

Please sign in to comment.