Changeset 42992 for trunk/src/wp-admin/includes/misc.php
- Timestamp:
- 04/19/2018 12:38:44 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/misc.php
r42985 r42992 1550 1550 $date_format = get_option( 'date_format' ); 1551 1551 $copy = __( 'Copy' ); 1552 $more = __( 'Read More' ); 1553 $less = __( 'Read Less' ); 1552 1554 1553 1555 foreach ( $content_array as $section ) { … … 1568 1570 } 1569 1571 1570 $content .= '<div class="privacy-text-section' . $class . '">'; 1571 $content .= '<h3>' . $section['plugin_name'] . '</h3>'; 1572 $content .= '<button type="button" class="privacy-text-copy-button button">'; 1573 $content .= $copy; 1574 $content .= '<span class="screen-reader-text">' . sprintf( __( 'Copy suggested policy text from %s.' ), $section['plugin_name'] ) . '</span>'; 1575 $content .= '</button>'; 1572 $plugin_name = esc_html( $section['plugin_name'] ); 1573 1574 $content .= '<div class="privacy-text-section folded' . $class . '">'; 1575 $content .= '<h3>' . $plugin_name . '</h3>'; 1576 1576 1577 1577 if ( ! empty( $meta ) ) { … … 1579 1579 } 1580 1580 1581 $content .= '<div class="policy-text">' . $section['policy_text'] . '</div>'; 1582 $content .= "</div>\n"; 1581 $content .= '<div class="policy-text" aria-expanded="false">' . $section['policy_text'] . '</div>'; 1582 1583 $content .= '<div class="privacy-text-actions">'; 1584 $content .= '<button type="button" class="button-link policy-text-more">'; 1585 $content .= $more; 1586 $content .= '<span class="screen-reader-text">' . sprintf( __( 'Expand suggested policy text section from %s.' ), $plugin_name ) . '</span>'; 1587 $content .= '</button>'; 1588 1589 $content .= '<button type="button" class="button-link policy-text-less">'; 1590 $content .= $less; 1591 $content .= '<span class="screen-reader-text">' . sprintf( __( 'Collapse suggested policy text section from %s.' ), $plugin_name ) . '</span>'; 1592 $content .= '</button>'; 1593 1594 if ( empty( $section['removed'] ) ) { 1595 $content .= '<button type="button" class="privacy-text-copy button">'; 1596 $content .= $copy; 1597 $content .= '<span class="screen-reader-text">' . sprintf( __( 'Copy suggested policy text from %s.' ), $plugin_name ) . '</span>'; 1598 $content .= '</button>'; 1599 } 1600 1601 $content .= '</div>'; // End of .privacy-text-actions. 1602 $content .= "</div>\n"; // End of .privacy-text-section. 1583 1603 } 1584 1604 … … 1590 1610 </button> 1591 1611 <div class="privacy-text-box-head hndle"> 1592 <h2><?php _e( 'This suggested privacy policy text comes from plugins you have installed.' ); ?></h2>1612 <h2><?php _e( 'This suggested privacy policy text comes from plugins and themes you have installed.' ); ?></h2> 1593 1613 <p> 1594 1614 <?php _e( 'We suggest reviewing this text then copying and pasting it into your privacy policy page.' ); ?> … … 1607 1627 * Return the default suggested privacy policy content. 1608 1628 * 1609 * @since 4.9.6 1629 * @since 4.9.6 1610 1630 * 1611 1631 * @return string The defauld policy content. … … 1634 1654 public static function add_suggested_content() { 1635 1655 $content = self::get_default_content(); 1636 wp_add_privacy_policy_content( 1637 } 1638 } 1656 wp_add_privacy_policy_content( 'WordPress', $content ); 1657 } 1658 }
Note: See TracChangeset
for help on using the changeset viewer.