Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

WP_Recovery_Mode_Email_Service::get_debug() WordPress Method

The WP_Recovery_Mode_Email_Service::get_debug() method is a static method that can be used to get the debug email address for the WordPress recovery mode.

WP_Recovery_Mode_Email_Service::get_debug( array $extension ) #

Return debug information in an easy to manipulate format.


Parameters

$extension

(array)(Required)The extension that caused the error.

  • 'slug'
    (string) The extension slug. The directory of the plugin or theme.
  • 'type'
    (string) The extension type. Either 'plugin' or 'theme'.


Top ↑

Return

(array) An associative array of debug information.


Top ↑

Source

File: wp-includes/class-wp-recovery-mode-email-service.php

	private function get_debug( $extension ) {
		$theme      = wp_get_theme();
		$wp_version = get_bloginfo( 'version' );

		if ( $extension ) {
			$plugin = $this->get_plugin( $extension );
		} else {
			$plugin = null;
		}

		$debug = array(
			'wp'    => sprintf(
				/* translators: %s: Current WordPress version number. */
				__( 'WordPress version %s' ),
				$wp_version
			),
			'theme' => sprintf(
				/* translators: 1: Current active theme name. 2: Current active theme version. */
				__( 'Active theme: %1$s (version %2$s)' ),
				$theme->get( 'Name' ),
				$theme->get( 'Version' )
			),
		);

		if ( null !== $plugin ) {
			$debug['plugin'] = sprintf(
				/* translators: 1: The failing plugins name. 2: The failing plugins version. */
				__( 'Current plugin: %1$s (version %2$s)' ),
				$plugin['Name'],
				$plugin['Version']
			);
		}

		$debug['php'] = sprintf(
			/* translators: %s: The currently used PHP version. */
			__( 'PHP version %s' ),
			PHP_VERSION
		);

		return $debug;
	}


Top ↑

Changelog

Changelog
VersionDescription
5.3.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.