Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
06/18/2023 04:11:04 AM (2 years 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-settings/bp-settings-template.php

    r13443 r13503  
    8181    }
    8282
    83     $settings_slug = bp_get_settings_slug();
    84     $dismiss_url   = wp_nonce_url(
     83    $dismiss_url = wp_nonce_url(
    8584        add_query_arg(
    8685            'dismiss_email_change',
    8786            1,
    8887            bp_displayed_user_url(
    89                 array(
    90                     'single_item_component' => bp_rewrites_get_slug( 'members', 'member_' . $settings_slug, $settings_slug ),
    91                 )
     88                bp_members_get_path_chunks( array( bp_get_settings_slug() ) )
    9289            )
    9390        ),
Note: See TracChangeset for help on using the changeset viewer.