diff --git a/src/wp-admin/includes/class-wp-debug-data.php b/src/wp-admin/includes/class-wp-debug-data.php
index 7e21785cce..251da47ad7 100644
a
|
b
|
class WP_Debug_Data { |
873 | 873 | 'private' => true, |
874 | 874 | ); |
875 | 875 | |
| 876 | include_once ABSPATH . 'wp-admin/includes/plugin-install.php'; // For plugins_api(). |
| 877 | |
876 | 878 | // List must use plugins if there are any. |
877 | 879 | $mu_plugins = get_mu_plugins(); |
878 | 880 | |
… |
… |
class WP_Debug_Data { |
880 | 882 | $plugin_version = $plugin['Version']; |
881 | 883 | $plugin_author = $plugin['Author']; |
882 | 884 | |
| 885 | $plugin_slug = explode( '/', $plugin_path ); |
| 886 | $plugin_info = plugins_api( |
| 887 | 'plugin_information', |
| 888 | array( |
| 889 | 'slug' => $plugin_slug[0], |
| 890 | 'fields' => array( |
| 891 | 'last_updated', |
| 892 | ), |
| 893 | ) |
| 894 | ); |
883 | 895 | $plugin_version_string = __( 'No version or author information is available.' ); |
884 | 896 | $plugin_version_string_debug = 'author: (undefined), version: (undefined)'; |
885 | 897 | |
… |
… |
class WP_Debug_Data { |
1009 | 1021 | $plugin_version_string_debug .= ', ' . $auto_updates_string; |
1010 | 1022 | } |
1011 | 1023 | |
| 1024 | if ( isset( $plugin_info->last_updated ) ) { |
| 1025 | /* translators: %s: Plugin last released time. */ |
| 1026 | $plugin_version_string .= sprintf( __( ' | Last Plugin release: %s ago' ), human_time_diff( strtotime( $plugin_info->last_updated ), current_time( 'timestamp' ) ) ); |
| 1027 | $plugin_version_string_debug .= sprintf( __( ', last plugin release: %s ago' ), human_time_diff( strtotime( $plugin_info->last_updated ), current_time( 'timestamp' ) ) ); |
| 1028 | } |
| 1029 | |
1012 | 1030 | $info[ $plugin_part ]['fields'][ sanitize_text_field( $plugin['Name'] ) ] = array( |
1013 | 1031 | 'label' => $plugin['Name'], |
1014 | 1032 | 'value' => $plugin_version_string, |
… |
… |
class WP_Debug_Data { |
1016 | 1034 | ); |
1017 | 1035 | } |
1018 | 1036 | |
| 1037 | include_once ABSPATH . 'wp-admin/includes/theme.php'; // For themes_api(). |
| 1038 | |
1019 | 1039 | // Populate the section for the currently active theme. |
1020 | 1040 | global $_wp_theme_features; |
1021 | 1041 | $theme_features = array(); |
… |
… |
class WP_Debug_Data { |
1039 | 1059 | $auto_updates = (array) get_site_option( 'auto_update_themes', array() ); |
1040 | 1060 | } |
1041 | 1061 | |
| 1062 | $active_theme_info = themes_api( |
| 1063 | 'theme_information', |
| 1064 | array( |
| 1065 | 'slug' => $active_theme->template, |
| 1066 | 'fields' => 'last_updated', |
| 1067 | ) |
| 1068 | ); |
| 1069 | |
1042 | 1070 | if ( array_key_exists( $active_theme->stylesheet, $theme_updates ) ) { |
1043 | 1071 | $theme_update_new_version = $theme_updates[ $active_theme->stylesheet ]->update['new_version']; |
1044 | 1072 | |
… |
… |
class WP_Debug_Data { |
1147 | 1175 | ); |
1148 | 1176 | } |
1149 | 1177 | |
| 1178 | if ( isset( $active_theme->last_updated ) ) { |
| 1179 | $info['wp-active-theme']['fields']['last_release'] = array( |
| 1180 | 'label' => __( 'Last Theme Release' ), |
| 1181 | 'value' => sprintf( __( '%s ago' ), human_time_diff( strtotime( $active_theme_info->last_updated ), current_time( 'timestamp' ) ) ), |
| 1182 | 'debug' => sprintf( __( '%s ago' ), human_time_diff( strtotime( $active_theme_info->last_updated ), current_time( 'timestamp' ) ) ), |
| 1183 | ); |
| 1184 | } |
| 1185 | |
1150 | 1186 | $parent_theme = $active_theme->parent(); |
1151 | 1187 | |
1152 | 1188 | if ( $parent_theme ) { |
… |
… |
class WP_Debug_Data { |
1259 | 1295 | $theme_version_string = __( 'No version or author information is available.' ); |
1260 | 1296 | $theme_version_string_debug = 'undefined'; |
1261 | 1297 | |
| 1298 | $theme_info = themes_api( |
| 1299 | 'theme_information', |
| 1300 | array( |
| 1301 | 'slug' => $theme_slug, |
| 1302 | 'fields' => 'last_updated', |
| 1303 | ) |
| 1304 | ); |
| 1305 | |
1262 | 1306 | if ( ! empty( $theme_version ) && ! empty( $theme_author ) ) { |
1263 | 1307 | /* translators: 1: Theme version number. 2: Theme author name. */ |
1264 | 1308 | $theme_version_string = sprintf( __( 'Version %1$s by %2$s' ), $theme_version, $theme_author ); |
… |
… |
class WP_Debug_Data { |
1330 | 1374 | $theme_version_string_debug .= ',' . $auto_updates_string; |
1331 | 1375 | } |
1332 | 1376 | |
| 1377 | if ( isset( $theme_info->last_updated ) ) { |
| 1378 | /* translators: %s: Theme last released time. */ |
| 1379 | $theme_version_string .= sprintf( __( ' | Last Theme release: %s ago' ), human_time_diff( strtotime( $theme_info->last_updated ), current_time( 'timestamp' ) ) ); |
| 1380 | $theme_version_string_debug .= sprintf( __( ', last theme release: %s ago' ), human_time_diff( strtotime( $theme_info->last_updated ), current_time( 'timestamp' ) ) ); |
| 1381 | } |
| 1382 | |
1333 | 1383 | $info['wp-themes-inactive']['fields'][ sanitize_text_field( $theme->name ) ] = array( |
1334 | 1384 | 'label' => sprintf( |
1335 | 1385 | /* translators: 1: Theme name. 2: Theme slug. */ |