From fb70bb9355a22e52b13d1357936ee2303710ed01 Mon Sep 17 00:00:00 2001
From: Paul Biron <paul@sparrowhawkcomputing.com>
Date: Sun, 6 Mar 2022 07:50:33 -0700
Subject: [PATCH] Fix HTML errors in the
get_test_available_updates_disk_space() and
get_test_update_temp_backup_writable() site health tests (closing P tags were
missing).
---
src/wp-admin/includes/class-wp-site-health.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/wp-admin/includes/class-wp-site-health.php b/src/wp-admin/includes/class-wp-site-health.php
index e8aacf55a4..43be605322 100644
a
|
b
|
class WP_Site_Health { |
1905 | 1905 | ), |
1906 | 1906 | 'description' => sprintf( |
1907 | 1907 | /* translators: %s: Available disk space in MB or GB. */ |
1908 | | '<p>' . __( '%s available disk space was detected, update routines can be performed safely.' ), |
| 1908 | '<p>' . __( '%s available disk space was detected, update routines can be performed safely.' ) . '</p>', |
1909 | 1909 | size_format( $available_space ) |
1910 | 1910 | ), |
1911 | 1911 | 'actions' => '', |
… |
… |
class WP_Site_Health { |
1955 | 1955 | ), |
1956 | 1956 | 'description' => sprintf( |
1957 | 1957 | /* translators: %s: wp-content/upgrade/temp-backup */ |
1958 | | '<p>' . __( 'The %s directory used to improve the stability of plugin and theme updates is writable.' ), |
| 1958 | '<p>' . __( 'The %s directory used to improve the stability of plugin and theme updates is writable.' ) . '</p>', |
1959 | 1959 | '<code>wp-content/upgrade/temp-backup</code>' |
1960 | 1960 | ), |
1961 | 1961 | 'actions' => '', |
--
2.30.2.windows.1
From 2c4e7209f4f5ba2f7684bced5c54ade64db0cec7 Mon Sep 17 00:00:00 2001
From: Paul Biron <paul@sparrowhawkcomputing.com>
Date: Sun, 6 Mar 2022 08:37:19 -0700
Subject: [PATCH] Add `WP_RUNTIME_ENVIRONMENT` to the `WordPress Contents`
section of the site health debug data.
---
src/wp-admin/includes/class-wp-debug-data.php | 48 ++++++++++++-------
1 file changed, 30 insertions(+), 18 deletions(-)
diff --git a/src/wp-admin/includes/class-wp-debug-data.php b/src/wp-admin/includes/class-wp-debug-data.php
index 3bc30ea212..6486daff82 100644
a
|
b
|
class WP_Debug_Data { |
241 | 241 | $wp_environment_type = __( 'Undefined' ); |
242 | 242 | } |
243 | 243 | |
| 244 | // Check WP_RUNTIME_ENVIRONMENT. |
| 245 | if ( defined( 'WP_RUNTIME_ENVIRONMENT' ) ) { |
| 246 | $wp_runtime_environment = WP_RUNTIME_ENVIRONMENT; |
| 247 | } else { |
| 248 | $wp_runtime_environment = __( 'Undefined' ); |
| 249 | } |
| 250 | |
244 | 251 | $info['wp-constants'] = array( |
245 | 252 | 'label' => __( 'WordPress Constants' ), |
246 | 253 | 'description' => __( 'These settings alter where and how parts of WordPress are loaded.' ), |
247 | 254 | 'fields' => array( |
248 | | 'ABSPATH' => array( |
| 255 | 'ABSPATH' => array( |
249 | 256 | 'label' => 'ABSPATH', |
250 | 257 | 'value' => ABSPATH, |
251 | 258 | 'private' => true, |
252 | 259 | ), |
253 | | 'WP_HOME' => array( |
| 260 | 'WP_HOME' => array( |
254 | 261 | 'label' => 'WP_HOME', |
255 | 262 | 'value' => ( defined( 'WP_HOME' ) ? WP_HOME : __( 'Undefined' ) ), |
256 | 263 | 'debug' => ( defined( 'WP_HOME' ) ? WP_HOME : 'undefined' ), |
257 | 264 | ), |
258 | | 'WP_SITEURL' => array( |
| 265 | 'WP_SITEURL' => array( |
259 | 266 | 'label' => 'WP_SITEURL', |
260 | 267 | 'value' => ( defined( 'WP_SITEURL' ) ? WP_SITEURL : __( 'Undefined' ) ), |
261 | 268 | 'debug' => ( defined( 'WP_SITEURL' ) ? WP_SITEURL : 'undefined' ), |
262 | 269 | ), |
263 | | 'WP_CONTENT_DIR' => array( |
| 270 | 'WP_CONTENT_DIR' => array( |
264 | 271 | 'label' => 'WP_CONTENT_DIR', |
265 | 272 | 'value' => WP_CONTENT_DIR, |
266 | 273 | ), |
267 | | 'WP_PLUGIN_DIR' => array( |
| 274 | 'WP_PLUGIN_DIR' => array( |
268 | 275 | 'label' => 'WP_PLUGIN_DIR', |
269 | 276 | 'value' => WP_PLUGIN_DIR, |
270 | 277 | ), |
271 | | 'WP_MEMORY_LIMIT' => array( |
| 278 | 'WP_MEMORY_LIMIT' => array( |
272 | 279 | 'label' => 'WP_MEMORY_LIMIT', |
273 | 280 | 'value' => WP_MEMORY_LIMIT, |
274 | 281 | ), |
275 | | 'WP_MAX_MEMORY_LIMIT' => array( |
| 282 | 'WP_MAX_MEMORY_LIMIT' => array( |
276 | 283 | 'label' => 'WP_MAX_MEMORY_LIMIT', |
277 | 284 | 'value' => WP_MAX_MEMORY_LIMIT, |
278 | 285 | ), |
279 | | 'WP_DEBUG' => array( |
| 286 | 'WP_DEBUG' => array( |
280 | 287 | 'label' => 'WP_DEBUG', |
281 | 288 | 'value' => WP_DEBUG ? __( 'Enabled' ) : __( 'Disabled' ), |
282 | 289 | 'debug' => WP_DEBUG, |
283 | 290 | ), |
284 | | 'WP_DEBUG_DISPLAY' => array( |
| 291 | 'WP_DEBUG_DISPLAY' => array( |
285 | 292 | 'label' => 'WP_DEBUG_DISPLAY', |
286 | 293 | 'value' => WP_DEBUG_DISPLAY ? __( 'Enabled' ) : __( 'Disabled' ), |
287 | 294 | 'debug' => WP_DEBUG_DISPLAY, |
288 | 295 | ), |
289 | | 'WP_DEBUG_LOG' => array( |
| 296 | 'WP_DEBUG_LOG' => array( |
290 | 297 | 'label' => 'WP_DEBUG_LOG', |
291 | 298 | 'value' => $wp_debug_log_value, |
292 | 299 | 'debug' => WP_DEBUG_LOG, |
293 | 300 | ), |
294 | | 'SCRIPT_DEBUG' => array( |
| 301 | 'SCRIPT_DEBUG' => array( |
295 | 302 | 'label' => 'SCRIPT_DEBUG', |
296 | 303 | 'value' => SCRIPT_DEBUG ? __( 'Enabled' ) : __( 'Disabled' ), |
297 | 304 | 'debug' => SCRIPT_DEBUG, |
298 | 305 | ), |
299 | | 'WP_CACHE' => array( |
| 306 | 'WP_CACHE' => array( |
300 | 307 | 'label' => 'WP_CACHE', |
301 | 308 | 'value' => WP_CACHE ? __( 'Enabled' ) : __( 'Disabled' ), |
302 | 309 | 'debug' => WP_CACHE, |
303 | 310 | ), |
304 | | 'CONCATENATE_SCRIPTS' => array( |
| 311 | 'CONCATENATE_SCRIPTS' => array( |
305 | 312 | 'label' => 'CONCATENATE_SCRIPTS', |
306 | 313 | 'value' => $concatenate_scripts, |
307 | 314 | 'debug' => $concatenate_scripts_debug, |
308 | 315 | ), |
309 | | 'COMPRESS_SCRIPTS' => array( |
| 316 | 'COMPRESS_SCRIPTS' => array( |
310 | 317 | 'label' => 'COMPRESS_SCRIPTS', |
311 | 318 | 'value' => $compress_scripts, |
312 | 319 | 'debug' => $compress_scripts_debug, |
313 | 320 | ), |
314 | | 'COMPRESS_CSS' => array( |
| 321 | 'COMPRESS_CSS' => array( |
315 | 322 | 'label' => 'COMPRESS_CSS', |
316 | 323 | 'value' => $compress_css, |
317 | 324 | 'debug' => $compress_css_debug, |
318 | 325 | ), |
319 | | 'WP_ENVIRONMENT_TYPE' => array( |
| 326 | 'WP_ENVIRONMENT_TYPE' => array( |
320 | 327 | 'label' => 'WP_ENVIRONMENT_TYPE', |
321 | 328 | 'value' => $wp_environment_type, |
322 | 329 | 'debug' => $wp_environment_type, |
323 | 330 | ), |
324 | | 'DB_CHARSET' => array( |
| 331 | 'WP_RUNTIME_ENVIRONMENT' => array( |
| 332 | 'label' => 'WP_RUNTIME_ENVIRONMENT', |
| 333 | 'value' => $wp_runtime_environment, |
| 334 | 'debug' => $wp_runtime_environment, |
| 335 | ), |
| 336 | 'DB_CHARSET' => array( |
325 | 337 | 'label' => 'DB_CHARSET', |
326 | 338 | 'value' => ( defined( 'DB_CHARSET' ) ? DB_CHARSET : __( 'Undefined' ) ), |
327 | 339 | 'debug' => ( defined( 'DB_CHARSET' ) ? DB_CHARSET : 'undefined' ), |
328 | 340 | ), |
329 | | 'DB_COLLATE' => array( |
| 341 | 'DB_COLLATE' => array( |
330 | 342 | 'label' => 'DB_COLLATE', |
331 | 343 | 'value' => ( defined( 'DB_COLLATE' ) ? DB_COLLATE : __( 'Undefined' ) ), |
332 | 344 | 'debug' => ( defined( 'DB_COLLATE' ) ? DB_COLLATE : 'undefined' ), |