Skip to:
Content

BuddyPress.org

Changeset 12671


Ignore:
Timestamp:
06/29/2020 08:18:53 PM (4 years 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

See #8298 (branch 6.0)

Location:
branches/6.0/src
Files:
3 edited

Legend:

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

    r11923 r12671  
    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 {
  • branches/6.0/src/bp-templates/bp-legacy/buddypress-functions.php

    r12595 r12671  
    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 {
  • branches/6.0/src/bp-templates/bp-nouveau/includes/groups/ajax.php

    r12501 r12671  
    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.