Changeset 13468 for trunk/src/bp-core/classes/class-bp-core-nav.php
- Timestamp:
- 05/03/2023 06:18:23 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/classes/class-bp-core-nav.php
r13441 r13468 201 201 $args['link'] = bp_rewrites_get_url( $path_chunks ); 202 202 } else { 203 $path_chunks['single_item_component'] = bp_rewrites_get_slug( 'members', 'member_' . $path_chunks['single_item_component'], $path_chunks['single_item_component'] ); 204 205 if ( isset( $path_chunks['single_item_action'] ) && ! is_numeric( $path_chunks['single_item_action'] ) ) { 206 $path_chunks['single_item_action'] = bp_rewrites_get_slug( 207 'members', 208 'member_' . $path_chunks['single_item_component'] . '_' . $path_chunks['single_item_action'], 209 $path_chunks['single_item_action'] 210 ); 203 if ( isset( $path_chunks['single_item_component'] ) ) { 204 // First try to get custom item action slugs. 205 if ( isset( $path_chunks['single_item_action'] ) && ! is_numeric( $path_chunks['single_item_action'] ) ) { 206 $path_chunks['single_item_action'] = bp_rewrites_get_slug( 207 'members', 208 'member_' . $path_chunks['single_item_component'] . '_' . str_replace( '-', '_', $path_chunks['single_item_action'] ), 209 $path_chunks['single_item_action'] 210 ); 211 } 212 213 // Then only try to get custom item component slug. 214 $path_chunks['single_item_component'] = bp_rewrites_get_slug( 'members', 'member_' . str_replace( '-', '_', $path_chunks['single_item_component'] ), $path_chunks['single_item_component'] ); 211 215 } 212 216
Note: See TracChangeset
for help on using the changeset viewer.