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/tests/phpunit/testcases/core/nav/bpCoreNewNavItem.php

    r13437 r13441  
    173173            'name'                    => 'Settings',
    174174            'slug'                    => 'settings',
    175             'link'                    => trailingslashit( bp_loggedin_user_domain() . 'settings' ),
     175            'link'                    => bp_members_get_user_url(
     176                $u,
     177                array(
     178                    'single_item_component' => 'settings',
     179                )
     180            ),
    176181            'css_id'                  => 'settings',
    177182            'show_for_displayed_user' => false,
     
    218223            'name'                    => 'Woof',
    219224            'slug'                    => 'woof',
    220             'link'                    => trailingslashit( bp_loggedin_user_domain() . 'woof' ),
     225            'link'                    => bp_members_get_user_url(
     226                $u,
     227                array(
     228                    'single_item_component' => 'woof',
     229                )
     230            ),
    221231            'css_id'                  => 'woof',
    222232            'show_for_displayed_user' => false,
Note: See TracChangeset for help on using the changeset viewer.