Privacy: do not fold a single section in the privacy policy poxtbox.

See #43473.

git-svn-id: https://develop.svn.wordpress.org/trunk@43126 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2018-05-02 22:09:19 +00:00
parent a1e5ac685f
commit 506a99ef30
2 changed files with 11 additions and 8 deletions

View File

@ -717,6 +717,7 @@ span.wp-media-buttons-icon:before {
}
.privacy-text-actions {
height: 32px;
line-height: 32px;
padding-bottom: 6px;
}

View File

@ -1586,15 +1586,17 @@ final class WP_Privacy_Policy_Content {
$content .= '<div class="policy-text" aria-expanded="false">' . $section['policy_text'] . '</div>';
$content .= '<div class="privacy-text-actions">';
$content .= '<button type="button" class="button-link policy-text-more">';
$content .= $more;
$content .= '<span class="screen-reader-text">' . sprintf( __( 'Expand suggested policy text section from %s.' ), $plugin_name ) . '</span>';
$content .= '</button>';
if ( $folded ) {
$content .= '<button type="button" class="button-link policy-text-more">';
$content .= $more;
$content .= '<span class="screen-reader-text">' . sprintf( __( 'Expand suggested policy text section from %s.' ), $plugin_name ) . '</span>';
$content .= '</button>';
$content .= '<button type="button" class="button-link policy-text-less">';
$content .= $less;
$content .= '<span class="screen-reader-text">' . sprintf( __( 'Collapse suggested policy text section from %s.' ), $plugin_name ) . '</span>';
$content .= '</button>';
$content .= '<button type="button" class="button-link policy-text-less">';
$content .= $less;
$content .= '<span class="screen-reader-text">' . sprintf( __( 'Collapse suggested policy text section from %s.' ), $plugin_name ) . '</span>';
$content .= '</button>';
}
if ( empty( $section['removed'] ) ) {
$content .= '<button type="button" class="privacy-text-copy button">';