WordPress.org

Make WordPress Core

Ticket #43473: 43473_split_all_texts.diff

File 43473_split_all_texts.diff, 19.9 KB (added by xkon, 3 years ago)
  • src/wp-admin/css/edit.css

     
    691691        border-left: 4px solid transparent;
    692692}
    693693
     694.privacy-text-section h2 {
     695        padding-left: 0px !important;
     696}
     697
    694698.privacy-text-section.text-updated {
    695699        border-left-color: #46b450;
    696700        background-color: #ecf7ed;
  • src/wp-admin/includes/admin-filters.php

     
    142142// Show a "postbox" with the text suggestions for a privacy policy.
    143143add_action( 'edit_form_after_title', array( 'WP_Privacy_Policy_Content', 'privacy_policy_postbox' ) );
    144144
    145 // Add the suggested policy text from WordPress.
    146 add_action( 'admin_init', array( 'WP_Privacy_Policy_Content', 'add_suggested_content' ), 15 );
     145// Add the suggested policy text from WordPress in the policy metabox.
     146add_action( 'admin_init', array( 'WP_Privacy_Policy_Content', 'add_suggested_metabox_content' ), 15 );
    147147
    148148// Stop checking for text changes after the policy page is updated.
    149149add_action( 'post_updated', array( 'WP_Privacy_Policy_Content', '_policy_page_updated' ) );
  • src/wp-admin/includes/misc.php

     
    16281628        }
    16291629
    16301630        /**
    1631          * Return the default suggested privacy policy content.
     1631         * Return the default suggested privacy policy page content.
    16321632         *
    16331633         * @since 4.9.6
    16341634         *
    1635          * @return string The defauld policy content.
     1635         * @return string The defauld policy page content.
    16361636         */
    1637         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";
     1637        public static function get_default_page_content() {
    16421638
     1639                $content  = '<h2>' . __( 'Who we are' ) . '</h2>';
     1640                $content .= '<h2>' . __( 'What personal data we collect and why we collect it' ) . '</h2>';
     1641                $content .= '<h3>' . __( 'Contact forms' ) . '</h3>';
     1642                $content .= '<h3>' . __( 'Comments' ) . '</h3>';
     1643                $content .= '<h3>' . __( 'Cookies' ) . '</h3>';
     1644                $content .= '<h3>' . __( 'Embedded content from other websites' ) . '</h3>';
     1645                $content .= '<h3>' . __( 'Analytics' ) . '</h3>';
     1646                $content .= '<h2>' . __( 'Who we share your data with' ) . '</h2>';
     1647                $content .= '<h2>' . __( 'How long we retain your data' ) . '</h2>';
     1648                $content .= '<h2>' . __( 'What rights you have over your data' ) . '</h2>';
     1649                $content .= '<h2>' . __( 'Where we send your data' ) . '</h2>';
     1650                $content .= '<h2>' . __( 'Your contact information' ) . '</h2>';
     1651                $content .= '<h2>' . __( 'How we protect your data' ) . '</h2>';
     1652                $content .= '<h2>' . __( 'What data breach procedures we have in place' ) . '</h2>';
     1653                $content .= '<h2>' . __( 'What third parties we receive data from' ) . '</h2>';
     1654                $content .= '<h2>' . __( 'What automated decision making and/or profiling we do with user data' ) . '</h2>';
     1655                $content .= '<h2>' . __( 'Industry regulatory disclosure requirements' ) . '</h2>';
     1656
    16431657                /**
    16441658                 * Filters the default content suggested for inclusion in a privacy policy.
    16451659                 *
     
    16471661                 *
    16481662                 * @param $content string The defauld policy content.
    16491663                 */
    1650                 return apply_filters( 'wp_get_default_privacy_policy_content', $content );
     1664                return apply_filters( 'wp_get_default_privacy_policy_page_content', $content );
    16511665        }
    16521666
    16531667        /**
     1668         * Return the WordPress privacy policy metabox content.
     1669         *
     1670         * @since 4.9.6
     1671         *
     1672         * @return string The defauld WordPress metabox content.
     1673         */
     1674        public static function get_default_metabox_content() {
     1675
     1676                $content  = '<h2>' . __( 'Who we are</h2>' ) . '</h2>';
     1677                // translators: %s site url
     1678                $content .= '<p>' . sprintf( __( 'Our website address is: %s' ), get_bloginfo( 'url' ) ) . '</p>';
     1679
     1680                $content         .= '<h2>' . __( 'What personal data we collect and why we collect it' ) . '</h2>';
     1681                        $content     .= '<h3>' . __( 'Contact forms' ) . '</h3>';
     1682                        $content     .= '<p>' . __( 'None.' ) . '</p>';
     1683                        $content     .= '<h3>' . __( 'Comments' ) . '</h3>';
     1684                                $content .= '<p>' . __( '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>';
     1685                        $content     .= '<h3>' . __( 'Cookies' ) . '</h3>';
     1686                                $content .= '<p>' . __( 'If you leave a comment on our site you may opt-in to saving your name, email address and website in cookies so we can recognise you as a commenter. These cookies will persist for one year.' ) . '</p>';
     1687                                $content .= '<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>';
     1688                                $content .= '<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>';
     1689                                $content .= '<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>';
     1690                                $content .= '<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>';
     1691                        $content     .= '<h3>' . __( 'Embedded content from other websites' ) . '</h3>';
     1692                                $content .= '<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>';
     1693                                $content .= '<p>' . __( 'Typically embedded content is from websites that share videos, images, or other content.' ) . '</p>';
     1694                        $content     .= '<h3>' . __( 'Analytics' ) . '</h3>';
     1695                                $content .= '<p>' . __( 'None.' ) . '</p>';
     1696
     1697                $content     .= '<h2>' . __( 'Who we share your data with' ) . '</h2>';
     1698                        $content .= '<p>' . __( 'Nobody.' ) . '</p>';
     1699
     1700                $content     .= '<h2>' . __( 'How long we retain your data' ) . '</h2>';
     1701                        $content .= '<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>';
     1702                        $content .= '<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, change or delete most of that data at any time except their login name/nickname.' ) . '</p>';
     1703
     1704                $content     .= '<h2>' . __( 'What rights you have over your data' ) . '</h2>';
     1705                        $content .= '<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>';
     1706                        $content .= '<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>';
     1707                        $content .= '<p>' . __( 'You can also request “to be forgotten” 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>';
     1708
     1709                $content     .= '<h2>' . __( 'Where we send your data' ) . '</h2>';
     1710                        $content .= '<p>' . __( 'For visitors that leave comments we may send the data to a spam detection service.' ) . '</p>';
     1711
     1712                $content     .= '<h2>' . __( 'How we protect your data' ) . '</h2>';
     1713                        $content .= '<p>' . __( 'All access to sensitive areas of our site is password protected.' ) . '</p>';
     1714
     1715                $content     .= '<h2>' . __( 'What third parties we receive data from' ) . '</h2>';
     1716                        $content .= '<p>' . __( 'None.' ) . '</p>';
     1717
     1718                $content     .= '<h2>' . __( 'What automated decision making and/or profiling we do with user data' ) . '</h2>';
     1719                        $content .= '<p>' . __( 'For users that leave comments we may send the comment data to a spam detection service.' ) . '</p>';
     1720
     1721                /**
     1722                 * Filters the default content suggested for inclusion in a privacy policy.
     1723                 *
     1724                 * @since 4.9.6
     1725                 *
     1726                 * @param $content string The defauld policy content.
     1727                 */
     1728                return apply_filters( 'wp_get_default_privacy_policy_metabox_content', $content );
     1729        }
     1730
     1731        /**
    16541732         * Add the suggested privacy policy text to the policy postbox.
    16551733         *
    16561734         * @since 4.9.6
    16571735         */
    1658         public static function add_suggested_content() {
    1659                 $content = self::get_default_content();
     1736        public static function add_suggested_metabox_content() {
     1737                $content = self::get_default_metabox_content();
    16601738                wp_add_privacy_policy_content( __( 'WordPress' ), $content );
    16611739        }
    16621740}
  • src/wp-admin/includes/upgrade.php

     
    312312                        include_once( ABSPATH . 'wp-admin/includes/misc.php' );
    313313                }
    314314
    315                 $privacy_policy_content = WP_Privacy_Policy_Content::get_default_content();
     315                $privacy_policy_content = WP_Privacy_Policy_Content::get_default_page_content();
    316316                $privacy_policy_guid = get_option( 'home' ) . '/?page_id=3';
    317317
    318318                $wpdb->insert(
  • 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_page_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                );
     
    198204                                        </span>
    199205                                        <?php
    200206                                        wp_nonce_field( 'create-privacy-page' );
    201        
     207
    202208                                        submit_button( __( 'Create New Page' ), 'primary', 'submit', false, array( 'id' => 'create-page' ) );
    203209                                        ?>
    204210                                </form>
     
    205211                        </td>
    206212                </tr>
    207213        </table>
     214        <hr>
     215<h1><?php _e( 'Example of a Privacy Policy Page' ); ?></h1>
     216<p>
     217        <?php
     218        // translators: %s link to online privacy policy tutorial
     219        sprintf( _e( 'You can read the full explanation article <a href="%s">here</a>.' ), 'https://some-online-artice.org' );
     220        ?>
     221</p>
     222<h2><?php _e( 'Who we are' ); ?></h2>
     223<p><?php _e( '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>
     224<p><?php _e( '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>
     225<h2><?php _e( 'What personal data we collect and why we collect it' ); ?></h2>
     226<p><?php _e( '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>
     227<p><?php _e( 'You must also note any collection and retention of sensitive personal data.' ); ?></p>
     228<p><?php _e( '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>
     229<p><?php _e( '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>
     230<h3><?php _e( 'Contact forms' ); ?></h3>
     231<p><?php _e( '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>
     232<h3><?php _e( 'Comments' ); ?></h3>
     233<p><?php _e( 'In this subsection you should note what personal data is captured when someone leaves a comment.' ); ?></p>
     234<h3><?php _e( 'Cookies' ); ?></h3>
     235<p><?php _e( '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>
     236<h3><?php _e( 'Embedded content from other websites' ); ?></h3>
     237<p><?php _e( 'When you embed information from a third party service, such as social media or a video, those services may capture personal information. We recommend including a list of services you may embed information from with links to their own privacy notices in this subsection.' ); ?></p>
     238<h3><?php _e( 'Analytics' ); ?></h3>
     239<p><?php _e( '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>
     240<h2><?php _e( 'Who we share your data with' ); ?></h2>
     241<p><?php _e( '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>
     242<h2><?php _e( 'How long we retain your data' ); ?></h2>
     243<p><?php _e( '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>
     244<h2><?php _e( 'What rights you have over your data' ); ?></h2>
     245<p><?php _e( 'In this section you should explain how your users and site visitors can invoke their rights to access the data you hold about them, to withdraw their consent for your use of it, to request that you stop using their data, and to download their data.' ); ?></p>
     246<h2><?php _e( 'Where we send your data' ); ?></h2>
     247<p><?php _e( '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>
     248<p><?php _e( '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>
     249<h2><?php _e( 'Your contact information' ); ?></h2>
     250<p><?php _e( '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>
     251<h2><?php _e( 'Additional information' ); ?></h2>
     252<p><?php _e( '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>
     253<h3><?php _e( 'How we protect your data' ); ?></h3>
     254<p><?php _e( '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>
     255<h3><?php _e( 'What data breach procedures we have in place' ); ?></h3>
     256<p><?php _e( '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>
     257<h3><?php _e( 'What third parties we receive data from' ); ?></h3>
     258<p><?php _e( '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>
     259<h3><?php _e( 'What automated decision making and/or profiling we do with user data' ); ?></h3>
     260<p><?php _e( '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>
     261<h3><?php _e( 'Industry regulatory disclosure requirements' ); ?></h3>
     262<p><?php _e( 'The information we have recommended for your privacy notice does not preclude any privacy information you may also be required to display if you are a member of a regulated industry, or if you are subject to additional sectoral privacy laws.' ); ?></p>
    208263</div>
    209264<?php
    210265