Changeset 43184
- Timestamp:
- 05/08/2018 11:44:57 PM (7 years ago)
- Location:
- trunk/src/wp-admin
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/css/edit.css
r43146 r43184 647 647 } 648 648 649 /* Sugested text for privacy policy postbox */ 649 /* Suggested text for privacy policy */ 650 .wp-suggested-policy-content { 651 max-width: 1000px; 652 } 653 650 654 .privacy-text-box { 651 margin: 10px 0 0; 652 } 653 654 .privacy-text-box-head { 655 border-left: 4px solid #ffb900; 656 border-bottom: 1px solid #e5e5e5; 657 box-shadow: 0 1px 1px rgba(0,0,0,0.04); 658 } 659 660 .privacy-text-box .privacy-text-box-head.hndle { 661 cursor: pointer; 662 } 663 664 .privacy-text-box-head p { 665 padding: 0 12px 14px; 655 width: calc(100% - 260px); 656 } 657 658 .privacy-text-box-toc { 659 float: right; 660 width: 250px; 661 background-color: #fff; 662 } 663 664 .privacy-text-box-toc p { 666 665 margin: 0; 667 } 668 669 .privacy-text-box-body { 670 height: 320px; 671 overflow: auto; 672 } 673 674 #privacy-text-box .inside { 675 margin: 0; 676 } 677 678 .privacy-text-box h3 { 666 padding: 0.7em 1em; 667 border-bottom: 1px solid #eee; 668 } 669 670 .privacy-text-box-toc ol { 671 margin-left: 2em; 672 } 673 674 .wp-suggested-policy-content h3 { 679 675 font-size: 1em; 680 676 margin: 1em 0 0.5em; … … 687 683 .privacy-text-section { 688 684 position: relative; 685 border-top: 1px solid #e3e3e3; 686 } 687 688 .privacy-text-section.text-updated { 689 padding: 1px 15px; 690 border-left: 4px solid #46b450; 691 background-color: #ecf7ed; 692 } 693 694 .privacy-text-section.text-removed { 689 695 padding: 1px 14px 1px 12px; 690 border-top: 1px solid #e3e3e3; 691 border-left: 4px solid transparent; 692 } 693 694 .privacy-text-section.text-updated { 695 border-left-color: #46b450; 696 background-color: #ecf7ed; 697 } 698 699 .privacy-text-section.text-removed { 700 border-left-color: #dc3232; 696 border-left: 4px solid #dc3232; 701 697 background-color: #fbeaea; 702 698 } 703 699 704 700 .privacy-text-meta { 705 font-size: 11px; 706 color: #555D66; 701 font-size: 11px; 702 font-style: italic; 703 color: #6C7781; 707 704 font-weight: 600; 708 } 709 710 .closed .privacy-text-box-body { 711 display: none; 712 } 713 714 .privacy-text-section.folded { 715 height: 150px; 716 overflow: hidden; 705 margin-top: -12px; 717 706 } 718 707 … … 723 712 } 724 713 725 .folded .privacy-text-actions { 726 position: absolute; 727 bottom: 0; 728 background-color: white; 729 width: calc(100% - 24px); 730 box-shadow: 0px -5px 10px 5px rgba(255, 255, 255, .8); 731 } 732 733 .text-removed .privacy-text-actions { 734 background-color: #fbeaea; 735 box-shadow: 0px -5px 10px 5px rgba(251, 234, 234, .8); 736 } 737 738 .text-updated .privacy-text-actions { 739 background-color: #ecf7ed; 740 box-shadow: 0px -5px 10px 5px rgba(236, 247, 237, .8); 741 } 742 743 .policy-text-more, 744 .folded .privacy-text-copy, 745 .folded .policy-text-less { 746 display: none; 747 } 748 749 .folded .policy-text-more { 750 display: inline; 751 } 752 753 #privacy-text-box .policy-text h2 { 714 .wp-suggested-policy-content .policy-text h2 { 754 715 margin: 1.2em 0 1em; 755 716 padding: 0; 756 717 } 757 718 758 p.wp-policy-help { 759 display: none; 719 .suggested-policy-content { 720 font-style: italic; 721 } 722 723 .privacy-text-section a.return-to-top { 724 float: right; 725 margin-right: -250px; 726 margin-top: 6px; 727 } 728 729 .hide-privacy-policy-tutorial .privacy-policy-tutorial { 730 visibility: hidden; 731 } 732 733 .wp-suggested-text p { 734 font-style: italic; 735 } 736 737 .wp-suggested-text p.privacy-policy-tutorial { 738 font-style: normal; 739 } 740 741 .notice.wp-pp-notice { 742 margin: 15px 0 3px; 760 743 } 761 744 … … 1684 1667 padding: 10px 0; 1685 1668 } 1686 } 1669 1670 .privacy-text-box { 1671 width: auto; 1672 } 1673 1674 .privacy-text-box-toc { 1675 float: none; 1676 width: auto; 1677 } 1678 1679 .privacy-text-section a.return-to-top { 1680 float: none; 1681 margin: 0; 1682 } 1683 } -
trunk/src/wp-admin/includes/admin-filters.php
r43154 r43184 141 141 142 142 // Show a "postbox" with the text suggestions for a privacy policy. 143 add_action( 'edit_form_after_title', array( 'WP_Privacy_Policy_Content', ' privacy_policy_postbox' ) );143 add_action( 'edit_form_after_title', array( 'WP_Privacy_Policy_Content', 'notice' ) ); 144 144 145 145 // Add the suggested policy text from WordPress. 146 add_action( 'admin_init', array( 'WP_Privacy_Policy_Content', 'add_suggested_content' ), 1 5);146 add_action( 'admin_init', array( 'WP_Privacy_Policy_Content', 'add_suggested_content' ), 1 ); 147 147 148 148 // Stop checking for text changes after the policy page is updated. -
trunk/src/wp-admin/includes/misc.php
r43170 r43184 1444 1444 public static function get_suggested_policy_text() { 1445 1445 $policy_page_id = (int) get_option( 'wp_page_for_privacy_policy' ); 1446 $new = self::$policy_content;1447 $old = (array) get_post_meta( $policy_page_id, '_wp_suggested_privacy_policy_content' );1448 1446 $checked = array(); 1449 1447 $time = time(); 1450 1448 $update_cache = false; 1449 $new = self::$policy_content; 1450 $old = array(); 1451 1452 if ( $policy_page_id ) { 1453 $old = (array) get_post_meta( $policy_page_id, '_wp_suggested_privacy_policy_content' ); 1454 } 1451 1455 1452 1456 // Check for no-changes and updates. … … 1514 1518 } 1515 1519 1516 if ( $update_cache ) {1520 if ( $update_cache && $policy_page_id ) { 1517 1521 delete_post_meta( $policy_page_id, '_wp_suggested_privacy_policy_content' ); 1518 1522 // Update the cache. … … 1522 1526 } 1523 1527 1524 // Stop checking for changes after the postbox has been loaded. 1525 // TODO make this user removable? 1528 // Stop checking for changes after the page has been loaded. 1526 1529 if ( get_option( '_wp_privacy_text_change_check' ) !== 'no-check' ) { 1527 1530 update_option( '_wp_privacy_text_change_check', 'no-check' ); … … 1532 1535 1533 1536 /** 1534 * Output the postbox when editing the privacy policy page1537 * Add a notice with a link to the guide when editing the privacy policy page. 1535 1538 * 1536 1539 * @since 4.9.6 … … 1538 1541 * @param $post WP_Post The currently edited post. 1539 1542 */ 1540 public static function privacy_policy_postbox( $post ) {1543 public static function notice( $post ) { 1541 1544 if ( ! ( $post instanceof WP_Post ) ) { 1542 1545 return; … … 1549 1552 } 1550 1553 1554 ?> 1555 <div class="notice notice-warning inline wp-pp-notice"> 1556 <p> 1557 <?php 1558 printf( 1559 __( 'Need help putting together your new Privacy Policy page? %s for recommendations on what content to include, along with policies suggested by your plugins and theme.' ), 1560 '<a href="' . admin_url( 'privacy.php?wp-suggested-policy-content=1' ) . '" target="_blank">' . __( 'Check out our guide' ) . '</a>' ); 1561 ?> 1562 </p> 1563 </div> 1564 <?php 1565 1566 } 1567 1568 /** 1569 * Output the privacy policy guide together with content from the theme and plugins. 1570 * 1571 * @since 4.9.6 1572 */ 1573 public static function privacy_policy_guide() { 1574 1551 1575 $content_array = self::get_suggested_policy_text(); 1552 1576 1553 1577 $content = ''; 1578 $toc = array( '<li><a href="#">' . __( 'Introduction' ) . '</a></li>' ); 1554 1579 $date_format = get_option( 'date_format' ); 1555 1580 $copy = __( 'Copy' ); 1556 $more = __( 'Read More' ); 1557 $less = __( 'Read Less' ); 1558 $folded = ( count( $content_array ) > 1 ) ? ' folded' : ''; 1581 $return_to_top = '<a href="#" class="return-to-top">' . __( '↑ Return to Top' ) . '</a>'; 1559 1582 1560 1583 foreach ( $content_array as $section ) { … … 1564 1587 $class = ' text-removed'; 1565 1588 $date = date_i18n( $date_format, $section['removed'] ); 1566 $meta = sprintf( __( ' Policy text removed %s.' ), $date );1589 $meta = sprintf( __( 'Removed %s.' ), $date ); 1567 1590 } elseif ( ! empty( $section['updated'] ) ) { 1568 1591 $class = ' text-updated'; 1569 1592 $date = date_i18n( $date_format, $section['updated'] ); 1570 $meta = sprintf( __( ' Policy text last updated %s.' ), $date );1571 } elseif ( ! empty( $section['added'] ) ) {1572 $class = ' text-added'; 1573 $date = date_i18n( $date_format, $section['added'] );1574 $meta = sprintf( __( 'Policy text added %s.' ), $date );1593 $meta = sprintf( __( 'Updated %s.' ), $date ); 1594 } 1595 1596 if ( $meta ) { 1597 $meta = '<br><span class="privacy-text-meta">' . $meta . '</span>'; 1575 1598 } 1576 1599 1577 1600 $plugin_name = esc_html( $section['plugin_name'] ); 1578 1579 $content .= '<div class="privacy-text-section' . $folded . $class . '">'; 1580 $content .= '<h3>' . $plugin_name . '</h3>'; 1581 1582 if ( ! empty( $meta ) ) { 1583 $content .= '<span class="privacy-text-meta">' . $meta . '</span>'; 1584 } 1585 1586 $content .= '<div class="policy-text" aria-expanded="false">' . $section['policy_text'] . '</div>'; 1587 1588 $content .= '<div class="privacy-text-actions">'; 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 } 1600 1601 if ( empty( $section['removed'] ) ) { 1601 $toc_id = sanitize_title( $plugin_name ); 1602 $toc[] = sprintf( '<li><a href="#%1$s">%2$s</a>' . $meta . '</li>', $toc_id, $plugin_name ); 1603 1604 $content .= '<div class="privacy-text-section' . $class . '">'; 1605 $content .= '<h2>' . sprintf( __( 'Source: %s' ), $plugin_name ) . '</h2>'; 1606 $content .= '<a id="' . $toc_id . '"></a>'; 1607 1608 $content .= '<div class="policy-text">' . $section['policy_text'] . '</div>'; 1609 $content .= $return_to_top; 1610 1611 if ( empty( $section['removed'] ) ) { 1612 $content .= '<div class="privacy-text-actions">'; 1602 1613 $content .= '<button type="button" class="privacy-text-copy button">'; 1603 1614 $content .= $copy; 1604 1615 $content .= '<span class="screen-reader-text">' . sprintf( __( 'Copy suggested policy text from %s.' ), $plugin_name ) . '</span>'; 1605 1616 $content .= '</button>'; 1606 }1607 1608 $content .= '</div>'; // End of .privacy-text-actions. 1617 $content .= '</div>'; 1618 } 1619 1609 1620 $content .= "</div>\n"; // End of .privacy-text-section. 1610 1621 } 1611 1622 1623 if ( count( $toc ) > 2 ) { 1624 ?> 1625 <div class="privacy-text-box-toc"> 1626 <p><?php _e( 'Table of Contents' ); ?></p> 1627 <ol> 1628 <?php echo implode( "\n", $toc ); ?> 1629 </ol> 1630 </div> 1631 <?php 1632 } 1633 1612 1634 ?> 1613 <div id="privacy-text-box" class="privacy-text-box postbox <?php echo postbox_classes( 'privacy-text-box', 'page' ); ?>"> 1614 <button type="button" class="handlediv" aria-expanded="true"> 1615 <span class="screen-reader-text"><?php _e( 'Toggle panel: Suggested privacy policy text' ); ?></span> 1616 <span class="toggle-indicator" aria-hidden="true"></span> 1617 </button> 1618 <div class="privacy-text-box-head hndle"> 1619 <h2><?php _e( 'This suggested privacy policy text comes from plugins and themes you have installed.' ); ?></h2> 1620 <p> 1621 <?php _e( 'We suggest reviewing this text then copying and pasting it into your privacy policy page.' ); ?> 1622 <?php _e( 'Please remember you are responsible for the policies you choose to adopt, so review the content and make any necessary edits.' ); ?> 1623 </p> 1635 <div class="privacy-text-box"> 1636 <div class="privacy-text-box-head"> 1637 <h2><?php _e( 'Introduction' ); ?></h2> 1638 <p><?php _e( 'Hello,' ); ?></p> 1639 <p><?php _e( 'This text template will help you to create your web site’s privacy policy.' ); ?></p> 1640 <p><?php _e( 'We have suggested the sections you will need. Under each section heading you will find a short summary of what information you should provide, which will help you to get started. Some sections include suggested policy content, others will have to be completed with information from your theme and plugins.' ); ?></p> 1641 <p><?php _e( 'Please edit your privacy policy content, making sure to delete the summaries, and adding any information from your theme and plugins. Once you publish your policy page, remember to add it to your navigation menu.' ); ?></p> 1642 <p><?php _e( 'It is your responsibility to write a comprehensive privacy policy, to make sure it reflects all national and international legal requirements on privacy, and to keep your policy current and accurate.' ); ?></p> 1624 1643 </div> 1625 1644 … … 1639 1658 */ 1640 1659 public static function get_default_content() { 1660 $suggested_text = '<strong class="privacy-policy-tutorial">' . __( 'Suggested text:' ) . ' </strong>'; 1661 1641 1662 // Start of the suggested privacy policy text. 1642 1663 $content = 1643 '<p class="wp-policy-help">' . __( 'Hello,' ) . '</p>' . 1644 '<p class="wp-policy-help">' . __( 'This text template will help you to create your website’s privacy policy.' ) . '</p>' . 1645 '<p class="wp-policy-help">' . __( 'We have suggested the sections you will need. Under each section heading you will find a short summary of what information you should provide, which will help you to get started.' ) . '</p>' . 1646 '<p class="wp-policy-help">' . __( 'Please edit your privacy policy content, making sure to delete the summaries, and adding any information from your themes and plugins. Once you publish your policy page, remember to add it to your navigation menu.' ) . '</p>' . 1647 '<p class="wp-policy-help">' . __( 'It is your responsibility to write a comprehensive privacy policy, to make sure it reflects all national and international legal requirements on privacy, and to keep your policy current and accurate.' ) . '</p>' . 1648 1664 '<div class="wp-suggested-text">' . 1649 1665 '<h2>' . __( 'Who we are' ) . '</h2>' . 1650 '<p class="wp-policy-help">' . __( 'In this section you should note your site URL, as well as the name of the company, organization, or individual behind it, and some accurate contact information.' ) . '</p>' . 1651 '<p class="wp-policy-help">' . __( 'The amount of information you may be required to show will vary depending on your local or national business regulations. You may, for example, be required to display a physical address, a registered address, or your company registration number.' ) . '</p>' . 1666 '<p class="privacy-policy-tutorial">' . __( 'In this section you should note your site URL, as well as the name of the company, organization, or individual behind it, and some accurate contact information.' ) . '</p>' . 1667 '<p class="privacy-policy-tutorial">' . __( 'The amount of information you may be required to show will vary depending on your local or national business regulations. You may, for example, be required to display a physical address, a registered address, or your company registration number.' ) . '</p>' . 1668 1652 1669 /* translators: %s Site URL */ 1653 '<p>' . sprintf( __( 'Our website address is: %s.' ), get_bloginfo( 'url', 'display' ) ) . '</p>' .1670 '<p>' . $suggested_text . sprintf( __( 'Our website address is: %s.' ), get_bloginfo( 'url', 'display' ) ) . '</p>' . 1654 1671 1655 1672 '<h2>' . __( 'What personal data we collect and why we collect it' ) . '</h2>' . 1656 '<p class="wp-policy-help">' . __( 'In this section you should note what personal data you collect from users and site visitors. This may include transactional data, such as purchase information; technical data, such as information about cookies; and personal data, such as user account information.' ) . '</p>' . 1657 '<p class="wp-policy-help">' . __( 'You must also note any collection and retention of sensitive personal data, such as data concerning health.' ) . '</p>' . 1658 '<p class="wp-policy-help">' . __( 'In addition to listing what personal data you collect, you need to note why you collect it. These explanations must note either the legal basis for your data collection and retention or the active consent the user has given.' ) . '</p>' . 1659 '<p class="wp-policy-help">' . __( 'Personal data is not just created by a user’s interactions with your site. Personal data is also generated from technical processes such as contact forms, comments, cookies, analytics, and third party embeds.' ) . '</p>' . 1660 '<p class="wp-policy-help">' . __( 'By default WordPress does not collect any personal data about visitors, and only collects the data shown on the User Profile screen for registered users. However, some of your plugins may also collect personal data, add the relevant information below.' ) . '</p>' . 1661 '<p>' . __( 'If you are a registered user and upload images to the website, you should avoid uploading images with EXIF GPS location data included. Visitors to the website can download and extract any location data from images on the website.' ) . '</p>' . 1673 '<p class="privacy-policy-tutorial">' . __( 'In this section you should note what personal data you collect from users and site visitors. This may include personal data, such as name, email address, personal account preferences; transactional data, such as purchase information; and technical data, such as information about cookies.' ) . '</p>' . 1674 '<p class="privacy-policy-tutorial">' . __( 'You should also note any collection and retention of sensitive personal data, such as data concerning health.' ) . '</p>' . 1675 '<p class="privacy-policy-tutorial">' . __( 'In addition to listing what personal data you collect, you need to note why you collect it. These explanations must note either the legal basis for your data collection and retention or the active consent the user has given.' ) . '</p>' . 1676 '<p class="privacy-policy-tutorial">' . __( 'Personal data is not just created by a user’s interactions with your site. Personal data is also generated from technical processes such as contact forms, comments, cookies, analytics, and third party embeds.' ) . '</p>' . 1677 '<p class="privacy-policy-tutorial">' . __( 'By default WordPress does not collect any personal data about visitors, and only collects the data shown on the User Profile screen from registered users. However some of your plugins may collect personal data. You should add the relevant information below.' ) . '</p>' . 1678 1679 '<h3>' . __( 'Comments' ) . '</h3>' . 1680 '<p class="privacy-policy-tutorial">' . __( 'In this subsection you should note what information is captured through comments. We have noted the data which WordPress collects by default.' ) . '</p>' . 1681 '<p>' . $suggested_text . __( 'When visitors leave comments on the site we collect the data shown in the comments form, and also the visitor’s IP address and browser user agent string to help spam detection.' ) . '</p>' . 1682 '<p>' . __( 'An anonymized string created from your email address (also called a hash) may be provided to the Gravatar service to see if you are using it. The Gravatar service privacy policy is available here: https://automattic.com/privacy/. After approval of your comment, your profile picture is visible to the public in the context of your comment.' ) . '</p>' . 1683 1684 '<h3>' . __( 'Media' ) . '</h3>' . 1685 '<p class="privacy-policy-tutorial">' . __( 'In this subsection you should note what information may be disclosed by users who can upload media files. All uploaded files are usually publicly accessible.' ) . '</p>' . 1686 '<p>' . $suggested_text . __( 'If you upload images to the website, you should avoid uploading images with embedded location data (EXIF GPS) included. Visitors to the website can download and extract any location data from images on the website.' ) . '</p>' . 1662 1687 1663 1688 '<h3>' . __( 'Contact forms' ) . '</h3>' . 1664 '<p class="wp-policy-help">' . __( 'By default, WordPress does not include a contact form. If you use a contact form plugin, use this subsection to note what personal data is captured when someone submits a contact form, and how long you keep it. For example, you may note that you keep contact form submissions for a certain period for customer service purposes, but you do not use the information submitted through them for marketing purposes.' ) . '</p>' . 1665 1666 '<h3>' . __( 'Comments' ) . '</h3>' . 1667 '<p class="wp-policy-help">' . __( 'In this subsection you should note what information is captured through comments.' ) . '</p>' . 1668 '<p>' . __( 'When visitors leave comments on the website we collect the data shown in the comments form, and also the visitor’s IP address and browser user agent string to help spam detection.' ) . '</p>' . 1669 '<p>' . __( 'An anonymized string created from your email address (also called a hash) may be provided to the Gravatar service to see if you are using it. The Gravatar service privacy policy is available here: https://automattic.com/privacy/. After approval of your comment, your profile picture is visible to the public in the context of your comment.' ) . '</p>' . 1689 '<p class="privacy-policy-tutorial">' . __( 'By default, WordPress does not include a contact form. If you use a contact form plugin, use this subsection to note what personal data is captured when someone submits a contact form, and how long you keep it. For example, you may note that you keep contact form submissions for a certain period for customer service purposes, but you do not use the information submitted through them for marketing purposes.' ) . '</p>' . 1670 1690 1671 1691 '<h3>' . __( 'Cookies' ) . '</h3>' . 1672 '<p class=" wp-policy-help">' . __( 'In this subsection you should list the cookies your website uses, including those set by your plugins, social media, and analytics. We have provided the cookies which WordPress installs by default.' ) . '</p>' .1673 '<p>' . __( 'If you leave a comment on our site you may opt in to saving your name, email address,and website in cookies. These are for your convenience so that you do not have to fill in your details again when you leave another comment. These cookies will last for one year.' ) . '</p>' .1692 '<p class="privacy-policy-tutorial">' . __( 'In this subsection you should list the cookies your web site uses, including those set by your plugins, social media, and analytics. We have provided the cookies which WordPress installs by default.' ) . '</p>' . 1693 '<p>' . $suggested_text . __( 'If you leave a comment on our site you may opt-in to saving your name, email address and website in cookies. These are for your convenience so that you do not have to fill in your details again when you leave another comment. These cookies will last for one year.' ) . '</p>' . 1674 1694 '<p>' . __( 'If you have an account and you log in to this site, we will set a temporary cookie to determine if your browser accepts cookies. This cookie contains no personal data and is discarded when you close your browser.' ) . '</p>' . 1675 1695 '<p>' . __( 'When you log in, we will also set up several cookies to save your login information and your screen display choices. Login cookies last for two days, and screen options cookies last for a year. If you select "Remember Me", your login will persist for two weeks. If you log out of your account, the login cookies will be removed.' ) . '</p>' . … … 1677 1697 1678 1698 '<h3>' . __( 'Embedded content from other websites' ) . '</h3>' . 1679 '<p>' . __( 'Articles on this site may include embedded content (e.g. videos, images, articles, etc.). Embedded content from other websites behaves in the exact same way as if the visitor has visited the other website.' ) . '</p>' .1680 '<p>' . __( 'These websites may collect data about you, use cookies, embed additional third-party tracking, and monitor your interaction with that embedded content, including trac king your interaction with the embedded content if you have an account and are logged in to that website.' ) . '</p>' .1699 '<p>' . $suggested_text . __( 'Articles on this site may include embedded content (e.g. videos, images, articles, etc.). Embedded content from other websites behaves in the exact same way as if the visitor has visited the other website.' ) . '</p>' . 1700 '<p>' . __( 'These websites may collect data about you, use cookies, embed additional third-party tracking, and monitor your interaction with that embedded content, including tracing your interaction with the embedded content if you have an account and are logged in to that website.' ) . '</p>' . 1681 1701 1682 1702 '<h3>' . __( 'Analytics' ) . '</h3>' . 1683 '<p class=" wp-policy-help">' . __( 'In this subsection you should note what analytics package you use, how users can opt out of analytics tracking, and a link to information on how your analytics provider conforms to European data protection law.' ) . '</p>' .1684 '<p class=" wp-policy-help">' . __( 'By default WordPress does not collect any analytics data. However, many web hosting accounts collect some anonymous analytics data. You may also have installed a WordPress plugin that provides analytics services. In that case, add information from that plugin here.' ) . '</p>' .1703 '<p class="privacy-policy-tutorial">' . __( 'In this subsection you should note what analytics package you use, how users can opt out of analytics tracking, and a link to your analytics provider’s privacy policy, if any.' ) . '</p>' . 1704 '<p class="privacy-policy-tutorial">' . __( 'By default WordPress does not collect any analytics data. However, many web hosting accounts collect some anonymous analytics data. You may also have installed a WordPress plugin that provides analytics services. In that case, add information from that plugin here.' ) . '</p>' . 1685 1705 1686 1706 '<h2>' . __( 'Who we share your data with' ) . '</h2>' . 1687 '<p class=" wp-policy-help">' . __( 'In this section you should name and list all third party providers with whom you share site data, including partners, cloud-based services, payment processors, and third party service providers, and note what data you share with them and why. Link to their own privacy notices if possible.' ) . '</p>' .1688 '<p class=" wp-policy-help">' . __( 'By default, WordPress does not share any personal data with anybody.' ) . '</p>' .1707 '<p class="privacy-policy-tutorial">' . __( 'In this section you should name and list all third party providers with whom you share site data, including partners, cloud-based services, payment processors, and third party service providers, and note what data you share with them and why. Link to their own privacy policies if possible.' ) . '</p>' . 1708 '<p class="privacy-policy-tutorial">' . __( 'By default WordPress does not share any personal data with anyone.' ) . '</p>' . 1689 1709 1690 1710 '<h2>' . __( 'How long we retain your data' ) . '</h2>' . 1691 '<p class=" wp-policy-help">' . __( 'In this section you should explain how long you retain personal data collected or processed by the website. While it is your responsibility to come up with the schedule of how long you keep each dataset for and why you keep it, that information does need to be listed here. For example, you may want to say that you keep contact form entries for six months, analytics records for a year, and customer purchase records for ten years.' ) . '</p>' .1692 '<p>' . __( 'If you leave a comment, the comment and its metadata are retained indefinitely. This is so we can recognize and approve any follow-up comments automatically instead of holding them in a moderation queue.' ) . '</p>' .1711 '<p class="privacy-policy-tutorial">' . __( 'In this section you should explain how long you retain personal data collected or processed by the web site. While it is your responsibility to come up with the schedule of how long you keep each dataset for and why you keep it, that information does need to be listed here. For example, you may want to say that you keep contact form entries for six months, analytics records for a year, and customer purchase records for ten years.' ) . '</p>' . 1712 '<p>' . $suggested_text . __( 'If you leave a comment, the comment and its metadata are retained indefinitely. This is so we can recognize and approve any follow-up comments automatically instead of holding them in a moderation queue.' ) . '</p>' . 1693 1713 '<p>' . __( 'For users that register on our website (if any), we also store the personal information they provide in their user profile. All users can see, edit, or delete their personal information at any time (except they cannot change their username). Website administrators can also see and edit that information.' ) . '</p>' . 1694 1714 1695 1715 '<h2>' . __( 'What rights you have over your data' ) . '</h2>' . 1696 '<p class=" wp-policy-help">' . __( 'In this section you should explain what rights your users have over their data and how they can invoke those rights.' ) . '</p>' .1697 '<p>' . __( 'If you have an account or have left comments on this website, you can request to receive an export file of the personal data we hold about you, including any data you have provided to us. You can also request that we delete any personal data we hold about you. This does not include any data we are obliged to keep for administrative, legal, or security purposes.' ) . '</p>' .1716 '<p class="privacy-policy-tutorial">' . __( 'In this section you should explain what rights your users have over their data and how they can invoke those rights.' ) . '</p>' . 1717 '<p>' . $suggested_text . __( 'If you have an account on this site, or have left comments, you can request to receive an exported file of the personal data we hold about you, including any data you have provided to us. You can also request that we erase any personal data we hold about you. This does not include any data we are obliged to keep for administrative, legal, or security purposes.' ) . '</p>' . 1698 1718 1699 1719 '<h2>' . __( 'Where we send your data' ) . '</h2>' . 1700 '<p class=" wp-policy-help">' . __( 'In this section you should list all transfers of your site data outside the European Union and describe the means by which that data is safeguarded to European data protection standards. This could include your web hosting, cloud storage, or other third party services.' ) . '</p>' .1701 '<p class=" wp-policy-help">' . __( 'European data protection law requires that data about European residents which is transferred outside the European Union to be safeguarded to the same standards as if the data was in Europe. So in addition to listing where data goes, you should describe how you ensure that these standards are met either by yourself or by your third-party providers, whether that is through an agreement such as Privacy Shield, model clauses in your contracts, or binding corporate rules.' ) . '</p>' .1702 '<p>' . __( 'Visitor comments may be checked through an automated spam detection service. This may be located abroad.' ) . '</p>' .1720 '<p class="privacy-policy-tutorial">' . __( 'In this section you should list all transfers of your site data outside the European Union and describe the means by which that data is safeguarded to European data protection standards. This could include your web hosting, cloud storage, or other third party services.' ) . '</p>' . 1721 '<p class="privacy-policy-tutorial">' . __( 'European data protection law requires data about European residents which is transferred outside the European Union to be safeguarded to the same standards as if the data was in Europe. So in addition to listing where data goes, you should describe how you ensure that these standards are met either by yourself or by your third party providers, whether that is through an agreement such as Privacy Shield, model clauses in your contracts, or binding corporate rules.' ) . '</p>' . 1722 '<p>' . $suggested_text . __( 'Visitor comments may be checked through an automated spam detection service.' ) . '</p>' . 1703 1723 1704 1724 '<h2>' . __( 'Your contact information' ) . '</h2>' . 1705 '<p class=" wp-policy-help">' . __( 'In this section you should provide a contact method for privacy-specific concerns. If you are required to have a Data Protection Officer, list their name and full contact details here as well.' ) . '</p>' .1725 '<p class="privacy-policy-tutorial">' . __( 'In this section you should provide a contact method for privacy-specific concerns. If you are required to have a Data Protection Officer, list their name and full contact details here as well.' ) . '</p>' . 1706 1726 1707 1727 '<h2>' . __( 'Additional information' ) . '</h2>' . 1708 '<p class=" wp-policy-help">' . __( 'If you use your website for commercial purposes and you engage in more complex collection or processing of personal data, you should note the following information in your privacy noticein addition to the information we have already discussed.' ) . '</p>' .1728 '<p class="privacy-policy-tutorial">' . __( 'If you use your site for commercial purposes and you engage in more complex collection or processing of personal data, you should note the following information in your privacy policy in addition to the information we have already discussed.' ) . '</p>' . 1709 1729 1710 1730 '<h3>' . __( 'How we protect your data' ) . '</h3>' . 1711 '<p class=" wp-policy-help">' . __( 'In this section you should explain what measures you have taken to protect your users’ data. This could include technical measures such as encryption; security measures such as 2FA; and humanmeasures such as staff training in data protection. If you have carried out a Privacy Impact Assessment, you can mention it here too.' ) . '</p>' .1731 '<p class="privacy-policy-tutorial">' . __( 'In this section you should explain what measures you have taken to protect your users’ data. This could include technical measures such as encryption; security measures such as two factor authentication; and measures such as staff training in data protection. If you have carried out a Privacy Impact Assessment, you can mention it here too.' ) . '</p>' . 1712 1732 1713 1733 '<h3>' . __( 'What data breach procedures we have in place' ) . '</h3>' . 1714 '<p class=" wp-policy-help">' . __( 'In this section you should explain what procedures you have in place to deal with data breaches, either potential or real, such as internal reporting systems, contact mechanisms, or bug bounties.' ) . '</p>' .1734 '<p class="privacy-policy-tutorial">' . __( 'In this section you should explain what procedures you have in place to deal with data breaches, either potential or real, such as internal reporting systems, contact mechanisms, or bug bounties.' ) . '</p>' . 1715 1735 1716 1736 '<h3>' . __( 'What third parties we receive data from' ) . '</h3>' . 1717 '<p class=" wp-policy-help">' . __( 'If your website receives data about users from third parties, including advertisers, this information must be included within the section of your privacy noticedealing with third party data.' ) . '</p>' .1737 '<p class="privacy-policy-tutorial">' . __( 'If your web site receives data about users from third parties, including advertisers, this information must be included within the section of your privacy policy dealing with third party data.' ) . '</p>' . 1718 1738 1719 1739 '<h3>' . __( 'What automated decision making and/or profiling we do with user data' ) . '</h3>' . 1720 '<p class=" wp-policy-help">' . __( 'If your website provides a service which includes automated decision making - for example, allowing customers to apply for credit, or aggregating their data into an advertising profile - you must note that this is taking place, and include information about how that information is used, what decisions are made with that aggregated data, and what rights users have over decisions made without human intervention.' ) . '</p>' .1740 '<p class="privacy-policy-tutorial">' . __( 'If your web site provides a service which includes automated decision making - for example, allowing customers to apply for credit, or aggregating their data into an advertising profile - you must note that this is taking place, and include information about how that information is used, what decisions are made with that aggregated data, and what rights users have over decisions made without human intervention.' ) . '</p>' . 1721 1741 1722 1742 '<h3>' . __( 'Industry regulatory disclosure requirements' ) . '</h3>' . 1723 '<p class="wp-policy-help">' . __( 'If you are a member of a regulated industry, or if you are subject to additional privacy laws, you may be required to disclose that information here.' ) . '</p>'; 1724 // End of the suggested policy text. 1743 '<p class="privacy-policy-tutorial">' . __( 'If you are a member of a regulated industry, or if you are subject to additional privacy laws, you may be required to disclose that information here.' ) . '</p>' . 1744 '</div>'; 1745 // End of the suggested privacy policy text. 1725 1746 1726 1747 /** -
trunk/src/wp-admin/js/post.js
r42992 r43184 1270 1270 1271 1271 } )( jQuery, new wp.utils.WordCounter() ); 1272 1273 ( function( $ ) {1274 // Privacy policy postbox, copy button.1275 $( document ).on( 'click', function( event ) {1276 var $target = $( event.target );1277 var node, range;1278 1279 if ( $target.is( 'button.privacy-text-copy' ) ) {1280 node = $target.parent().parent().find( 'div.policy-text' )[0];1281 1282 if ( node ) {1283 try {1284 window.getSelection().removeAllRanges();1285 range = document.createRange();1286 range.selectNodeContents( node );1287 window.getSelection().addRange( range );1288 1289 document.execCommand( 'copy' );1290 window.getSelection().removeAllRanges();1291 } catch ( er ) {}1292 }1293 } else if ( $target.is( 'button.policy-text-more' ) ) {1294 $target.parents( '.privacy-text-section' ).removeClass( 'folded' )1295 .find( '.policy-text' ).attr( 'aria-expanded', 'true' );1296 } else if ( $target.is( 'button.policy-text-less' ) ) {1297 $target.parents( '.privacy-text-section' ).addClass( 'folded' )1298 .find( '.policy-text' ).attr( 'aria-expanded', 'false' );1299 }1300 });1301 1302 } )( jQuery ); -
trunk/src/wp-admin/js/xfn.js
r43139 r43184 222 222 } ); 223 223 } ); 224 225 ( function( $ ) { 226 // Privacy policy page, copy button. 227 $( document ).on( 'click', function( event ) { 228 var $target = $( event.target ); 229 var $parent, $container, range; 230 231 if ( $target.is( 'button.privacy-text-copy' ) ) { 232 $parent = $target.parent().parent(); 233 $container = $parent.find( 'div.wp-suggested-text' ); 234 235 if ( ! $container.length ) { 236 $container = $parent.find( 'div.policy-text' ); 237 } 238 239 if ( $container.length ) { 240 try { 241 window.getSelection().removeAllRanges(); 242 range = document.createRange(); 243 $container.addClass( 'hide-privacy-policy-tutorial' ); 244 245 range.selectNodeContents( $container[0] ); 246 window.getSelection().addRange( range ); 247 document.execCommand( 'copy' ); 248 249 $container.removeClass( 'hide-privacy-policy-tutorial' ); 250 window.getSelection().removeAllRanges(); 251 } catch ( er ) {} 252 } 253 } 254 }); 255 256 } )( jQuery ); -
trunk/src/wp-admin/privacy.php
r43160 r43184 14 14 } 15 15 16 if ( ! class_exists( 'WP_Privacy_Policy_Content' ) ) { 17 require_once( ABSPATH . 'wp-admin/includes/misc.php' ); 18 } 19 16 20 // "Borrow" xfn.js for now so we don't have to create new files. 17 //wp_enqueue_script( 'xfn' );21 wp_enqueue_script( 'xfn' ); 18 22 19 23 $action = isset( $_POST['action'] ) ? $_POST['action'] : ''; … … 37 41 ); 38 42 } elseif ( 'create-privacy-page' === $action ) { 39 if ( ! class_exists( 'WP_Privacy_Policy_Content' ) ) {40 require_once( ABSPATH . 'wp-admin/includes/misc.php' );41 }42 43 43 44 $privacy_policy_page_content = WP_Privacy_Policy_Content::get_default_content(); … … 116 117 ?> 117 118 <div class="wrap"> 119 <?php 120 121 if ( isset( $_GET['wp-suggested-policy-content'] ) ) { 122 123 ?> 124 <h1><?php _e( 'Privacy Policy Guide' ); ?></h1> 125 <div class="wp-suggested-policy-content"> 126 <?php WP_Privacy_Policy_Content::privacy_policy_guide(); ?> 127 </div> 128 <?php 129 130 } else { 131 132 ?> 118 133 <h1><?php _e( 'Privacy Settings' ); ?></h1> 119 134 <h2><?php _e( 'Privacy Policy page' ); ?></h2> … … 206 221 </div> 207 222 <?php 223 } // End if/else isset( $_GET['wp-suggested-policy-content'] ). 208 224 209 225 include( ABSPATH . 'wp-admin/admin-footer.php' );
Note: See TracChangeset
for help on using the changeset viewer.