Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/31/2023 05:26:39 PM (22 months ago)
Author:
imath
Message:

Make sure all displayed user URLs are built using the BP Rewrites API

Replace all remaining bp_displayed_user_domain() usage in favor of
bp_displayed_user_url().
Introduce the bp_members_get_path_chunks() function to quickly build BP
Rewrites argument for member's URL using an array of slugs.
Deprecate bp_activities_member_rss_link(), bp_blogs_blog_tabs() &
bp_groups_header_tabs().
Improve bp_displayed_user_link() so that it's possible to pass an array
of slugs to output an escaped BP Rewrites ready URL.

Props r-a-y, johnjamesjacoby, boonebgorges

Closes https://github.com/buddypress/buddypress/pull/79
See #4954

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-messages/actions/bulk-delete.php

    r13096 r13443  
    1919    }
    2020
    21     $thread_ids = $_POST['thread_ids'];
     21    $thread_ids  = $_POST['thread_ids'];
     22    $path_chunks = bp_members_get_path_chunks( array( bp_get_messages_slug(), bp_current_action() ) );
     23    $redirect    = bp_displayed_user_url( $path_chunks );
    2224
    2325    if ( ! $thread_ids || ! messages_check_thread_access( $thread_ids ) ) {
    24         bp_core_redirect( trailingslashit( bp_displayed_user_domain() . bp_get_messages_slug() . '/' . bp_current_action() ) );
     26        bp_core_redirect( $redirect );
    2527    } else {
    2628        if ( ! check_admin_referer( 'messages_delete_thread' ) ) {
     
    3436        }
    3537
    36         bp_core_redirect( trailingslashit( bp_displayed_user_domain() . bp_get_messages_slug() . '/' . bp_current_action() ) );
     38        bp_core_redirect( $redirect );
    3739    }
    3840}
Note: See TracChangeset for help on using the changeset viewer.