Skip to:
Content

BuddyPress.org

#8884 closed defect (bug) (fixed)

The Array Argument of `bp_displayed_user_url()` needs to include specific keys

Reported by: imath's profile imath Owned by: imath's profile imath
Milestone: 12.0.0 Priority: normal
Severity: normal Version:
Component: Members Keywords: has-patch
Cc:

Description

These specific keys are:

array(
  'single_item_component'        => '',
  'single_item_action'           => '',
  'single_item_action_variables' => '',
);

The bp_members_get_path_chunks() helper function can be used to use a regular array and have it converted to the above array (making sure slugs can be customized).

During the BP Rewrites merge process (#4954), this function was misused eight times.

Change History (2)

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


12 months ago
#1

  • Keywords has-patch added; needs-patch removed

Use bp_members_get_path_chunks() to build URL path slugs.

Trac ticket: https://buddypress.trac.wordpress.org/ticket/8884

#2 @imath
12 months ago

  • Owner set to imath
  • Resolution set to fixed
  • Status changed from new to closed

In 13472:

Use the bp_displayed_user_url() function the right way

Use the bp_members_get_path_chunks() helper function to build the arguments array expected by bp_displayed_user_url() at 8 places where a regular array of slugs were wrongly used during the BP Rewrites merge process (#4954).

Closes https://github.com/buddypress/buddypress/pull/98
Fixes #8884

Note: See TracTickets for help on using tickets.