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:
parent
c07f5272f2
commit
dfd77631ac
@ -1555,6 +1555,7 @@ final class WP_Privacy_Policy_Content {
|
|||||||
$copy = __( 'Copy' );
|
$copy = __( 'Copy' );
|
||||||
$more = __( 'Read More' );
|
$more = __( 'Read More' );
|
||||||
$less = __( 'Read Less' );
|
$less = __( 'Read Less' );
|
||||||
|
$folded = ( count( $content_array ) > 1 ) ? ' folded' : '';
|
||||||
|
|
||||||
foreach ( $content_array as $section ) {
|
foreach ( $content_array as $section ) {
|
||||||
$class = $meta = '';
|
$class = $meta = '';
|
||||||
@ -1575,7 +1576,7 @@ final class WP_Privacy_Policy_Content {
|
|||||||
|
|
||||||
$plugin_name = esc_html( $section['plugin_name'] );
|
$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>';
|
$content .= '<h3>' . $plugin_name . '</h3>';
|
||||||
|
|
||||||
if ( ! empty( $meta ) ) {
|
if ( ! empty( $meta ) ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user