Changeset 3423844
- Timestamp:
- 12/19/2025 04:45:51 PM (3 months ago)
- Location:
- dev-debug-tools
- Files:
-
- 224 added
- 7 edited
-
tags/3.0.0.8 (added)
-
tags/3.0.0.8/dev-debug-tools.php (added)
-
tags/3.0.0.8/inc (added)
-
tags/3.0.0.8/inc/admin-area (added)
-
tags/3.0.0.8/inc/admin-area/admin-bar (added)
-
tags/3.0.0.8/inc/admin-area/admin-bar/centering-tool.css (added)
-
tags/3.0.0.8/inc/admin-area/admin-bar/centering-tool.js (added)
-
tags/3.0.0.8/inc/admin-area/admin-bar/class-admin-bar.php (added)
-
tags/3.0.0.8/inc/admin-area/admin-bar/debug-mode-indicator.css (added)
-
tags/3.0.0.8/inc/admin-area/admin-bar/gforms-finder.css (added)
-
tags/3.0.0.8/inc/admin-area/admin-bar/gforms-finder.js (added)
-
tags/3.0.0.8/inc/admin-area/admin-bar/menu-links.css (added)
-
tags/3.0.0.8/inc/admin-area/class-admin-area.php (added)
-
tags/3.0.0.8/inc/admin-area/hide-plugin.css (added)
-
tags/3.0.0.8/inc/admin-area/online-users (added)
-
tags/3.0.0.8/inc/admin-area/online-users/class-online-users.php (added)
-
tags/3.0.0.8/inc/admin-area/online-users/scripts.js (added)
-
tags/3.0.0.8/inc/admin-area/online-users/styles.css (added)
-
tags/3.0.0.8/inc/admin-area/plugins (added)
-
tags/3.0.0.8/inc/admin-area/plugins/class-plugins.php (added)
-
tags/3.0.0.8/inc/admin-area/plugins/scripts.js (added)
-
tags/3.0.0.8/inc/admin-area/plugins/styles.css (added)
-
tags/3.0.0.8/inc/admin-area/post-edit-box.js (added)
-
tags/3.0.0.8/inc/admin-area/security (added)
-
tags/3.0.0.8/inc/admin-area/security/class-security.php (added)
-
tags/3.0.0.8/inc/admin-area/security/scripts.js (added)
-
tags/3.0.0.8/inc/admin-area/security/styles.css (added)
-
tags/3.0.0.8/inc/admin-area/styles.css (added)
-
tags/3.0.0.8/inc/admin-area/user-profile-edit.js (added)
-
tags/3.0.0.8/inc/backdoor.php (added)
-
tags/3.0.0.8/inc/cleanup.php (added)
-
tags/3.0.0.8/inc/deprecated.php (added)
-
tags/3.0.0.8/inc/functions.php (added)
-
tags/3.0.0.8/inc/helpers (added)
-
tags/3.0.0.8/inc/helpers/discord.php (added)
-
tags/3.0.0.8/inc/helpers/error-messages.php (added)
-
tags/3.0.0.8/inc/helpers/file-editor (added)
-
tags/3.0.0.8/inc/helpers/file-editor/class-file-editor.php (added)
-
tags/3.0.0.8/inc/helpers/file-editor/page-file-editor.php (added)
-
tags/3.0.0.8/inc/helpers/file-editor/scripts.js (added)
-
tags/3.0.0.8/inc/helpers/file-editor/styles.css (added)
-
tags/3.0.0.8/inc/helpers/help-map.php (added)
-
tags/3.0.0.8/inc/helpers/helpers.js (added)
-
tags/3.0.0.8/inc/helpers/helpers.php (added)
-
tags/3.0.0.8/inc/helpers/jokes.php (added)
-
tags/3.0.0.8/inc/helpers/remove-qs.js (added)
-
tags/3.0.0.8/inc/hub (added)
-
tags/3.0.0.8/inc/hub/fonts (added)
-
tags/3.0.0.8/inc/hub/fonts/exo2.woff2 (added)
-
tags/3.0.0.8/inc/hub/fonts/michroma.woff2 (added)
-
tags/3.0.0.8/inc/hub/fonts/poppins-bold.woff2 (added)
-
tags/3.0.0.8/inc/hub/fonts/poppins.woff2 (added)
-
tags/3.0.0.8/inc/hub/footer.php (added)
-
tags/3.0.0.8/inc/hub/header.php (added)
-
tags/3.0.0.8/inc/hub/img (added)
-
tags/3.0.0.8/inc/hub/img/icon_google.png (added)
-
tags/3.0.0.8/inc/hub/img/icon_stackex.png (added)
-
tags/3.0.0.8/inc/hub/img/index.php (added)
-
tags/3.0.0.8/inc/hub/img/loading-buffering.gif (added)
-
tags/3.0.0.8/inc/hub/img/logo.png (added)
-
tags/3.0.0.8/inc/hub/img/text-area-resizer-wh-large.png (added)
-
tags/3.0.0.8/inc/hub/img/text-area-resizer.png (added)
-
tags/3.0.0.8/inc/hub/img/text-area-resizer_wh_sm.png (added)
-
tags/3.0.0.8/inc/hub/img/text-area-resizer_wh_sm_trans.png (added)
-
tags/3.0.0.8/inc/hub/menu.php (added)
-
tags/3.0.0.8/inc/hub/pages (added)
-
tags/3.0.0.8/inc/hub/pages/changelog (added)
-
tags/3.0.0.8/inc/hub/pages/changelog/class-changelog.php (added)
-
tags/3.0.0.8/inc/hub/pages/changelog/page-changelog.php (added)
-
tags/3.0.0.8/inc/hub/pages/changelog/styles.css (added)
-
tags/3.0.0.8/inc/hub/pages/dashboard (added)
-
tags/3.0.0.8/inc/hub/pages/dashboard/class-dashboard.php (added)
-
tags/3.0.0.8/inc/hub/pages/dashboard/class-issues.php (added)
-
tags/3.0.0.8/inc/hub/pages/dashboard/page-dashboard.php (added)
-
tags/3.0.0.8/inc/hub/pages/dashboard/scripts.js (added)
-
tags/3.0.0.8/inc/hub/pages/dashboard/styles.css (added)
-
tags/3.0.0.8/inc/hub/pages/resources (added)
-
tags/3.0.0.8/inc/hub/pages/resources/class-resources.php (added)
-
tags/3.0.0.8/inc/hub/pages/resources/links.php (added)
-
tags/3.0.0.8/inc/hub/pages/resources/page-resources.php (added)
-
tags/3.0.0.8/inc/hub/pages/resources/scripts.js (added)
-
tags/3.0.0.8/inc/hub/pages/resources/styles.css (added)
-
tags/3.0.0.8/inc/hub/pages/settings (added)
-
tags/3.0.0.8/inc/hub/pages/settings/class-settings.php (added)
-
tags/3.0.0.8/inc/hub/pages/settings/page-settings.php (added)
-
tags/3.0.0.8/inc/hub/pages/settings/scripts.js (added)
-
tags/3.0.0.8/inc/hub/pages/settings/styles.css (added)
-
tags/3.0.0.8/inc/hub/pages/tools (added)
-
tags/3.0.0.8/inc/hub/pages/tools/apis (added)
-
tags/3.0.0.8/inc/hub/pages/tools/apis/class-apis.php (added)
-
tags/3.0.0.8/inc/hub/pages/tools/apis/page-apis.php (added)
-
tags/3.0.0.8/inc/hub/pages/tools/apis/scripts.js (added)
-
tags/3.0.0.8/inc/hub/pages/tools/apis/styles.css (added)
-
tags/3.0.0.8/inc/hub/pages/tools/auto-drafts (added)
-
tags/3.0.0.8/inc/hub/pages/tools/auto-drafts/class-auto-drafts.php (added)
-
tags/3.0.0.8/inc/hub/pages/tools/auto-drafts/page-auto-drafts.php (added)
-
tags/3.0.0.8/inc/hub/pages/tools/auto-drafts/scripts.js (added)
-
tags/3.0.0.8/inc/hub/pages/tools/auto-drafts/styles.css (added)
-
tags/3.0.0.8/inc/hub/pages/tools/class-tools.php (added)
-
tags/3.0.0.8/inc/hub/pages/tools/cookies (added)
-
tags/3.0.0.8/inc/hub/pages/tools/cookies/class-cookies.php (added)
-
tags/3.0.0.8/inc/hub/pages/tools/cookies/page-cookies.php (added)
-
tags/3.0.0.8/inc/hub/pages/tools/cookies/scripts.js (added)
-
tags/3.0.0.8/inc/hub/pages/tools/cookies/styles.css (added)
-
tags/3.0.0.8/inc/hub/pages/tools/cron-jobs (added)
-
tags/3.0.0.8/inc/hub/pages/tools/cron-jobs/class-cron-jobs.php (added)
-
tags/3.0.0.8/inc/hub/pages/tools/cron-jobs/page-cron-jobs.php (added)
-
tags/3.0.0.8/inc/hub/pages/tools/cron-jobs/styles.css (added)
-
tags/3.0.0.8/inc/hub/pages/tools/db-tables (added)
-
tags/3.0.0.8/inc/hub/pages/tools/db-tables/class-db-tables.php (added)
-
tags/3.0.0.8/inc/hub/pages/tools/db-tables/page-db-tables.php (added)
-
tags/3.0.0.8/inc/hub/pages/tools/db-tables/scripts.js (added)
-
tags/3.0.0.8/inc/hub/pages/tools/db-tables/styles.css (added)
-
tags/3.0.0.8/inc/hub/pages/tools/defines (added)
-
tags/3.0.0.8/inc/hub/pages/tools/defines/class-defines.php (added)
-
tags/3.0.0.8/inc/hub/pages/tools/defines/page-defines.php (added)
-
tags/3.0.0.8/inc/hub/pages/tools/defines/scripts.js (added)
-
tags/3.0.0.8/inc/hub/pages/tools/defines/styles.css (added)
-
tags/3.0.0.8/inc/hub/pages/tools/discord (added)
-
tags/3.0.0.8/inc/hub/pages/tools/discord/class-discord.php (added)
-
tags/3.0.0.8/inc/hub/pages/tools/discord/page-discord.php (added)
-
tags/3.0.0.8/inc/hub/pages/tools/discord/scripts.js (added)
-
tags/3.0.0.8/inc/hub/pages/tools/discord/styles.css (added)
-
tags/3.0.0.8/inc/hub/pages/tools/globals (added)
-
tags/3.0.0.8/inc/hub/pages/tools/globals/class-globals.php (added)
-
tags/3.0.0.8/inc/hub/pages/tools/globals/page-globals.php (added)
-
tags/3.0.0.8/inc/hub/pages/tools/globals/scripts.js (added)
-
tags/3.0.0.8/inc/hub/pages/tools/globals/styles.css (added)
-
tags/3.0.0.8/inc/hub/pages/tools/htaccess (added)
-
tags/3.0.0.8/inc/hub/pages/tools/htaccess/class-htaccess.php (added)
-
tags/3.0.0.8/inc/hub/pages/tools/htaccess/page-htaccess.php (added)
-
tags/3.0.0.8/inc/hub/pages/tools/htaccess/scripts.js (added)
-
tags/3.0.0.8/inc/hub/pages/tools/logs (added)
-
tags/3.0.0.8/inc/hub/pages/tools/logs/class-activity.php (added)
-
tags/3.0.0.8/inc/hub/pages/tools/logs/class-logs.php (added)
-
tags/3.0.0.8/inc/hub/pages/tools/logs/page-logs.php (added)
-
tags/3.0.0.8/inc/hub/pages/tools/logs/scripts.js (added)
-
tags/3.0.0.8/inc/hub/pages/tools/logs/styles.css (added)
-
tags/3.0.0.8/inc/hub/pages/tools/metadata (added)
-
tags/3.0.0.8/inc/hub/pages/tools/metadata/class-metadata.php (added)
-
tags/3.0.0.8/inc/hub/pages/tools/metadata/page-metadata.php (added)
-
tags/3.0.0.8/inc/hub/pages/tools/metadata/scripts.js (added)
-
tags/3.0.0.8/inc/hub/pages/tools/metadata/styles.css (added)
-
tags/3.0.0.8/inc/hub/pages/tools/page-tools.php (added)
-
tags/3.0.0.8/inc/hub/pages/tools/php-info (added)
-
tags/3.0.0.8/inc/hub/pages/tools/php-info/page-php-info.php (added)
-
tags/3.0.0.8/inc/hub/pages/tools/php-info/styles.css (added)
-
tags/3.0.0.8/inc/hub/pages/tools/php-ini (added)
-
tags/3.0.0.8/inc/hub/pages/tools/php-ini/page-php-ini.php (added)
-
tags/3.0.0.8/inc/hub/pages/tools/post-types (added)
-
tags/3.0.0.8/inc/hub/pages/tools/post-types/class-post-types.php (added)
-
tags/3.0.0.8/inc/hub/pages/tools/post-types/page-post-types.php (added)
-
tags/3.0.0.8/inc/hub/pages/tools/post-types/scripts.js (added)
-
tags/3.0.0.8/inc/hub/pages/tools/post-types/styles.css (added)
-
tags/3.0.0.8/inc/hub/pages/tools/scripts.js (added)
-
tags/3.0.0.8/inc/hub/pages/tools/server (added)
-
tags/3.0.0.8/inc/hub/pages/tools/server/page-server.php (added)
-
tags/3.0.0.8/inc/hub/pages/tools/sessions (added)
-
tags/3.0.0.8/inc/hub/pages/tools/sessions/class-sessions.php (added)
-
tags/3.0.0.8/inc/hub/pages/tools/sessions/page-sessions.php (added)
-
tags/3.0.0.8/inc/hub/pages/tools/sessions/scripts.js (added)
-
tags/3.0.0.8/inc/hub/pages/tools/sessions/styles.css (added)
-
tags/3.0.0.8/inc/hub/pages/tools/shortcodes (added)
-
tags/3.0.0.8/inc/hub/pages/tools/shortcodes/class-shortcodes.php (added)
-
tags/3.0.0.8/inc/hub/pages/tools/shortcodes/page-shortcodes.php (added)
-
tags/3.0.0.8/inc/hub/pages/tools/shortcodes/scripts.js (added)
-
tags/3.0.0.8/inc/hub/pages/tools/shortcodes/styles.css (added)
-
tags/3.0.0.8/inc/hub/pages/tools/signups (added)
-
tags/3.0.0.8/inc/hub/pages/tools/signups/class-signups.php (added)
-
tags/3.0.0.8/inc/hub/pages/tools/signups/page-signups.php (added)
-
tags/3.0.0.8/inc/hub/pages/tools/signups/scripts.js (added)
-
tags/3.0.0.8/inc/hub/pages/tools/signups/styles.css (added)
-
tags/3.0.0.8/inc/hub/pages/tools/site-options (added)
-
tags/3.0.0.8/inc/hub/pages/tools/site-options/class-site-options.php (added)
-
tags/3.0.0.8/inc/hub/pages/tools/site-options/page-site-options.php (added)
-
tags/3.0.0.8/inc/hub/pages/tools/site-options/scripts.js (added)
-
tags/3.0.0.8/inc/hub/pages/tools/site-options/styles-dark.css (added)
-
tags/3.0.0.8/inc/hub/pages/tools/site-options/styles.css (added)
-
tags/3.0.0.8/inc/hub/pages/tools/styles.css (added)
-
tags/3.0.0.8/inc/hub/pages/tools/taxonomies (added)
-
tags/3.0.0.8/inc/hub/pages/tools/taxonomies/class-taxonomies.php (added)
-
tags/3.0.0.8/inc/hub/pages/tools/taxonomies/page-taxonomies.php (added)
-
tags/3.0.0.8/inc/hub/pages/tools/taxonomies/scripts.js (added)
-
tags/3.0.0.8/inc/hub/pages/tools/taxonomies/styles.css (added)
-
tags/3.0.0.8/inc/hub/pages/tools/testing (added)
-
tags/3.0.0.8/inc/hub/pages/tools/testing/class-testing.php (added)
-
tags/3.0.0.8/inc/hub/pages/tools/testing/page-testing.php (added)
-
tags/3.0.0.8/inc/hub/pages/tools/testing/scripts.js (added)
-
tags/3.0.0.8/inc/hub/pages/tools/testing/styles.css (added)
-
tags/3.0.0.8/inc/hub/pages/tools/transients (added)
-
tags/3.0.0.8/inc/hub/pages/tools/transients/class-transients.php (added)
-
tags/3.0.0.8/inc/hub/pages/tools/transients/page-transients.php (added)
-
tags/3.0.0.8/inc/hub/pages/tools/transients/scripts.js (added)
-
tags/3.0.0.8/inc/hub/pages/tools/transients/styles.css (added)
-
tags/3.0.0.8/inc/hub/pages/tools/wpconfig (added)
-
tags/3.0.0.8/inc/hub/pages/tools/wpconfig/class-wpconfig.php (added)
-
tags/3.0.0.8/inc/hub/pages/tools/wpconfig/page-wpconfig.php (added)
-
tags/3.0.0.8/inc/hub/pages/tools/wpconfig/scripts.js (added)
-
tags/3.0.0.8/inc/hub/pages/welcome (added)
-
tags/3.0.0.8/inc/hub/pages/welcome/class-welcome.php (added)
-
tags/3.0.0.8/inc/hub/pages/welcome/page-welcome.php (added)
-
tags/3.0.0.8/inc/hub/pages/welcome/scripts.js (added)
-
tags/3.0.0.8/inc/hub/pages/welcome/styles.css (added)
-
tags/3.0.0.8/inc/hub/scripts.js (added)
-
tags/3.0.0.8/inc/hub/styles-dark.css (added)
-
tags/3.0.0.8/inc/hub/styles.css (added)
-
tags/3.0.0.8/inc/index.php (added)
-
tags/3.0.0.8/inc/integrations (added)
-
tags/3.0.0.8/inc/integrations/gravity-forms (added)
-
tags/3.0.0.8/inc/integrations/gravity-forms/class-gravity-forms.php (added)
-
tags/3.0.0.8/inc/integrations/query-monitor (added)
-
tags/3.0.0.8/inc/integrations/query-monitor/styles.css (added)
-
tags/3.0.0.8/inc/shortcodes.php (added)
-
tags/3.0.0.8/inc/site-wide (added)
-
tags/3.0.0.8/inc/site-wide/class-site-wide.php (added)
-
tags/3.0.0.8/inc/site-wide/heartbeat (added)
-
tags/3.0.0.8/inc/site-wide/heartbeat/class-heartbeat.php (added)
-
tags/3.0.0.8/inc/site-wide/heartbeat/scripts.js (added)
-
tags/3.0.0.8/inc/site-wide/heartbeat/styles.css (added)
-
tags/3.0.0.8/inc/site-wide/styles.css (added)
-
tags/3.0.0.8/index.php (added)
-
tags/3.0.0.8/readme.txt (added)
-
tags/3.0.0.8/uninstall.php (added)
-
trunk/dev-debug-tools.php (modified) (3 diffs)
-
trunk/inc/admin-area/admin-bar/class-admin-bar.php (modified) (3 diffs)
-
trunk/inc/admin-area/admin-bar/debug-mode-indicator.css (added)
-
trunk/inc/functions.php (modified) (1 diff)
-
trunk/inc/hub/pages/dashboard/class-dashboard.php (modified) (3 diffs)
-
trunk/inc/hub/pages/dashboard/page-dashboard.php (modified) (1 diff)
-
trunk/inc/hub/pages/settings/class-settings.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
dev-debug-tools/trunk/dev-debug-tools.php
r3422220 r3423844 4 4 * Plugin URI: https://pluginrx.com/plugin/dev-debug-tools/ 5 5 * Description: WordPress debugging and testing tools for developers 6 * Version: 3.0.0. 76 * Version: 3.0.0.8 7 7 * Requires at least: 5.9 8 8 * Tested up to: 6.9 … … 135 135 /* translators: %1$s is plugin name, %2$s is required PHP version */ 136 136 esc_html( __( '%1$s requires PHP %2$s or higher.', 'dev-debug-tools' ) ), 137 esc_html( $this->meta[ 'name'] ),138 esc_html( $this->meta[ 'requires_php'] )137 esc_html( $this->meta[ 'name' ] ), 138 esc_html( $this->meta[ 'requires_php' ] ) 139 139 ) ); 140 140 } … … 268 268 */ 269 269 public static function script_version() : string { 270 return self::is_test_mode() ? (string) time() : self::version(); 270 if ( self::is_test_mode() ) { 271 return 'TEST-' . time(); 272 } 273 return self::version(); 271 274 } // End script_version() 272 275 -
dev-debug-tools/trunk/inc/admin-area/admin-bar/class-admin-bar.php
r3422220 r3423844 73 73 if ( get_option( 'ddtt_admin_bar_gravity_form_finder', true ) && ! is_admin() && is_plugin_active( 'gravityforms/gravityforms.php' ) ) { 74 74 add_action( 'wp_enqueue_scripts', [ $this, 'enqueue_gravity_forms_finder' ] ); 75 } 76 77 // Indicate that we are in debug mode 78 if ( get_option( 'ddtt_admin_bar_debug', true ) ) { 79 add_filter( 'body_class', [ $this, 'add_debug_body_class' ] ); 80 add_filter( 'admin_body_class', [ $this, 'add_debug_body_class' ] ); 81 add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_debug_mode_indicator' ] ); 82 add_action( 'wp_enqueue_scripts', [ $this, 'enqueue_debug_mode_indicator' ] ); 75 83 } 76 84 … … 678 686 */ 679 687 private function render_post_details( $wp_admin_bar ) { 688 $post_id = null; 680 689 if ( is_search() ) { 681 690 $post_info_title = __( 'Search Results Page', 'dev-debug-tools' ); … … 1076 1085 } // End ajax_save_centering_tool() 1077 1086 1087 1088 /** 1089 * Add a body class if WP_DEBUG is enabled 1090 * 1091 * @param string|array $classes The existing body classes. 1092 * @return string|array The modified body classes. 1093 */ 1094 public function add_debug_body_class( $classes ) { 1095 if ( defined( 'WP_DEBUG' ) && WP_DEBUG ) { 1096 if ( is_array( $classes ) ) { 1097 $classes[] = 'ddtt-debug-enabled'; 1098 } else { 1099 $classes .= ' ddtt-debug-enabled'; 1100 } 1101 } else { 1102 if ( is_array( $classes ) ) { 1103 $classes[] = 'ddtt-debug-disabled'; 1104 } else { 1105 $classes .= ' ddtt-debug-disabled'; 1106 } 1107 } 1108 return $classes; 1109 } // End add_debug_body_class() 1110 1111 1112 /** 1113 * Enqueue the condensed admin bar styles 1114 */ 1115 public function enqueue_debug_mode_indicator() { 1116 if ( Helpers::is_dev() ) { 1117 $version = Bootstrap::script_version(); 1118 $handle = 'ddtt-admin-bar-debug-mode-indicator'; 1119 1120 wp_enqueue_style( 1121 $handle, 1122 Bootstrap::url( 'inc/admin-area/admin-bar/debug-mode-indicator.css' ), 1123 [], 1124 $version 1125 ); 1126 } 1127 } // End enqueue_debug_mode_indicator() 1128 1078 1129 } 1079 1130 -
dev-debug-tools/trunk/inc/functions.php
r3422220 r3423844 16 16 */ 17 17 if ( ! function_exists( 'ddtt_is_dev' ) ) { 18 function ddtt_is_dev( $id , $array = false ) : bool|string|array {18 function ddtt_is_dev( $id = null, $array = false ) : bool|string|array { 19 19 if ( is_bool( $id ) ) { 20 20 -
dev-debug-tools/trunk/inc/hub/pages/dashboard/class-dashboard.php
r3422220 r3423844 45 45 } 46 46 47 if ( isset( $_POST[ 'ddtt-download-status-report' ] ) ) { // phpcs:ignore 48 $this->download_status_report(); 49 } 50 47 51 add_action( 'admin_enqueue_scripts', [ $this, 'enqueue_assets' ] ); 48 52 add_action( 'wp_ajax_ddtt_check_issue', [ $this, 'ajax_check_issue' ] ); … … 54 58 */ 55 59 public function download_important_files() { 56 if ( !isset( $_POST[ 'ddtt-download-important-files' ] ) || ! isset( $_POST[ $this->nonce_field ] ) || ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST[ $this->nonce_field ] ) ), $this->nonce_action ) ) { 60 if ( 61 ! isset( $_POST[ 'ddtt-download-important-files' ] ) || 62 ! isset( $_POST[ $this->nonce_field ] ) || 63 ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST[ $this->nonce_field ] ) ), $this->nonce_action ) 64 ) { 57 65 return; 58 66 } … … 98 106 } 99 107 } // End download_important_files() 108 109 110 /** 111 * Handle the download system status report request. 112 */ 113 public function download_status_report() { 114 if ( 115 ! isset( $_POST[ 'ddtt-download-status-report' ] ) || 116 ! isset( $_POST[ $this->nonce_field ] ) || 117 ! wp_verify_nonce( sanitize_text_field( wp_unslash( $_POST[ $this->nonce_field ] ) ), $this->nonce_action ) 118 ) { 119 return; 120 } 121 122 if ( ! current_user_can( 'manage_options' ) ) { 123 wp_die( 'Unauthorized access.' ); 124 } 125 126 $report_lines = []; 127 128 $report_lines[] = "DEVELOPER DEBUG TOOLS SYSTEM STATUS REPORT\n"; 129 130 $report_lines[] = "Is Test Mode Active: " . ( Bootstrap::is_test_mode() ? 'Yes' : 'No' ) . "\n"; 131 132 // Versions 133 $report_lines[] = "Plugin Version: " . Bootstrap::version(); 134 $report_lines[] = "WordPress Version: " . get_bloginfo( 'version' ); 135 $report_lines[] = "PHP Version: " . phpversion(); 136 global $wpdb; 137 $report_lines[] = "MySQL Version: " . $wpdb->db_version(); 138 139 $jquery_version = ''; 140 if ( isset( $GLOBALS[ 'wp_scripts' ] ) && $GLOBALS[ 'wp_scripts' ] instanceof \WP_Scripts ) { 141 $jquery_version = $GLOBALS[ 'wp_scripts' ]->registered[ 'jquery' ]->ver ?? false; 142 if ( $jquery_version ) { 143 $jquery_version = sanitize_text_field( wp_unslash( $jquery_version ) ); 144 } 145 } 146 $report_lines[] = "jQuery Version: " . $jquery_version; 147 148 // Site Info 149 $report_lines[] = "\nSite Domain: " . get_site_url(); 150 $report_lines[] = "Multisite: " . ( is_multisite() ? 'Yes' : 'No' ); 151 $report_lines[] = "WordPress Timezone: " . get_option( 'timezone_string' ); 152 $report_lines[] = "Developer Timezone: " . get_option( 'ddtt_dev_timezone' ); 153 $theme = wp_get_theme(); 154 $report_lines[] = "Active Theme: " . $theme->get( 'Name' ) . " " . $theme->get( 'Version' ); 155 $report_lines[] = "Is Child Theme? " . ( $theme->parent() ? 'Yes' : 'No' ); 156 157 // Plugins info 158 $all_plugins = get_plugins(); 159 $active_plugins = get_option( 'active_plugins', [] ); 160 $must_use_plugins = get_mu_plugins(); 161 $inactive_plugins = array_diff( array_keys( $all_plugins ), $active_plugins ); 162 163 $report_lines[] = "\nActive Plugins Count: " . count( $active_plugins ); 164 $report_lines[] = "Must Use Plugins Count: " . count( $must_use_plugins ); 165 $report_lines[] = "Inactive Plugins Count: " . count( $inactive_plugins ); 166 167 $report_lines[] = "\n======= ACTIVE PLUGINS: ======="; 168 foreach ( $active_plugins as $plugin_file ) { 169 if ( isset( $all_plugins[ $plugin_file ] ) ) { 170 $p = $all_plugins[ $plugin_file ]; 171 $report_lines[] = sprintf( 172 "%s by %s, v %s, %s", 173 $p[ 'Name' ], 174 $p[ 'Author' ], 175 $p[ 'Version' ], 176 $plugin_file 177 ); 178 } 179 } 180 181 // Plugin settings 182 $ignore_settings = [ 'ddtt_pass', 'ddtt_plugins' ]; 183 184 $report_lines[] = "\n======= PLUGIN SETTINGS: ======="; 185 $options = wp_load_alloptions(); 186 foreach ( $options as $key => $value ) { 187 if ( str_starts_with( $key, 'ddtt_' ) && ! in_array( $key, $ignore_settings ) ) { 188 $value = maybe_unserialize( $value ); 189 if ( is_array( $value ) || is_object( $value ) ) { 190 $report_lines[] = $key . " =>\n" . print_r( $value, true ); 191 } else { 192 $report_lines[] = $key . " => " . $value; 193 } 194 $report_lines[] = ""; // empty line between settings 195 } 196 } 197 198 $filename = 'ddtt-system-status-report-' . gmdate( 'Y-m-d-H-i-s' ) . '.txt'; 199 200 header( 'Content-Type: text/plain' ); 201 header( 'Content-Disposition: attachment; filename="' . $filename . '"' ); 202 echo implode( "\n", $report_lines ); 203 204 exit; 205 } // End download_status_report() 100 206 101 207 -
dev-debug-tools/trunk/inc/hub/pages/dashboard/page-dashboard.php
r3422220 r3423844 92 92 <span class="dashicons dashicons-media-archive"></span> 93 93 <span class="button-label"><?php esc_html_e( 'Download Important Files', 'dev-debug-tools' ); ?></span> 94 </button> 95 <button class="ddtt-button" type="submit" name="ddtt-download-status-report" title="Text file with system status report to share when seeking support" style="margin-top: 10px;"> 96 <span class="dashicons dashicons-media-text"></span> 97 <span class="button-label"><?php esc_html_e( 'Download System Status Report', 'dev-debug-tools' ); ?></span> 94 98 </button> 95 99 </form> -
dev-debug-tools/trunk/inc/hub/pages/settings/class-settings.php
r3422220 r3423844 568 568 'title' => __( 'Add Log Error Count', 'dev-debug-tools' ), 569 569 'desc' => __( 'Add the total number of errors in your logs to the admin bar.', 'dev-debug-tools' ), 570 'type' => 'checkbox', 571 'default' => true, 572 ], 573 'admin_bar_debug' => [ 574 'title' => __( 'Indicate WP_DEBUG is Enabled', 'dev-debug-tools' ), 575 'desc' => __( 'Add faint red stripes to the admin bar when WP_DEBUG is enabled.', 'dev-debug-tools' ), 570 576 'type' => 'checkbox', 571 577 'default' => true, -
dev-debug-tools/trunk/readme.txt
r3422228 r3423844 5 5 Tested up to: 6.9 6 6 Requires PHP: 8.0 7 Stable tag: 3.0.0. 77 Stable tag: 3.0.0.8 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.txt … … 107 107 108 108 == Changelog == 109 = 3.0.0 = 109 = 3.0.0.8 = 110 * Update: Added a Download System Status Report button to dashboard for sharing with support 111 * Update: Added option to indicate WP_DEBUG is enabled by subtly striping the admin bar 112 * Fix: ddtt_is_dev() causing fatal error if used without any params 113 114 = 3.0.0.7 = 110 115 * Major update: rewrote the plugin for better performance, UI and UX 111 116 * Fixes: Fixed a number of bugs throughout
Note: See TracChangeset
for help on using the changeset viewer.