Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
09/11/2020 04:36:37 PM (6 years ago)
Author:
imath
Message:

BP Nouveau: remove unnecessary code & deprecate a function

The introduction of the BP Invitations feature in BuddyPress 6.0.0 is now making sure the optional Group's inviter message is included into the BP Email sent to the user.

Let's simply remove unnecessary code & deprecate bp_nouveau_groups_invites_custom_message().

Props DJPaul

Fixes #7875 (6.0 branch)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/6.0/src/bp-templates/bp-nouveau/includes/groups/ajax.php

    r12671 r12716  
    44 *
    55 * @since 3.0.0
    6  * @version 4.4.0
     6 * @version 6.3.0
    77 */
    88
     
    408408    }
    409409
    410     if ( ! empty( $_POST['message'] ) ) {
    411         $bp->groups->invites_message = wp_kses( wp_unslash( $_POST['message'] ), array() );
    412 
    413         add_filter( 'groups_notification_group_invites_message', 'bp_nouveau_groups_invites_custom_message', 10, 1 );
    414     }
    415 
    416410    // Send the invites.
    417411    groups_send_invites( array( 'group_id' => $group_id ) );
    418 
    419     if ( ! empty( $_POST['message'] ) ) {
    420         unset( $bp->groups->invites_message );
    421 
    422         remove_filter( 'groups_notification_group_invites_message', 'bp_nouveau_groups_invites_custom_message', 10, 1 );
    423     }
    424412
    425413    if ( array_search( false, $invited ) ) {
Note: See TracChangeset for help on using the changeset viewer.