Skip to:
Content

BuddyPress.org

Ticket #7229: buddypress-functions.patch

File buddypress-functions.patch, 3.3 KB (added by dunhakdis, 3 years ago)
  • bp-templates/bp-legacy/buddypress-functions.php

    diff --git a/bp-templates/bp-legacy/buddypress-functions.php b/bp-templates/bp-legacy/buddypress-functions.php
    index b5fbcd4..6cd9d9a 100755
    a b function bp_legacy_theme_ajax_joinleave_group() { 
    14431443                        if ( ! groups_join_group( $group->id ) ) {
    14441444                                _e( 'Error joining group', 'buddypress' );
    14451445                        } else {
    1446                                 echo '<a id="group-' . esc_attr( $group->id ) . '" class="leave-group" rel="leave" title="' . __( 'Leave Group', 'buddypress' ) . '" href="' . wp_nonce_url( bp_get_group_permalink( $group ) . 'leave-group', 'groups_leave_group' ) . '">' . __( 'Leave Group', 'buddypress' ) . '</a>';
     1446                                echo '<a id="group-' . esc_attr( $group->id ) . '" class="group-button leave-group" rel="leave" title="' . __( 'Leave Group', 'buddypress' ) . '" href="' . wp_nonce_url( bp_get_group_permalink( $group ) . 'leave-group', 'groups_leave_group' ) . '">' . __( 'Leave Group', 'buddypress' ) . '</a>';
    14471447                        }
    14481448
    14491449                } elseif ( 'private' == $group->status ) {
    function bp_legacy_theme_ajax_joinleave_group() { 
    14561456                                if ( ! groups_accept_invite( bp_loggedin_user_id(), $group->id ) ) {
    14571457                                        _e( 'Error requesting membership', 'buddypress' );
    14581458                                } else {
    1459                                         echo '<a id="group-' . esc_attr( $group->id ) . '" class="leave-group" rel="leave" title="' . __( 'Leave Group', 'buddypress' ) . '" href="' . wp_nonce_url( bp_get_group_permalink( $group ) . 'leave-group', 'groups_leave_group' ) . '">' . __( 'Leave Group', 'buddypress' ) . '</a>';
     1459                                        echo '<a id="group-' . esc_attr( $group->id ) . '" class="group-button leave-group" rel="leave" title="' . __( 'Leave Group', 'buddypress' ) . '" href="' . wp_nonce_url( bp_get_group_permalink( $group ) . 'leave-group', 'groups_leave_group' ) . '">' . __( 'Leave Group', 'buddypress' ) . '</a>';
    14601460                                }
    14611461
    14621462                        // Otherwise, it's a Request Membership button.
    function bp_legacy_theme_ajax_joinleave_group() { 
    14771477                if ( ! groups_leave_group( $group->id ) ) {
    14781478                        _e( 'Error leaving group', 'buddypress' );
    14791479                } elseif ( 'public' == $group->status ) {
    1480                         echo '<a id="group-' . esc_attr( $group->id ) . '" class="join-group" rel="join" title="' . __( 'Join Group', 'buddypress' ) . '" href="' . wp_nonce_url( bp_get_group_permalink( $group ) . 'join', 'groups_join_group' ) . '">' . __( 'Join Group', 'buddypress' ) . '</a>';
     1480                        echo '<a id="group-' . esc_attr( $group->id ) . '" class="group-button join-group" rel="join" title="' . __( 'Join Group', 'buddypress' ) . '" href="' . wp_nonce_url( bp_get_group_permalink( $group ) . 'join', 'groups_join_group' ) . '">' . __( 'Join Group', 'buddypress' ) . '</a>';
    14811481                } elseif ( 'private' == $group->status ) {
    1482                         echo '<a id="group-' . esc_attr( $group->id ) . '" class="request-membership" rel="join" title="' . __( 'Request Membership', 'buddypress' ) . '" href="' . wp_nonce_url( bp_get_group_permalink( $group ) . 'request-membership', 'groups_request_membership' ) . '">' . __( 'Request Membership', 'buddypress' ) . '</a>';
     1482                        echo '<a id="group-' . esc_attr( $group->id ) . '" class="group-button request-membership" rel="join" title="' . __( 'Request Membership', 'buddypress' ) . '" href="' . wp_nonce_url( bp_get_group_permalink( $group ) . 'request-membership', 'groups_request_membership' ) . '">' . __( 'Request Membership', 'buddypress' ) . '</a>';
    14831483                }
    14841484        }
    14851485