WP_Debug_Data::format( array $info_array, string $data_type ): string

In this article

Formats the information gathered for debugging, in a manner suitable for copying to a forum or support ticket.

Parameters

$info_arrayarrayrequired
Information gathered from the WP_Debug_Data::debug_data() function.
$data_typestringrequired
The data type to return, either 'info' or 'debug'.

Return

string The formatted data.

Source

			'label' => 'WP_DEBUG_LOG',
			'value' => $wp_debug_log_value,
			'debug' => WP_DEBUG_LOG,
		),
		'SCRIPT_DEBUG'        => array(
			'label' => 'SCRIPT_DEBUG',
			'value' => SCRIPT_DEBUG ? __( 'Enabled' ) : __( 'Disabled' ),
			'debug' => SCRIPT_DEBUG,
		),
		'WP_CACHE'            => array(
			'label' => 'WP_CACHE',
			'value' => WP_CACHE ? __( 'Enabled' ) : __( 'Disabled' ),
			'debug' => WP_CACHE,
		),
		'CONCATENATE_SCRIPTS' => array(
			'label' => 'CONCATENATE_SCRIPTS',
			'value' => $concatenate_scripts,
			'debug' => $concatenate_scripts_debug,
		),
		'COMPRESS_SCRIPTS'    => array(
			'label' => 'COMPRESS_SCRIPTS',
			'value' => $compress_scripts,
			'debug' => $compress_scripts_debug,
		),
		'COMPRESS_CSS'        => array(
			'label' => 'COMPRESS_CSS',
			'value' => $compress_css,
			'debug' => $compress_css_debug,
		),
		'WP_ENVIRONMENT_TYPE' => array(
			'label' => 'WP_ENVIRONMENT_TYPE',
			'value' => $wp_environment_type,
			'debug' => $wp_environment_type_debug,
		),
		'WP_DEVELOPMENT_MODE' => array(
			'label' => 'WP_DEVELOPMENT_MODE',
			'value' => WP_DEVELOPMENT_MODE ? WP_DEVELOPMENT_MODE : __( 'Disabled' ),
			'debug' => WP_DEVELOPMENT_MODE,
		),
		'DB_CHARSET'          => array(
			'label' => 'DB_CHARSET',
			'value' => ( defined( 'DB_CHARSET' ) ? DB_CHARSET : __( 'Undefined' ) ),
			'debug' => ( defined( 'DB_CHARSET' ) ? DB_CHARSET : 'undefined' ),
		),
		'DB_COLLATE'          => array(
			'label' => 'DB_COLLATE',
			'value' => $db_collate,
			'debug' => $db_collate_debug,
		),
	);

	return array(
		'label'       => __( 'WordPress Constants' ),
		'description' => __( 'These settings alter where and how parts of WordPress are loaded.' ),
		'fields'      => $fields,
	);
}

/**

Changelog

VersionDescription
5.2.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.