Skip to:
Content

BuddyPress.org

Ticket #7855: 7855.diff

File 7855.diff, 6.9 KB (added by boonebgorges, 2 years ago)
  • src/bp-core/classes/class-bp-admin.php

    diff --git src/bp-core/classes/class-bp-admin.php src/bp-core/classes/class-bp-admin.php
    index da5f9bac0..5d5716881 100644
    class BP_Admin { 
    169169                add_filter( 'manage_' . bp_get_email_post_type() . '_posts_columns',       array( $this, 'emails_register_situation_column' ) );
    170170                add_action( 'manage_' . bp_get_email_post_type() . '_posts_custom_column', array( $this, 'emails_display_situation_column_data' ), 10, 2 );
    171171
     172                // Privacy Policy.
     173                add_action( 'admin_init', array( $this, 'add_privacy_policy_content' ) );
     174
    172175                // BuddyPress Hello.
    173176                add_action( 'admin_footer', array( $this, 'about_screen' ) );
    174177
    class BP_Admin { 
    540543                }
    541544        }
    542545
     546        /**
     547         * Registers BuddyPress's suggested privacy policy language.
     548         *
     549         * @since 3.x.y
     550         */
     551        public function add_privacy_policy_content() {
     552                if ( ! function_exists( 'wp_add_privacy_policy_content' ) ) {
     553                        return;
     554                }
     555
     556                $suggested_text = '<strong class="privacy-policy-tutorial">' . __( 'Suggested text:', 'buddypress' ) . ' </strong>';
     557                $content = '';
     558
     559                $content .= '<div class="wp-suggested-text">';
     560
     561                $content .= '<h2>' . __( 'What personal data we collect and why we collect it', 'buddypress' ) . '</h2>';
     562                $content .= '<p class="privacy-policy-tutorial">' . __( 'Sites powered by BuddyPress rely heavily on user-provided data. In this section, you should note what data you collect, from both registered users and anonymous visitors.', 'buddypress' ) . '</p>';
     563
     564                if ( bp_is_active( 'xprofile' ) ) {
     565                        $content .= '<h3>' . __( 'Profile Data', 'buddypress' ) . '</h3>';
     566                        $content .= '<p class="privacy-policy-tutorial">' . __( 'In this section you should note what information is collected on user profiles. The suggested text gives an overview of the kinds of profile data collected by BuddyPress.', 'buddypress' ) . '</p>';
     567
     568                        $content .= '<p>' . $suggested_text . __( 'When you register for the site, you may be asked to provide certain personal data for display on your profile. The "Name" field is required as well as public, and user profiles are visible to any site visitor. Other profile information may be required or optional, as configured by the site administrator.', 'buddypress' ) . '</p>';
     569                        $content .= '<p>' . __( 'User information provided during account registration can be modified or removed on the Profile > Edit panel. In most cases, users also have control over who is able to view a particular piece of profile content, limiting visibility on a field-by-field basis to friends, logged-in users, or administrators only. Site administrators can read and edit all profile data for all users.', 'buddypress' ) . '</p>';
     570                }
     571
     572                if ( bp_is_active( 'activity' ) ) {
     573                        $content .= '<h3>' . __( 'Activity', 'buddypress' ) . '</h3>';
     574                        $content .= '<p class="privacy-policy-tutorial">' . __( 'In this section you should describe the kinds of information collected in the activity stream, how and whether it can be edited or deleted, and to whom the activity is visible.', 'buddypress' ) . '</p>';
     575
     576                        $content .= '<p>' . $suggested_text . __( 'This site records certain user actions, in the form of "activity" data. Activity includes updates and comments posted directly to activity streams, as well as descriptions of other actions performed while using the site, such as new friendships, newly joined groups, and profile updates.', 'buddypress' ) . '</p>';
     577                        $content .= '<p>' . __( 'The content of activity items obey the same privacy rules as the contexts in which the activity items are created. For example, activity updates created in a user\'s profile is publicly visible, while activity items generated in a private group are visible only to members of that group. Site administrators can view all activity items, regardless of context.', 'buddypress' ) . '</p>';
     578                        $content .= '<p>' . __( 'Activity items may be deleted at any time by users who created them. Site administrators can edit all activity items.', 'buddypress' ) . '</p>';
     579                }
     580
     581                if ( bp_is_active( 'messages' ) ) {
     582                        $content .= '<h3>' . __( 'Messages', 'buddypress' ) . '</h3>';
     583                        $content .= '<p class="privacy-policy-tutorial">' . __( 'In this section you should describe any personal data related to private messages.', 'buddypress' ) . '</p>';
     584
     585                        $content .= '<p>' . $suggested_text . __( 'The content of private messages is visible only to the sender and the recipients of the message. With the exception of site administrators, who can read all private messages, private message content is never visible to other users or site visitors. Users may delete individual private messages that they created; deleted items are removed from the message thread for all recipients. Site administrators may delete the content of any message.', 'buddypress' ) . '</p>';
     586                }
     587
     588                $content .= '<h3>' . __( 'Cookies', 'buddypress' ) . '</h3>';
     589                $content .= '<p class="privacy-policy-tutorial">' . __( 'In this section you should describe the BuddyPress-specific cookies that your site collects. The suggested text describes the default cookies.', 'buddypress' ) . '</p>';
     590
     591                $content .= '<p>' . $suggested_text . __( 'We use a cookie to show success and failure messages to logged-in users, in response to certain actions, like joining a group. These cookies contain no personal data, and are deleted immediately after the next page load.', 'buddypress' ) . '</p>';
     592
     593                if ( bp_is_active( 'messages' ) ) {
     594                        $content .= '<p>' . __( 'When a logged-in user writes a private message, we use a number of cookies to keep track of the recipients, subject, and content of the draft message. The purpose of these cookies is to prevent data loss in case of a server failure. These cookies are deleted immediately after the draft message is successfully sent, or expire after 24 hours.', 'buddypress' ) . '</p>';
     595                }
     596
     597                if ( bp_is_active( 'groups' ) ) {
     598                        $content .= '<p>' . __( 'When a logged-in user creates a new group, we use a number of cookies to keep track of the group creation process. These cookies contain no personal data, and are deleted either upon the successful creation of the group or after 24 hours.', 'buddypress' ) . '</p>';
     599                }
     600
     601                if ( bp_is_active( 'activity' ) ) {
     602                        $content .= '<p>' . __( 'We use cookies to keep track of viewer preferences when browsing activity streams across the site. These preferences include the last-selected values of the sort and filter dropdowns, as well as pagination information. These cookies contain no personal data and are for convenience only. Filter and sort cookies expire after 24 hours, while pagination cookies are deleted when the browser session ends.', 'buddypress' ) . '</p>';
     603                }
     604
     605                $content .= '</div><!-- .wp-suggested-text -->';
     606
     607                wp_add_privacy_policy_content(
     608                        'BuddyPress',
     609                        wp_kses_post( wpautop( $content, false ) )
     610                );
     611        }
     612
    543613        /** About *****************************************************************/
    544614
    545615        /**