Make WordPress Core

Ticket #43473: 43473.1.patch

File 43473.1.patch, 16.3 KB (added by azaozz, 7 years ago)
  • src/wp-admin/css/edit.css

     
    749749        display: inline;
    750750}
    751751
     752#privacy-text-box .policy-text h2 {
     753        margin: 1.2em 0 1em;
     754        padding: 0;
     755}
    752756
     757p.wp-policy-help {
     758        font-size: 0.85em;
     759        color: #555;
     760        font-style: italic;
     761        font-weight: 600;
     762}
     763
    753764/*------------------------------------------------------------------------------
    754765  11.1 - Custom Fields
    755766------------------------------------------------------------------------------*/
  • src/wp-admin/includes/misc.php

     
    16351635         * @return string The defauld policy content.
    16361636         */
    16371637        public static function get_default_content() {
    1638                 $content  = '<p>' . __( 'Lorem ipsum dolor sit amet consectetuer id elit enim neque est. Sodales tincidunt Nulla leo penatibus Vestibulum adipiscing est cursus Nam Vestibulum. Orci Vivamus mollis eget pretium dictumst Donec Integer auctor sociis rutrum. Mauris felis Donec neque cursus tellus odio adipiscing netus elit Donec. Vestibulum Cras ligula vitae pretium Curabitur eros Nam Lorem eros non. Sed id mauris justo tristique orci neque eleifend lacus lorem.' ) . "</p>\n";
    1639                 $content .= '<p>' . __( 'Sed consequat Nullam et vel platea semper id mauris Nam eget. Sem neque a amet eu ipsum id dignissim neque eu pulvinar. Mauris nulla egestas et laoreet penatibus ipsum lobortis convallis congue libero. Tortor nibh pellentesque tellus odio Morbi cursus eros tincidunt tincidunt sociis. Egestas at In Donec mi dignissim Nam rutrum felis metus Maecenas. Sed tellus consectetuer.' ) . "</p>\n";
    1640                 $content .= '<p>' . __( 'Justo orci pulvinar mauris tincidunt sed Pellentesque dis sapien tempor ligula. Dolor laoreet fames eros accumsan Integer feugiat nec augue Phasellus rutrum. Id Sed facilisi elit mus nulla at dapibus ut enim sociis. Fringilla ridiculus dui justo eu Maecenas ipsum ut aliquet magna non. Id magna adipiscing Vestibulum Curabitur vel pretium ac justo platea neque. Maecenas Donec Quisque urna interdum.' ) . "</p>\n";
    1641                 $content .= '<p>' . __( 'Tellus sagittis leo adipiscing ante facilisis Aliquam tellus at at elit. Ut dignissim tempus eu Fusce Vestibulum at eros ante dis tempus. Sed libero orci at id ut pretium metus adipiscing justo malesuada. In tempus vitae commodo libero In neque sagittis turpis In In. Eleifend elit dis ac eros urna auctor semper quis odio pretium. Ut Aenean cursus.' ) . "</p>\n";
     1638                // Start of the suggested privacy policy text.
     1639                $content = '<div contenteditable="false">' .
    16421640
     1641                        '<p class="wp-policy-help">' . __( 'Hello,' ) . '</p>' .
     1642
     1643                        '<p class="wp-policy-help">' . __( 'This is a template with the suggested text for your privacy policy. We have added the sections you will need, and have included a short description under eash section heading (in italics) to help you get started.' ) . '</p>' .
     1644
     1645                        '<p class="wp-policy-help">' . __( 'Please edit the content, and follow the instructions in the descriptions. Then delete the descriptions (the italics text), add any content from your plugins to the matching sections, publish your policy page, and add it to your menu.' ) . '</p>' .
     1646
     1647                        '<p class="wp-policy-help">' . __( 'If you are a company that collects more personal data from users, consider asking for a legal advice about your completed policy.' ) . '</p>' .
     1648
     1649                        '<hr>' .
     1650                        '</div>' .
     1651
     1652                        '<h2>' . __( 'Who we are' ) . '</h2>' .
     1653                        '<div contenteditable="false">' .
     1654                        '<p class="wp-policy-help">' . __( 'In this section you should note your site URL, as well as the name of the company, organisation, or individual behind it, and some accurate contact information.' ) . '</p>' .
     1655
     1656                        '<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>' .
     1657                        '</div>' .
     1658
     1659                        '<p>' . __( 'Our website address is: $1%s.' ) . '</p>' .
     1660
     1661
     1662                        '<h2>' . __( 'What personal data we collect and why we collect it' ) . '</h2>' .
     1663                        '<div contenteditable="false">' .
     1664                        '<p class="wp-policy-help">' . __( 'In this section you should include transactional data, such as purchase information; technical data, such as information about cookies; and personal data, such as user account information.' ) . '</p>' .
     1665
     1666                        '<p class="wp-policy-help">' . __( 'You must also note any collection and retention of sensitive personal data.' ) . '</p>' .
     1667
     1668                        '<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>' .
     1669
     1670                        '<p class="wp-policy-help">' . __( 'Personal data is not just created by a user&#8217;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>' .
     1671                        '</div>' .
     1672
     1673
     1674                        '<h3>' . __( 'Contact forms' ) . '</h3>' .
     1675                        '<div contenteditable="false">' .
     1676                        '<p class="wp-policy-help">' . __( 'In this subsection you should note what personal data is captured when someone submits a contact form and how long you keep it for. For example, you may note that you keep contact form submissions for a certain period of time for customer service purposes, but you do not use the information submitted through them for marketing purposes.' ) . '</p>' .
     1677
     1678                        '<p class="wp-policy-help">' . __( '(Add information from your contact form plugin here, if any.)' ) . '</p>' .
     1679                        '</div>' .
     1680
     1681
     1682                        '<h3>' . __( 'Comments' ) . '</h3>' .
     1683                        '<p>' . __( 'When visitors leave comments on the site we collect the data shown in the comments form, and also the visitor&#8217;s IP address and browser user agent string to help spam detection.' ) . '</p>' .
     1684
     1685
     1686                        '<h3>' . __( 'Cookies' ) . '</h3>' .
     1687                        '<div contenteditable="false">' .
     1688                        '<p class="wp-policy-help">' . __( '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>' .
     1689                        '</div>' .
     1690
     1691                        '<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 convenience cookies allowing us to recognise you as a commenter and pre-fill the comments form. They will persist for one year.' ) . '</p>' .
     1692
     1693                        '<p>' . __( 'If you attempt to log in to our site, we will set a temporary cookie to determine if your browser accepts cookies at all. This cookie contains no personal data and is discarded when you close your browser.' ) . '</p>' .
     1694
     1695                        '<p>' . __( 'If you have an account and you log in to this site, we will set up several cookies to save your log in information and some of your screen options. The logged-in cookies last for two days, and the screen options cookies last for a year.' ) . '</p>' .
     1696
     1697                        '<p>' . __( 'If you select &quot;Remember Me&quot; these cookies will persist for two weeks. If you log out of your account, the log in cookies will be removed. It is important that you log out if you are using a public computer.' ) . '</p>' .
     1698
     1699                        '<p>' . __( 'If you edit or publish an article, an additional cookie will be saved in your browser. This cookie includes no personal data and simply indicates the post ID of the article you just edited. It expires after 1 day.' ) . '</p>' .
     1700
     1701
     1702                        '<h3>' . __( 'Embedded content from other websites' ) . '</h3>' .
     1703                        '<p>' . __( 'Embeds are pieces from other websites that are shown on our website. They behave in the exact same way as if the visitor has visited the other website and may use cookies or capture information.' ) . '</p>' .
     1704
     1705                        '<p>' . __( 'Typically embedded content is from websites that share videos, images, or other content.' ) . '</p>' .
     1706
     1707
     1708                        '<h3>' . __( 'Analytics' ) . '</h3>' .
     1709                        '<div contenteditable="false">' .
     1710                        '<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>' .
     1711
     1712                        '<p class="wp-policy-help">' . __( '(Add information from your analytics plugin here, if any.)' ) . '</p>' .
     1713                        '</div>' .
     1714
     1715
     1716                        '<h2>' . __( 'Who we share your data with' ) . '</h2>' .
     1717                        '<div contenteditable="false">' .
     1718                        '<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, SAAS, 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>' .
     1719                        '<p class="wp-policy-help">' . __( 'By default WordPress does not share any personal data with anubody.' ) . '</p>' .
     1720                        '</div>' .
     1721
     1722
     1723                        '<h2>' . __( 'How long we retain your data' ) . '</h2>' .
     1724                        '<div contenteditable="false">' .
     1725                        '<p class="wp-policy-help">' . __( '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>' .
     1726                        '</div>' .
     1727
     1728                        '<p>' . __( 'For visitors that leave comments: indefinitely. This is so we can recognize and approve any follow-up comments automatically instead of holding them in a moderation queue.' ) . '</p>' .
     1729
     1730                        '<p>' . __( 'For users that register on our website (if any), we also store the data they provide in their profile. All registered users can see, edit or delete their data at any time except they cannot change their username.' ) . '</p>' .
     1731
     1732
     1733                        '<h2>' . __( 'What rights you have over your data' ) . '</h2>' .
     1734                        '<p>' . __( 'If you are a registered user or have left comments on our site you can request to see or download the data we have about you.' ) . '</p>' .
     1735
     1736                        '<p>' . __( 'Typically for visitors that have left comments the data will be their email address, any IP addresses assigned to them at the time of leaving the comments and the user agent strings of the browsers they used. The rest of the data is public as published by the visitors.' ) . '</p>' .
     1737
     1738                        '<p>' . __( 'You can also request &quot;to be forgotten&quot; and we will erase any personally identifiable data we have about you, typically a year after it was published. Of course this excludes data we need for administrative or security purposes or if we are required by law to retain some of the data.' ) . '</p>' .
     1739
     1740
     1741                        '<h2>' . __( 'Where we send your data' ) . '</h2>' .
     1742                        '<div contenteditable="false">' .
     1743                        '<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, SAAS accounts, or other third party services.' ) . '</p>' .
     1744
     1745                        '<p class="wp-policy-help">' . __( '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>' .
     1746                        '</div>' .
     1747
     1748                        '<p>' . __( 'For visitors that leave comments we may send the data to a spam detection service.' ) . '</p>' .
     1749
     1750
     1751                        '<h2>' . __( 'Your contact information' ) . '</h2>' .
     1752                        '<div contenteditable="false">' .
     1753                        '<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>' .
     1754                        '</div>' .
     1755
     1756
     1757                        '<h2>' . __( 'Additional information' ) . '</h2>' .
     1758                        '<div contenteditable="false">' .
     1759                        '<p class="wp-policy-help">' . __( 'If this is your business website and your business engages in more complex collection or processing of personal data, you should note the following information in your privacy notice in addition to the information we have already discussed.' ) . '</p>' .
     1760                        '</div>' .
     1761
     1762
     1763                        '<h3>' . __( 'How we protect your data' ) . '</h3>' .
     1764                        '<div contenteditable="false">' .
     1765                        '<p class="wp-policy-help">' . __( 'In this section you should explain what measures you have taken to protect your users&#8217; data. This could include technical measures such as encryption; security measures such as 2FA; and human measures such as staff training in data protection. If you have carried out a Privacy Impact Assessment, you can mention it here too.' ) . '</p>' .
     1766                        '</div>' .
     1767
     1768
     1769                        '<h3>' . __( 'What data breach procedures we have in place' ) . '</h3>' .
     1770                        '<div contenteditable="false">' .
     1771                        '<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>' .
     1772                        '</div>' .
     1773
     1774
     1775                        '<h3>' . __( 'What third parties we receive data from' ) . '</h3>' .
     1776                        '<div contenteditable="false">' .
     1777                        '<p class="wp-policy-help">' . __( 'If your web site receives data about users from third parties, including advertisers, this information must be included within the section of your privacy notice dealing with third party data.' ) . '</p>' .
     1778                        '</div>' .
     1779
     1780
     1781                        '<h3>' . __( 'What automated decision making and/or profiling we do with user data' ) . '</h3>' .
     1782                        '<div contenteditable="false">' .
     1783                        '<p class="wp-policy-help">' . __( '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>' .
     1784                        '</div>' .
     1785
     1786                        '<h3>' . __( 'Industry regulatory disclosure requirements' ) . '</h3>';
     1787
     1788                // End of the suggested policy text.
     1789
     1790                $content = str_replace( '$1%s', get_bloginfo( 'url', 'display' ), $content );
     1791
    16431792                /**
    16441793                 * Filters the default content suggested for inclusion in a privacy policy.
    16451794                 *
  • src/wp-admin/privacy.php

     
    3636                        'updated'
    3737                );
    3838        } 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                $privacy_policy_page_content = WP_Privacy_Policy_Content::get_default_content();
    3944                $privacy_policy_page_id = wp_insert_post(
    4045                        array(
    41                                 'post_title'  => __( 'Privacy Policy' ),
    42                                 'post_status' => 'draft',
    43                                 'post_type'   => 'page',
     46                                'post_title'   => __( 'Privacy Policy' ),
     47                                'post_status'  => 'draft',
     48                                'post_type'    => 'page',
     49                                'post_content' => $privacy_policy_page_content,
    4450                        ),
    4551                        true
    4652                );
  • src/wp-includes/js/tinymce/skins/wordpress/wp-content.css

     
    265265        z-index: -1;
    266266}
    267267
     268/* Special styling for the suggestes policy text tutorial sections after they have been pasted in the editor. */
     269p.wp-policy-help {
     270        font-size: 0.85em;
     271        font-style: italic;
     272        font-weight: 600;
     273}
     274
    268275/**
    269276 * WP Views
    270277 */