WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/02/2018 10:09:19 PM (2 years ago)
Author:
azaozz
Message:

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

See #43473.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/misc.php

    r43052 r43126  
    15871587
    15881588            $content .= '<div class="privacy-text-actions">';
    1589                 $content .= '<button type="button" class="button-link policy-text-more">';
    1590                     $content .= $more;
    1591                     $content .= '<span class="screen-reader-text">' . sprintf( __( 'Expand suggested policy text section from %s.' ), $plugin_name ) . '</span>';
    1592                 $content .= '</button>';
    1593 
    1594                 $content .= '<button type="button" class="button-link policy-text-less">';
    1595                     $content .= $less;
    1596                     $content .= '<span class="screen-reader-text">' . sprintf( __( 'Collapse suggested policy text section from %s.' ), $plugin_name ) . '</span>';
    1597                 $content .= '</button>';
     1589                if ( $folded ) {
     1590                    $content .= '<button type="button" class="button-link policy-text-more">';
     1591                        $content .= $more;
     1592                        $content .= '<span class="screen-reader-text">' . sprintf( __( 'Expand suggested policy text section from %s.' ), $plugin_name ) . '</span>';
     1593                    $content .= '</button>';
     1594
     1595                    $content .= '<button type="button" class="button-link policy-text-less">';
     1596                        $content .= $less;
     1597                        $content .= '<span class="screen-reader-text">' . sprintf( __( 'Collapse suggested policy text section from %s.' ), $plugin_name ) . '</span>';
     1598                    $content .= '</button>';
     1599                }
    15981600
    15991601                if ( empty( $section['removed'] ) ) {
Note: See TracChangeset for help on using the changeset viewer.