WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

wp_get_extension_error_description() WP 5.2.0

Get a human readable description of an extension's error.

Хуков нет.

Возвращает

Строку. Formatted error description.

Использование

wp_get_extension_error_description( $error );
$error(массив) (обязательный)
Error details {@see error_get_last()}

Список изменений

С версии 5.2.0 Введена.

Код wp_get_extension_error_description() WP 5.5.1

wp-includes/error-protection.php
<?php
function wp_get_extension_error_description( $error ) {
	$constants   = get_defined_constants( true );
	$constants   = isset( $constants['Core'] ) ? $constants['Core'] : $constants['internal'];
	$core_errors = array();

	foreach ( $constants as $constant => $value ) {
		if ( 0 === strpos( $constant, 'E_' ) ) {
			$core_errors[ $value ] = $constant;
		}
	}

	if ( isset( $core_errors[ $error['type'] ] ) ) {
		$error['type'] = $core_errors[ $error['type'] ];
	}

	/* translators: 1: Error type, 2: Error line number, 3: Error file name, 4: Error message. */
	$error_message = __( 'An error of type %1$s was caused in line %2$s of the file %3$s. Error message: %4$s' );

	return sprintf(
		$error_message,
		"<code>{$error['type']}</code>",
		"<code>{$error['line']}</code>",
		"<code>{$error['file']}</code>",
		"<code>{$error['message']}</code>"
	);
}