Skip to:
Content

BuddyPress.org

Ticket #7875: 7875.2.patch

File 7875.2.patch, 1.8 KB (added by imath, 5 years ago)
  • src/bp-templates/bp-nouveau/includes/groups/ajax.php

    diff --git src/bp-templates/bp-nouveau/includes/groups/ajax.php src/bp-templates/bp-nouveau/includes/groups/ajax.php
    index fb15e1455..c07c9b762 100644
     
    33 * Groups Ajax functions
    44 *
    55 * @since 3.0.0
    6  * @version 4.4.0
     6 * @version 7.0.0
    77 */
    88
    99// Exit if accessed directly.
    function bp_nouveau_ajax_send_group_invites() { 
    407407                wp_send_json_error( $response );
    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 ) );
    418412
    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         }
    424 
    425413        if ( array_search( false, $invited ) ) {
    426414                $errors = array_keys( $invited, false );
    427415
  • src/bp-templates/bp-nouveau/includes/groups/functions.php

    diff --git src/bp-templates/bp-nouveau/includes/groups/functions.php src/bp-templates/bp-nouveau/includes/groups/functions.php
    index 3b3dbb324..6b61462b1 100644
    function bp_nouveau_group_setup_nav() { 
    363363}
    364364
    365365/**
     366 * Includes a message into the sent invitation email.
     367 *
    366368 * @since 3.0.0
     369 * @deprecated 7.0.0
     370 *
     371 * @param string $message The message to send with the invite
    367372 */
    368373function bp_nouveau_groups_invites_custom_message( $message = '' ) {
     374        _deprecated_function( __FUNCTION__, '7.0.0' );
     375
    369376        if ( empty( $message ) ) {
    370377                return $message;
    371378        }