From dfd77631ac6c5b8b5ceb50fcdcc7767102397455 Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Tue, 1 May 2018 09:47:53 +0000 Subject: [PATCH] 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 --- src/wp-admin/includes/misc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wp-admin/includes/misc.php b/src/wp-admin/includes/misc.php index 543cf0c992..51f795a9df 100644 --- a/src/wp-admin/includes/misc.php +++ b/src/wp-admin/includes/misc.php @@ -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 .= '
'; + $content .= '
'; $content .= '

' . $plugin_name . '

'; if ( ! empty( $meta ) ) {