PluginProbe
WP Debugging / 2.11.22
WP Debugging v2.11.22
2.12.6 2.12.5 trunk 2.10.0 2.10.1 2.10.2 2.11.0 2.11.1 2.11.10 2.11.11 2.11.12 2.11.13 2.11.14 2.11.15 2.11.16 2.11.17 2.11.18 2.11.19 2.11.2 2.11.20 2.11.21 2.11.22 2.11.23 2.11.24 2.11.3 All 59 releases
wp-debugging / readme.txt

readme.txt in WP Debugging 2.11.22, at readme.txt

268 lines 8.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 # WP Debugging
2
3 Contributors: afragen
4 Tags: debug, support, wp-config
5 Requires at least: 5.2
6 Requires PHP: 5.6
7 Tested up to: 6.3
8 Stable tag: 2.11.22
9 Donate link: https://thefragens.com/git-updater-donate
10 License: MIT
11
12 A support/troubleshooting plugin for WordPress.
13
14 ## Description
15
16 This plugin sets the following debug constants in `wp-config.php` on plugin activation and removes them on plugin deactivation. Any errors will result in a PHP Exception being thrown. Debug constants per [Debugging in WordPress](https://wordpress.org/support/article/debugging-in-wordpress/).
17
18 Default settings:
19
20 define( 'WP_DEBUG_LOG', true );
21 define( 'SCRIPT_DEBUG', true );
22 define( 'SAVEQUERIES', true );
23
24  
25 `@ini_set( 'display_errors', 1 );` is set when the plugin is active. `WP_DEBUG` is set to true when the plugin is first run, thereafter it can be turned off in the Settings.
26
27 The Settings page allows the user to set the following.
28
29 define( 'WP_DEBUG', true ); // Default on initial plugin installation.
30 define( 'WP_DEBUG_DISPLAY', false ); // Default when not declared is true.
31 define( 'WP_DISABLE_FATAL_ERROR_HANDLER', true ); // WordPress 5.2 WSOD Override.
32
33 When the plugin is deactivated best efforts are made to re-add pre-existing constants to their former state. When the plugin is activated the default settings and any saved settings are restored.
34
35 This plugin uses the [wp-cli/wp-config-transformer](https://github.com/wp-cli/wp-config-transformer) command for writing constants to `wp-config.php`.
36
37 [Debug Quick Look](https://github.com/norcross/debug-quick-look) from Andrew Norcross is included with this plugin to assist in reading the debug.log file. If you already have this plugin installed you should delete it when WP Debugging is not active.
38
39 [Query Monitor](https://wordpress.org/plugins/query-monitor/) and [Debug Bar](https://wordpress.org/plugins/debug-bar/) plugins are optional dependencies to aid in debugging and troubleshooting. The notice for installation will recur 45 days after being dismissed.
40
41 If you have a non-standard location for your `wp-config.php` file you can use the filter `wp_debugging_config_path` to return the file path for your installation.
42
43 The filter `wp_debugging_add_constants` allows the user to add constants to `wp-config.php`.
44
45 The filter returns an array where the key is the name of the constant and the value is an array of data containing the value as a string and a boolean to indicate whether or not the value should be passed without quotes.
46
47 $my_constants = [
48 'my_test_constant' =>
49 [
50 'value' => 'abc123',
51 'raw' => false,
52 ],
53 'another_test_constant' => [ 'value' => 'true' ],
54 ];
55
56 The `value` option contains the constant's value as a string.
57
58 The `raw` option means that instead of placing the value inside the config as a string it will become unquoted. The default is `true`. Set as `false` for non-boolean values.
59
60 Example:
61
62 add_filter(
63 'wp_debugging_add_constants',
64 function( $added_constants ) {
65 $my_constants = [
66 'my_test_constant' => [
67 'value' => '124xyz',
68 'raw' => false,
69 ],
70 'another_test_constant' => [ 'value' => 'true' ],
71 ];
72 return array_merge( $added_constants, $my_constants );
73 },
74 10,
75 1
76 );
77
78 This will create the following constants.
79
80 define( 'MY_TEST_CONSTANT', '124xyz' );
81 define( 'ANOTHER_TEST_CONSTANT', true );
82
83 ## Screenshots
84
85 1. Settings Screen
86
87 ## Development
88
89 PRs are welcome against the [develop branch on GitHub](https://github.com/afragen/wp-debugging).
90
91 ## Changelog
92
93 #### 2.11.22 / 2023-05-31 🎂
94 * update `afragen/wp-dismiss-notice`
95
96 #### 2.11.21 / 2023-04-29
97 * update `afragen/wp-dismiss-notice`
98 * update Debug Quick Look
99
100 #### 2.11.18, 2.11.19, 2.11.20 / 2023-02-07
101 * composer update
102
103 #### 2.11.17 / 2023-01-27
104 * updated link to _Debugging in WordPress_ and improved text for translators
105 * composer update
106
107 #### 2.11.16 / 2023-01-19
108 * composer update
109
110 #### 2.11.15 / 2023-01-02
111 * composer update
112
113 #### 2.11.14 / 2022-07-15
114 * composer update
115
116 #### 2.11.13 / 2022-06-23
117 * make anchor `preg_match` more greedy
118
119 #### 2.11.12 / 2022-05-29
120 * update to latest `afragen/debug-quick-look`
121
122 #### 2.11.11 / 2022--5-16
123 * update `wp-dismiss-notice` with transient and only poll `wp_remote_get()` weekly
124
125 #### 2.11.10 / 2022-05-10
126 * use `sanitize_key()` for nonces
127 * composer update
128
129 #### 2.11.9 / 2022-02-05
130 * composer update
131
132 #### 2.11.8 / 2022-01-24
133 * load call to `WP_Dependency_Installer()` in `plugins_loaded` hook to avoid loading `pluggable.php`.
134 * update `WP_Dependency_Installer`
135
136 #### 2.11.7 / 2022-01-18
137 * fix logic in verify nonce conditional
138
139 #### 2.11.6 /2022-01-18
140 * proper nonce verification
141 * composer updates
142
143 #### 2.11.5 / 2022-01-11
144 * I messed up the release 🤦‍♂️
145
146 #### 2.11.4 / 2022-01-10
147 * composer updates
148
149 #### 2.11.3 / 2021-12-19
150 * more fixes via composer update
151
152 #### 2.11.2 / 2021-09-24
153 * composer update, cause of course I needed to fix something
154
155 #### 2.11.1 / 2021-09-24
156 * init in `plugins_loaded` hook
157 * composer update
158
159 #### 2.11.0 / 2021-09-23
160 * fix security issue for capabilities check, possible CSRF, and nonce checks.
161
162 #### 2.10.2 / 2021-09-04
163 * only use `esc_attr_e` for translating strings
164
165 #### 2.10.1 / 2021-07-23
166 * fix PHP Notice, `Settings:line 68`
167 * update Debug Quick Look admin bar menu for mobile
168
169 #### 2.10.0 / 2021-06-30
170 * update Debug Quick Look to show menu on mobile
171
172 #### 2.9.3 / 2021-06-22
173 * update WPConfigTransformer to use alternate anchor if default not present
174 * add @10up GitHub Actions for WordPress svn integration
175
176 #### 2.9.1 / 2020-11-17
177 * update `wp-dependency-installer` library
178 * update `wp-cli/wp-config-transformer`
179 * comment out quote normalization in `set_pre_activation_constants()`, not sure why I did that but it can cause problems [#10](https://github.com/afragen/wp-debugging/issues/10)
180
181 #### 2.9.0 / 2020-08-15
182 * use try/catch around use of `WPConfigTransformer` object
183
184 #### 2.8.0 / 2020-08-01
185 * exit if called directly
186 * NB: I have seen the `WPConfigTransformer` Exception error live. The issue seems to be that a `file_get_contents()` on the `wp-config.php` file path, at random times, returns an empty value. I'm done chasing this random error in `wp-cli/wp-config-transformer`. Modified version of `wp-cli/wp-config-transformer` present
187
188 #### 2.7.2 / 2020-06-01
189 * test `wp-config.php` everywhere, still occasional WSOD reports.
190
191 #### 2.7.1 / 2020-5-15
192 * return early if `wp-config.php` is empty before calling `WPConfigTransformer`
193
194 #### 2.7.0 / 2020-04-30
195 * start loading in `init` hook
196 * run `process_filter_constants()` as chained method in `Bootstrap`
197
198 #### 2.6.1 / 2020-03-28
199 * move `Settings` action link to front
200 * change test for `wp-config.php` file empty
201
202 #### 2.6.0 / 2020-02-28
203 * load autoloader in main file
204 * update composer dependencies
205
206 #### 2.5.8 / 2019-12-23
207 * badly messed up check for empty `wp-config.php`
208
209 #### 2.5.7 / 2019-12-20
210 * check and exit early if `wp-config.php` is empty
211 * return empty array for the above exit
212
213 #### 2.5.6 / 2019-11-02
214 * early exit if `wp-config.php` not set in specific functions
215
216 #### 2.5.5 / 2019-09-17
217 * update composer.json for wp-dependency-installer update, now requires at least PHP 5.6 for spread operator
218 * composer update
219
220 #### 2.5.4 / 2019-04-25
221 * added check for writable `wp-config.php`, exit with notice if not found
222
223 #### 2.5.3 / 2019-04-01
224 * update `Debug Quick Look` to display error log file path
225
226 #### 2.5.1 / 2019-04-01
227 * updated version of wp-cli/wp-config-transformer
228
229 #### 2.5.0 / 2019-03-25
230 * added `wp_debugging_add_constants` filter for users to add their own constants
231
232 #### 2.4.3 / 2019-03-09
233 * missed an output escape
234
235 #### 2.4.2 / 2019-02-26
236 * add `Domain Path` header
237
238 #### 2.4.1 / 2019-02-10
239 * refactor set/restore pre-activation constants
240
241 #### 2.4.0 / 2019-02-06
242 * save pre-activation constants for re-installation on deactivation ( say that 5x fast )
243
244 #### 2.3.0 / 2019-02-04
245 * look for `wp-config.php` in directory above `ABSPATH`
246 * add filter `wp_debugging_config_path` to set non-standard path to `wp-config.php`
247
248 #### 2.2.0 / 2019-02-02 🏈
249 * initial release on dot org
250
251 #### 2.1.1 / 2019-02-01
252 * only show WSOD bypass when appropriate
253 * update dependencies
254
255 #### 2.1.0 / 2019-01-26
256 * update Debug Quick Look, minor CSS changes
257 * Improve messaging
258 * add setting for WP_DISABLE_FATAL_ERROR_HANDLER constant (WSOD)
259 * add default setting of WP_DEBUG to true, can be changed
260
261 #### 2.0.0 / 2019-01-18
262 * total re-write
263 * add settings page
264 * use `wp-cli/wp-config-transformer` to change `wp-config.php`
265 * include `norcross/debug-quick-look` as dependency via composer but use my fork
266 * update POT via `composer.json` and wp-cli
267 * add image assets
268