Privacy: only fold the sections in the privacy policy poxtbox when more than one.

See #43473.

git-svn-id: https://develop.svn.wordpress.org/trunk@43052 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2018-05-01 09:47:53 +00:00
parent c07f5272f2
commit dfd77631ac
1 changed files with 2 additions and 1 deletions

View File

@ -1555,6 +1555,7 @@ final class WP_Privacy_Policy_Content {
$copy = __( 'Copy' );
$more = __( 'Read More' );
$less = __( 'Read Less' );
$folded = ( count( $content_array ) > 1 ) ? ' folded' : '';
foreach ( $content_array as $section ) {
$class = $meta = '';
@ -1575,7 +1576,7 @@ final class WP_Privacy_Policy_Content {
$plugin_name = esc_html( $section['plugin_name'] );
$content .= '<div class="privacy-text-section folded' . $class . '">';
$content .= '<div class="privacy-text-section' . $folded . $class . '">';
$content .= '<h3>' . $plugin_name . '</h3>';
if ( ! empty( $meta ) ) {