Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/23/2023 07:35:38 PM (13 months ago)
Author:
imath
Message:

Make BP_Core_Nav generate "BP Rewrites ready" navigation links

  • Remove all components $parent_url attributes when setting sub nav items.
  • Only use the bp_core_create_nav_link() $link attribute argument & the bp_core_create_subnav_link() $parent_url attribute argument if specified to preserve backward compatibility.
  • Migrates the Community search feature so that it uses BP Rewrites.
  • Perform some bp_loggedin_user_domain() in favor of bp_loggedin_user_url().
  • Update some PHPUnit tests.

Props r-a-y, johnjamesjacoby, boonebgorges

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-activity/bp-activity-notifications.php

    r13433 r13441  
    3030    $user_id       = $secondary_item_id;
    3131    $user_fullname = bp_core_get_user_displayname( $user_id );
     32    $activity_slug = bp_get_activity_slug();
    3233
    3334    switch ( $action ) {
    3435        case 'new_at_mention':
    3536            $action_filter = 'at_mentions';
    36             $link          = bp_loggedin_user_domain() . bp_get_activity_slug() . '/mentions/';
     37            $link          = bp_loggedin_user_url(
     38                array(
     39                    'single_item_component' => bp_rewrites_get_slug( 'members', 'member_' . $activity_slug, $activity_slug ),
     40                    'single_item_action'    => bp_rewrites_get_slug( 'members', 'member_' . $activity_slug . '_mentions', 'mentions' ),
     41                )
     42            );
    3743
    3844            /* translators: %s: the current user display name */
Note: See TracChangeset for help on using the changeset viewer.