WP_Recovery_Mode_Email_Service::get_debug()
Return debug information in an easy to manipulate format.
Метод класса: WP_Recovery_Mode_Email_Service{}
Хуков нет.
Возвращает
Массив
. An associative array of debug information.
Использование
// private - только в коде основоного (родительского) класса $result = $this->get_debug( $extension );
- $extension(массив) (обязательный)
The extension that caused the error.
-
slug(строка)
The extension slug. The directory of the plugin or theme. - type(строка)
The extension type. Either 'plugin' or 'theme'.
-
Список изменений
С версии 5.3.0 | Введена. |
Код WP_Recovery_Mode_Email_Service::get_debug() WP Recovery Mode Email Service::get debug WP 6.5.2
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; }