Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/23/2023 07:35:38 PM (18 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-templates/bp-nouveau/includes/groups/functions.php

    r13437 r13441  
    434434 */
    435435function bp_nouveau_groups_invites_restriction_nav() {
    436     $slug        = bp_nouveau_get_component_slug( 'settings' );
    437     $user_domain = bp_loggedin_user_domain();
    438 
    439     if ( bp_displayed_user_domain() ) {
    440         $user_domain = bp_displayed_user_domain();
    441     }
    442436
    443437    bp_core_new_subnav_item( array(
    444438        'name'            => _x( 'Group Invites', 'Group invitations main menu title', 'buddypress' ),
    445439        'slug'            => 'invites',
    446         'parent_url'      => trailingslashit( $user_domain . $slug ),
    447         'parent_slug'     => $slug,
     440        'parent_slug'     => bp_nouveau_get_component_slug( 'settings' ),
    448441        'screen_function' => 'bp_nouveau_groups_screen_invites_restriction',
    449442        'item_css_id'     => 'invites',
Note: See TracChangeset for help on using the changeset viewer.