Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/27/2023 06:19:06 PM (16 months ago)
Author:
imath
Message:

Improve Components Member's single item navigation generation

  • Edit the BP_Component Class so that it globalize navigation items before registering it.
  • Introduce bp_get_component_navigations(), a new function that will be used to get Member's single navigation customizable slugs within the BuddyPress settings area.
  • Perform all remaining bp_loggedin_user_domain() replacements (55) in favor of the bp_loggedin_user_url() function which uses BP Rewrites to build URLs.
  • Improve bp_loggedin_user_link() by adding a new $chunks array of arguments to output escaped URL in templates.
  • Adapt some PHPUnit testcases.

Props r-a-y, johnjamesjacoby, boonebgorges

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/testcases/core/class-bp-walker-nav-menu.php

    r13314 r13442  
    2929                'name'         => 'Activity',
    3030                'slug'         => 'activity',
    31                 'link'         => trailingslashit( bp_loggedin_user_domain() . bp_get_activity_slug() ),
     31                'link'         => bp_loggedin_user_url( array( 'single_item_component' => bp_get_activity_slug() ) ),
    3232                'css_id'       => 'activity',
    3333                'class'        => array( $expected[0] ),
     
    3737                'name'         => 'Profile',
    3838                'slug'         => 'profile',
    39                 'link'         => trailingslashit( bp_loggedin_user_domain() . bp_get_profile_slug() ),
     39                'link'         => bp_loggedin_user_url( array( 'single_item_component' => bp_get_profile_slug() ) ),
    4040                'css_id'       => 'xprofile',
    4141                'class'        => array( $expected[1] ),
Note: See TracChangeset for help on using the changeset viewer.