Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
06/18/2023 04:11:04 AM (18 months ago)
Author:
imath
Message:

BP Rewrites: optimize the code used to build URLs

The bp_members_get_path_chunks() & bp_groups_get_path_chunks() functions are making sure URL chunks are customized according to the slugs settings. Instead of redoing at many places all or some of the operations performed by these functions, update the code to build URLs so that it uses these functions.

See #4954
Fixes #8923
Closes https://github.com/buddypress/buddypress/pull/117

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-groups/bp-groups-adminbar.php

    r13441 r13503  
    8383                    'id'     => $menu->slug,
    8484                    'title'  => $title,
    85                     'href'   => bp_get_group_url(
     85                    'href'   => bp_get_group_manage_url(
    8686                        $bp->groups->current_group,
    87                         array(
    88                             'single_item_action'           => bp_rewrites_get_slug( 'groups', 'bp_group_read_admin', 'admin' ),
    89                             'single_item_action_variables' => bp_rewrites_get_slug( 'groups', $manage_screens[ $menu->slug ]['rewrite_id'], $menu->slug ),
    90                         )
     87                        bp_groups_get_path_chunks( array( $menu->slug ), 'manage' )
    9188                    ),
    9289                )
Note: See TracChangeset for help on using the changeset viewer.