Skip to:

Opened 12 months ago

Closed 12 months ago

Last modified 8 months ago

#8923 closed enhancement (fixed)

BP Rewrites: Optimize code to build URLs

Reported by: imath's profile imath Owned by: imath's profile imath
Milestone: 12.0.0 Priority: normal
Severity: normal Version:
Component: Core Keywords: has-patch has-unit-tests


In #4954 the bp_members_get_path_chunks() & bp_groups_get_path_chunks() functions were introduced after the bp_rewrites_get_slug() one. These two functions are more convenient to use than building an associative array in which the bp_rewrites_get_slug() is used to make sure slugs are customized. They simply accept a regular array containing URL chunks. Let's use these two first functions more and bp_rewrites_get_slug() a lot less.

Change History (3)

This ticket was mentioned in PR #117 on buddypress/buddypress by @imath.

12 months ago

  • Keywords has-patch has-unit-tests added; needs-patch removed

BP Rewrites: Optimizing code to build URLs

Use less the bp_rewrites_get_slug() function and more the bp_members_get_path_chunks() & bp_groups_get_path_chunks() ones

Trac ticket:

#2 @imath
12 months ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 13503:

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

#3 @imath
8 months ago

In 13619:

Improve inline doc for Members & Groups get_path_chunks() functions

  • bp_members_get_path_chunks() & bp_groups_get_path_chunks(): clearly inform these functions goal is to return customized slugs.
  • Add missing inline comment for the bp_groups_get_path_chunks() $context parameter.

See #8923

Note: See TracTickets for help on using tickets.