Skip to:
Content

BuddyPress.org

Ticket #8582: 8582.12.recommandations.patch

File 8582.12.recommandations.patch, 10.1 KB (added by imath, 3 years ago)
  • src/bp-core/admin/bp-core-admin-settings.php

    diff --git src/bp-core/admin/bp-core-admin-settings.php src/bp-core/admin/bp-core-admin-settings.php
    index e2f4cffcc..e71f34d4a 100644
    function bp_admin_setting_callback_members_invitations() { 
    210210 */
    211211function bp_admin_setting_callback_membership_requests() {
    212212?>
    213         <input id="bp-enable-membership-requests" name="bp-enable-membership-requests" type="checkbox" value="1" <?php checked( bp_get_membership_requests_required( 'raw' ) ); ?> <?php if ( bp_get_signup_allowed() ) { echo 'disabled="disabled"'; } ?> />
     213        <input id="bp-enable-membership-requests" name="bp-enable-membership-requests" type="checkbox" value="1" <?php checked( bp_get_membership_requests_required( 'raw' ) ); ?> <?php disabled( bp_get_signup_allowed() ); ?> />
    214214        <label for="bp-enable-membership-requests"><?php esc_html_e( 'Allow visitors to request site membership. If enabled, an administrator must approve each new site membership request.', 'buddypress' ); ?></label>
    215215        <?php if ( bp_get_signup_allowed() ) : ?>
    216216                <p class="description"><?php esc_html_e( 'Public registration is currently enabled. If you wish to require approval for new memberships, disable public registration and enable the membership requests feature.', 'buddypress' ); ?></p>
  • src/bp-core/bp-core-filters.php

    diff --git src/bp-core/bp-core-filters.php src/bp-core/bp-core-filters.php
    index 622c2bbce..49dbb3cf3 100644
    function bp_core_activation_signup_blog_notification( $domain, $path, $title, $u 
    501501         * @param string $title            The site title.
    502502         */
    503503        if ( apply_filters( 'bp_core_signup_send_activation_key_multisite_blog', true, $user, $user_email, $key, $is_signup_resend, $domain, $path, $title ) ) {
    504 
    505504                bp_send_email( 'core-user-registration-with-blog', array( array( $user_email => $salutation ) ), $args );
    506 
    507505        }
    508506
    509507        // Return false to stop the original WPMU function from continuing.
    function bp_core_activation_signup_user_notification( $user, $user_email, $key, 
    590588         * @param bool   $is_signup_resend Is the site admin sending this email?
    591589         */
    592590        if ( apply_filters( 'bp_core_signup_send_activation_key_multisite', true, $user, $user_email, $key, $is_signup_resend ) ) {
    593 
    594591                bp_send_email( 'core-user-registration', array( array( $user_email => $salutation ) ), $args );
    595 
    596592        }
    597593
    598594        // Return false to stop the original WPMU function from continuing.
  • src/bp-core/bp-core-functions.php

    diff --git src/bp-core/bp-core-functions.php src/bp-core/bp-core-functions.php
    index 3b7cfcc58..73c6a9d27 100644
    function bp_email_get_type_schema( $field = 'description' ) { 
    41624162                ),
    41634163        );
    41644164
    4165         $members_membership_request= array(
     4165        $members_membership_request = array(
    41664166                'description'      => __( 'Someone has requested membership on this site.', 'buddypress' ),
    41674167                'named_salutation' => true,
    41684168                'unsubscribe'      => array(
    function bp_email_get_type_schema( $field = 'description' ) { 
    41714171                ),
    41724172        );
    41734173
    4174         $members_membership_request_rejected= array(
     4174        $members_membership_request_rejected = array(
    41754175                'description'      => __( 'A site membership request has been rejected.', 'buddypress' ),
    41764176                'named_salutation' => false,
    41774177                'unsubscribe'      => false,
  • src/bp-members/bp-members-admin.php

    diff --git src/bp-members/bp-members-admin.php src/bp-members/bp-members-admin.php
    index 3156cda01..30949496a 100644
    function bp_members_admin_preview_signup_profile_info( $signup_field_labels = ar 
    178178                <?php if ( bp_members_site_requests_enabled() ) : ?>
    179179                        <h2><?php esc_html_e( 'Site Request Information', 'buddypress' ); ?></h2>
    180180                        <table class="signup-profile-data-drawer wp-list-table widefat fixed striped">
    181                                 <?php if ( ! empty( $signup_object->domain ) || ! empty( $signup_object->path )  ): ?>
     181                                <?php if ( ! empty( $signup_object->domain ) || ! empty( $signup_object->path ) ) : ?>
    182182                                        <tr>
    183183                                                <td class="column-fields"><?php esc_html_e( 'Site Title', 'buddypress' ); ?></td>
    184184                                                <td><?php echo esc_html( $signup_object->title ); ?></td>
  • src/bp-members/bp-members-membership-requests.php

    diff --git src/bp-members/bp-members-membership-requests.php src/bp-members/bp-members-membership-requests.php
    index 54c6159ff..8d4e0e148 100644
    add_filter( 'bp_core_signup_send_activation_key_multisite_blog', 'bp_members_mem 
    144144 *
    145145 * @since 10.0.0
    146146 *
    147  * @param BP_Signup $signup  The signup object that has been created.
     147 * @param BP_Signup $signup The signup object that has been created.
    148148 */
    149149function bp_members_membership_requests_notify_site_admins( $signup ) {
    150150
  • src/bp-members/bp-members-notifications.php

    diff --git src/bp-members/bp-members-notifications.php src/bp-members/bp-members-notifications.php
    index 08285bcb6..18ec384b4 100644
    function members_screen_notification_settings() { 
    256256                                <tr id="members-notification-settings-invitation_accepted">
    257257                                        <td></td>
    258258                                        <td><?php echo esc_html_x( 'Someone accepts your membership invitation', 'Member settings on notification settings page', 'buddypress' ); ?></td>
    259                                         <td class="yes"><input type="radio" name="notifications[notification_members_invitation_accepted]" id="notification-members-invitation-accepted-yes" value="yes" <?php checked( $allow_acceptance_emails, 'yes', true ) ?>/><label for="notification-members-invitation-accepted-yes" class="bp-screen-reader-text"><?php
     259                                        <td class="yes"><input type="radio" name="notifications[notification_members_invitation_accepted]" id="notification-members-invitation-accepted-yes" value="yes" <?php checked( $allow_acceptance_emails, 'yes', true ) ?>/><label for="notification-members-invitation-accepted-yes" class="bp-screen-reader-text">
     260                                                <?php
    260261                                                /* translators: accessibility text */
    261262                                                esc_html_e( 'Yes, send email', 'buddypress' );
    262                                         ?></label></td>
    263                                         <td class="no"><input type="radio" name="notifications[notification_members_invitation_accepted]" id="notification-members-invitation-accepted-no" value="no" <?php checked( $allow_acceptance_emails, 'no', true ) ?>/><label for="notification-members-invitation-accepted-no" class="bp-screen-reader-text"><?php
     263                                                ?>
     264                                        </label></td>
     265                                        <td class="no"><input type="radio" name="notifications[notification_members_invitation_accepted]" id="notification-members-invitation-accepted-no" value="no" <?php checked( $allow_acceptance_emails, 'no', true ) ?>/><label for="notification-members-invitation-accepted-no" class="bp-screen-reader-text">
     266                                                <?php
    264267                                                /* translators: accessibility text */
    265268                                                esc_html_e( 'No, do not send email', 'buddypress' );
    266                                         ?></label></td>
     269                                                ?>
     270                                        </label></td>
    267271                                </tr>
    268272                                <?php
    269273                        endif;
    function members_screen_notification_settings() { 
    276280                                <tr id="members-notification-settings-submitted_membership_request">
    277281                                        <td></td>
    278282                                        <td><?php echo esc_html_x( 'Someone has requested site membership', 'Member settings on notification settings page', 'buddypress' ) ?></td>
    279                                         <td class="yes"><input type="radio" name="notifications[notification_members_membership_request]" id="notification-members-submitted_membership_request-yes" value="yes" <?php checked( $allow_request_emails, 'yes', true ) ?>/><label for="notification-members-submitted_membership_request-yes" class="bp-screen-reader-text"><?php
     283                                        <td class="yes"><input type="radio" name="notifications[notification_members_membership_request]" id="notification-members-submitted_membership_request-yes" value="yes" <?php checked( $allow_request_emails, 'yes', true ) ?>/><label for="notification-members-submitted_membership_request-yes" class="bp-screen-reader-text">
     284                                                <?php
    280285                                                /* translators: accessibility text */
    281286                                                esc_html_e( 'Yes, send email', 'buddypress' );
    282                                         ?></label></td>
    283                                         <td class="no"><input type="radio" name="notifications[notification_members_membership_request]" id="notification-members-submitted_membership_request-no" value="no" <?php checked( $allow_request_emails, 'no', true ) ?>/><label for="notification-members-submitted_membership_request-no" class="bp-screen-reader-text"><?php
     287                                                ?>
     288                                        </label></td>
     289                                        <td class="no"><input type="radio" name="notifications[notification_members_membership_request]" id="notification-members-submitted_membership_request-no" value="no" <?php checked( $allow_request_emails, 'no', true ) ?>/><label for="notification-members-submitted_membership_request-no" class="bp-screen-reader-text">
     290                                                <?php
    284291                                                /* translators: accessibility text */
    285292                                                esc_html_e( 'No, do not send email', 'buddypress' );
    286                                         ?></label></td>
     293                                                ?>
     294                                        </label></td>
    287295                                </tr>
    288296                                <?php
    289297                        endif;
  • src/bp-members/classes/class-bp-members-list-table.php

    diff --git src/bp-members/classes/class-bp-members-list-table.php src/bp-members/classes/class-bp-members-list-table.php
    index 0dcf21d7c..168bee2e9 100644
    class BP_Members_List_Table extends WP_Users_List_Table { 
    377377                                )
    378378                        );
    379379
    380                         foreach( $field_groups as $field_group ) {
    381                                 foreach( $field_group->fields as $field ) {
     380                        foreach ( $field_groups as $field_group ) {
     381                                foreach ( $field_group->fields as $field ) {
    382382                                        $this->signup_field_labels[ $field->id ] = $field->name;
    383383                                }
    384384                        }
  • src/bp-members/classes/class-bp-members-ms-list-table.php

    diff --git src/bp-members/classes/class-bp-members-ms-list-table.php src/bp-members/classes/class-bp-members-ms-list-table.php
    index 0dc4b5766..bb687d9a4 100644
    class BP_Members_MS_List_Table extends WP_MS_Users_List_Table { 
    369369                                        )
    370370                                );
    371371
    372                                 foreach( $field_groups as $field_group ) {
    373                                         foreach( $field_group->fields as $field ) {
     372                                foreach ( $field_groups as $field_group ) {
     373                                        foreach ( $field_group->fields as $field ) {
    374374                                                $this->signup_field_labels[ $field->id ] = $field->name;
    375375                                        }
    376376                                }