Changeset 43113 for branches/4.9/src/wp-admin/includes/misc.php
- Timestamp:
- 05/02/2018 03:53:15 AM (7 years ago)
- Location:
- branches/4.9
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.9
-
branches/4.9/src/wp-admin/includes/misc.php
r43112 r43113 1501 1501 $date_format = get_option( 'date_format' ); 1502 1502 $copy = __( 'Copy' ); 1503 $more = __( 'Read More' ); 1504 $less = __( 'Read Less' ); 1503 1505 1504 1506 foreach ( $content_array as $section ) { … … 1519 1521 } 1520 1522 1521 $content .= '<div class="privacy-text-section' . $class . '">'; 1522 $content .= '<h3>' . $section['plugin_name'] . '</h3>'; 1523 $content .= '<button type="button" class="privacy-text-copy-button button">'; 1524 $content .= $copy; 1525 $content .= '<span class="screen-reader-text">' . sprintf( __( 'Copy suggested policy text from %s.' ), $section['plugin_name'] ) . '</span>'; 1526 $content .= '</button>'; 1523 $plugin_name = esc_html( $section['plugin_name'] ); 1524 1525 $content .= '<div class="privacy-text-section folded' . $class . '">'; 1526 $content .= '<h3>' . $plugin_name . '</h3>'; 1527 1527 1528 1528 if ( ! empty( $meta ) ) { … … 1530 1530 } 1531 1531 1532 $content .= '<div class="policy-text">' . $section['policy_text'] . '</div>'; 1533 $content .= "</div>\n"; 1532 $content .= '<div class="policy-text" aria-expanded="false">' . $section['policy_text'] . '</div>'; 1533 1534 $content .= '<div class="privacy-text-actions">'; 1535 $content .= '<button type="button" class="button-link policy-text-more">'; 1536 $content .= $more; 1537 $content .= '<span class="screen-reader-text">' . sprintf( __( 'Expand suggested policy text section from %s.' ), $plugin_name ) . '</span>'; 1538 $content .= '</button>'; 1539 1540 $content .= '<button type="button" class="button-link policy-text-less">'; 1541 $content .= $less; 1542 $content .= '<span class="screen-reader-text">' . sprintf( __( 'Collapse suggested policy text section from %s.' ), $plugin_name ) . '</span>'; 1543 $content .= '</button>'; 1544 1545 if ( empty( $section['removed'] ) ) { 1546 $content .= '<button type="button" class="privacy-text-copy button">'; 1547 $content .= $copy; 1548 $content .= '<span class="screen-reader-text">' . sprintf( __( 'Copy suggested policy text from %s.' ), $plugin_name ) . '</span>'; 1549 $content .= '</button>'; 1550 } 1551 1552 $content .= '</div>'; // End of .privacy-text-actions. 1553 $content .= "</div>\n"; // End of .privacy-text-section. 1534 1554 } 1535 1555 … … 1541 1561 </button> 1542 1562 <div class="privacy-text-box-head hndle"> 1543 <h2><?php _e( 'This suggested privacy policy text comes from plugins you have installed.' ); ?></h2>1563 <h2><?php _e( 'This suggested privacy policy text comes from plugins and themes you have installed.' ); ?></h2> 1544 1564 <p> 1545 1565 <?php _e( 'We suggest reviewing this text then copying and pasting it into your privacy policy page.' ); ?> … … 1558 1578 * Return the default suggested privacy policy content. 1559 1579 * 1560 * @since 4.9.6 1580 * @since 4.9.6 1561 1581 * 1562 1582 * @return string The defauld policy content. … … 1585 1605 public static function add_suggested_content() { 1586 1606 $content = self::get_default_content(); 1587 wp_add_privacy_policy_content( 1588 } 1589 } 1607 wp_add_privacy_policy_content( 'WordPress', $content ); 1608 } 1609 }
Note: See TracChangeset
for help on using the changeset viewer.