wppaste
WordPress

WP_Debug_Data

Since
5.2.0
Source
wp-admin/includes/class-wp-debug-data.php:10
Class for providing debug data based on a users WordPress environment.

Compatibility

WordPress
since 5.2.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Hooks and filters fired · 5

Every hook that fires from inside WP_Debug_Data, in the order it appears in the class, grouped by the method that fires it.

Methods · 21

Source code

#[AllowDynamicProperties]class WP_Debug_Data {	/**	 * Calls all core functions to check for updates.	 *	 * @since 5.2.0	 */	public static function check_for_updates() {		wp_version_check();		wp_update_plugins();		wp_update_themes();	} 	/**	 * Static function for generating site debug data when required.	 *	 * @since 5.2.0	 * @since 5.3.0 Added database charset, database collation,	 *              and timezone information.	 * @since 5.5.0 Added pretty permalinks support information.	 * @since 6.7.0 Modularized into separate theme-oriented methods.	 *	 * @throws ImagickException	 *	 * @return array The debug data for the site.	 */	public static function debug_data() {		/*		 * Set up the array that holds all debug information.		 *		 * When iterating through the debug data, the ordering of the sections		 * occurs in insertion-order of the assignments into this array.		 *		 * This is the single assignment of the sections before filtering. Null-entries will		 * be automatically be removed.		 */		$info = array(			'wp-core'             => self::get_wp_core(),			'wp-paths-sizes'      => self::get_wp_paths_sizes(),			'wp-dropins'          => self::get_wp_dropins(),			'wp-active-theme'     => self::get_wp_active_theme(),			'wp-parent-theme'     => self::get_wp_parent_theme(),			'wp-themes-inactive'  => self::get_wp_themes_inactive(),			'wp-mu-plugins'       => self::get_wp_mu_plugins(),			'wp-plugins-active'   => self::get_wp_plugins_active(),			'wp-plugins-inactive' => self::get_wp_plugins_inactive(),			'wp-media'            => self::get_wp_media(),			'wp-server'           => self::get_wp_server(),			'wp-database'         => self::get_wp_database(),			'wp-constants'        => self::get_wp_constants(),			'wp-filesystem'       => self::get_wp_filesystem(),		); 		/*		 * Remove null elements from the array. The individual methods are		 * allowed to return `null`, which communicates that the category		 * of debug data isn't relevant and shouldn't be passed through.		 */		$info = array_filter(			$info,			static function ( $section ) {				return isset( $section );			}		); 		/**		 * Filters the debug information shown on the Tools -> Site Health -> Info screen.		 *		 * Plugin or themes may wish to introduce their own debug information without creating		 * additional admin pages. They can utilize this filter to introduce their own sections		 * or add more data to existing sections.		 *		 * Array keys for sections added by core are all prefixed with `wp-`. Plugins and themes		 * should use their own slug as a prefix, both for consistency as well as avoiding		 * key collisions. Note that the array keys are used as labels for the copied data.		 *		 * All strings are expected to be plain text except `$description` that can contain		 * inline HTML tags (see below).		 *		 * @since 5.2.0

Changelog

Introduced in 5.2.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 tag, from src/wp-admin/includes/class-wp-debug-data.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.