Skip to:
Content

BuddyPress.org

Changeset 12672


Ignore:
Timestamp:
06/29/2020 08:54:30 PM (18 months ago)
Author:
imath
Message:

BP Templates: stop using deprecated function arguments

Changes were made as part of r12429 to deprecate the usage of function arguments for the groups_send_membership_request() function.

Some parts of our codebase (mainly in our Template packs) were still using these deprecated arguments.

This commit makes sure we are using the most recent arguments when using this function.

Props r-a-y, N33D

Fixes #8298 (trunk)

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-groups/screens/single/request-membership.php

    r11923 r12672  
    3939            return false;
    4040
    41         if ( !groups_send_membership_request( bp_loggedin_user_id(), $bp->groups->current_group->id ) ) {
     41        if ( !groups_send_membership_request( [ 'user_id' => bp_loggedin_user_id(), 'group_id' => $bp->groups->current_group->id ] ) ) {
    4242            bp_core_add_message( __( 'There was an error sending your group membership request. Please try again.', 'buddypress' ), 'error' );
    4343        } else {
  • trunk/src/bp-templates/bp-legacy/buddypress-functions.php

    r12595 r12672  
    15831583            check_ajax_referer( 'groups_request_membership' );
    15841584
    1585             if ( ! groups_send_membership_request( bp_loggedin_user_id(), $group->id ) ) {
     1585            if ( ! groups_send_membership_request( [ 'user_id' => bp_loggedin_user_id(), 'group_id' => $group->id ] ) ) {
    15861586                _e( 'Error requesting membership', 'buddypress' );
    15871587            } else {
  • trunk/src/bp-templates/bp-nouveau/includes/groups/ajax.php

    r12501 r12672  
    190190
    191191            case 'groups_request_membership' :
    192                 if ( ! groups_send_membership_request( bp_loggedin_user_id(), $group->id ) ) {
     192                if ( ! groups_send_membership_request( [ 'user_id' => bp_loggedin_user_id(), 'group_id' => $group->id ] ) ) {
    193193                    $response = array(
    194194                        'feedback' => sprintf(
Note: See TracChangeset for help on using the changeset viewer.