Skip to:
Content

BuddyPress.org

Ticket #2002: 2002.001.diff

File 2002.001.diff, 2.0 KB (added by cnorris23, 15 years ago)
  • bp-themes/bp-default/_inc/global.js

     
    204204                        var nonce = link_href.split('_wpnonce=');
    205205                                nonce = nonce[1];
    206206
     207                        var redirect_to = link_href.split('bp_redirect_to=');
     208                                redirect_to = redirect_to[1].split('&');
     209                                redirect_to = decodeURIComponent(redirect_to[0]);
     210
    207211                        target.addClass('loading');
    208212
    209213                        j.post( ajaxurl, {
     
    220224                                        li.children('div#message').hide().fadeIn(200);
    221225                                } else {
    222226                                        li.slideUp(200);
     227                                        window.location = redirect_to;
    223228                                }
    224229                        });
    225230
  • bp-activity/bp-activity-templatetags.php

     
    716716        function bp_get_activity_delete_link() {
    717717                global $activities_template, $bp;
    718718
    719                 return apply_filters( 'bp_get_activity_delete_link', '<a href="' . wp_nonce_url( $bp->root_domain . '/' . $bp->activity->slug . '/delete/' . $activities_template->activity->id, 'bp_activity_delete_link' ) . '" class="item-button delete-activity confirm">' . __( 'Delete', 'buddypress' ) . '</a>' );
     719                if ( $bp->current_component == $bp->activity->slug && is_numeric( $bp->current_action ) ) {
     720                         if ( wp_get_referer() )
     721                                $bp_redirect_to = '?bp_redirect_to=' . wp_get_referer();
     722                        else
     723                                $bp_redirect_to = '?bp_redirect_to=' . $bp->root_domain . '/' . $bp->activity->slug . '/';
     724                }
     725
     726                return apply_filters( 'bp_get_activity_delete_link', '<a href="' . wp_nonce_url( $bp->root_domain . '/' . $bp->activity->slug . '/delete/' . $activities_template->activity->id . $bp_redirect_to, 'bp_activity_delete_link' ) . '" class="item-button delete-activity confirm">' . __( 'Delete', 'buddypress' ) . '</a>' );
    720727        }
    721728
    722729function bp_activity_latest_update( $user_id = false ) {