Make WordPress Core

Ticket #43473: 43473.patch

File 43473.patch, 12.2 KB (added by azaozz, 6 years ago)
  • src/wp-admin/css/edit.css

    749749        display: inline;
     752#privacy-text-box .policy-text h2 {
     753        margin: 1.2em 0 1em;
     754        padding: 0;
    754758  11.1 - Custom Fields
  • 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";
     1639                $content = __(
     1640'<h2>Who we are</h2>
     1642<em>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.</em>
     1644<em>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.</em>
     1646Our website address is: $1%s.
     1649<h2>What personal data we collect and why we collect it</h2>
     1651<em>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.</em>
     1653<em>You must also note any collection and retention of sensitive personal data.</em>
     1655<em>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.</em>
     1657<em>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.</em>
     1660<h3>Contact forms</h3>
     1662<em>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.</em>
     1664<em>(Add information from your contact form plugin here, if any.)</em>
     1669When 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.
     1674<em>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.</em>
     1676If 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.
     1678If 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.
     1680If 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.
     1682If 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.
     1684If 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.
     1687<h3>Embedded content from other websites</h3>
     1689Embeds 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.
     1691Typically embedded content is from websites that share videos, images, or other content.
     1696<em>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.</em>
     1698<em>(Add information from your analytics plugin here, if any.)</em>
     1701<h2>Who we share your data with</h2>
     1703<em>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.</em>
     1706<h2>How long we retain your data</h2>
     1708<em>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.</em>
     1710For 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.
     1712For 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.
     1715<h2>What rights you have over your data</h2>
     1717If 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.
     1719Typically 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.
     1721You 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.
     1724<h2>Where we send your data</h2>
     1726<em>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.</em>
     1728<em>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.</em>
     1730For visitors that leave comments we may send the data to a spam detection service.
     1733<h2>Your contact information</h2>
     1735<em>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.</em>
     1738<h2>Additional information</h2>
     1740<em>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.</em>
     1742<h3>How we protect your data</h3>
     1744<em>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.</em>
     1747<h3>What data breach procedures we have in place</h3>
     1749<em>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.</em>
     1752<h3>What third parties we receive data from</h3>
     1754<em>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.</em>
     1757<h3>What automated decision making and/or profiling we do with user data</h3>
     1759<em>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.</em>
     1762<h3>Industry regulatory disclosure requirements</h3>'
     1765                $content = str_replace( '$1%s', get_bloginfo( 'url', 'display' ), $content );
     1766                $content = str_replace( '<em>', '<em style="font-size:0.9em;color:#545;">', $content );
     1767                $content = wpautop( $content );
    16431769                /**
    16441770                 * Filters the default content suggested for inclusion in a privacy policy.
    16451771                 *
  • 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                }
     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                );