Site Health: Allow some HTML (inline tags only) in the section descriptions. Add some more docs about expected formatting of the gathered data.

Props kraftbj, jeherve, mukesh27, audrasjb, azaozz.
Fixes #46878.
Built from https://develop.svn.wordpress.org/trunk@45259


git-svn-id: http://core.svn.wordpress.org/trunk@45068 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2019-04-23 21:05:52 +00:00
parent c7f2bda6f2
commit 2548263bac
3 changed files with 5 additions and 11 deletions

View File

@ -983,6 +983,8 @@ class WP_Debug_Data {
* a prefix, both for consistency as well as avoiding key collisions. Note that the array keys are used as labels
* for the copied data.
*
* All strings are expected to be plain text except $description that can contain inline HTML tags (see below).
*
* @since 5.2.0
*
* @param array $args {
@ -994,7 +996,7 @@ class WP_Debug_Data {
*
* @type string $label The title for this section of the debug output.
* @type string $description Optional. A description for your information section which may contain basic HTML
* markup: `em`, `strong` and `a` for linking to documentation or putting emphasis.
* markup, inline tags only as it is outputted in a paragraph.
* @type boolean $show_count Optional. If set to `true` the amount of fields will be included in the title for
* this section.
* @type boolean $private Optional. If set to `true` the section and all associated fields will be excluded

View File

@ -137,16 +137,8 @@ require_once( ABSPATH . 'wp-admin/admin-header.php' );
<div id="health-check-accordion-block-<?php echo esc_attr( $section ); ?>" class="health-check-accordion-panel" hidden="hidden">
<?php
$kses_settings = array(
'a' => array(
'href' => true,
),
'strong' => true,
'em' => true,
);
if ( isset( $details['description'] ) && ! empty( $details['description'] ) ) {
printf( '<p>%s</p>', wp_kses( $details['description'], $kses_settings ) );
printf( '<p>%s</p>', $details['description'] );
}
?>

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.2-beta3-45258';
$wp_version = '5.2-beta3-45259';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.