Changeset 13443 for trunk/src/bp-xprofile/bp-xprofile-template.php
- Timestamp:
- 03/31/2023 05:26:39 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-xprofile/bp-xprofile-template.php
r13393 r13443 390 390 391 391 // Build the form action URL. 392 $form_action = trailingslashit( bp_displayed_user_domain() . bp_get_profile_slug() . '/edit/group/' . $group->id ); 392 $profile_slug = bp_get_profile_slug(); 393 $path_chunks = array( 394 'single_item_component' => bp_rewrites_get_slug( 'members', 'member_' . $profile_slug, $profile_slug ), 395 'single_item_action' => bp_rewrites_get_slug( 'members', 'member_' . $profile_slug . '_edit', 'edit' ), 396 'single_item_action_variables' => array( bp_rewrites_get_slug( 'members', 'member_' . $profile_slug . '_edit_group', 'group' ), $group->id ), 397 ); 398 $form_action = bp_displayed_user_url( $path_chunks ); 393 399 394 400 /** … … 1074 1080 1075 1081 // Build the profile field group link. 1076 $link = trailingslashit( bp_displayed_user_domain() . bp_get_profile_slug() . '/edit/group/' . $groups[ $i ]->id ); 1082 $profile_slug = bp_get_profile_slug(); 1083 $path_chunks = array( 1084 'single_item_component' => bp_rewrites_get_slug( 'members', 'member_' . $profile_slug, $profile_slug ), 1085 'single_item_action' => bp_rewrites_get_slug( 'members', 'member_' . $profile_slug . '_edit', 'edit' ), 1086 'single_item_action_variables' => array( bp_rewrites_get_slug( 'members', 'member_' . $profile_slug . '_edit_group', 'group' ), $groups[ $i ]->id ), 1087 ); 1088 $link = bp_displayed_user_url( $path_chunks ); 1077 1089 1078 1090 // Add tab to end of tabs array. … … 1232 1244 */ 1233 1245 function bp_edit_profile_button() { 1246 $profile_slug = bp_get_profile_slug(); 1247 $path_chunks = array( 1248 'single_item_component' => bp_rewrites_get_slug( 'members', 'member_' . $profile_slug, $profile_slug ), 1249 'single_item_action' => bp_rewrites_get_slug( 'members', 'member_' . $profile_slug . '_edit', 'edit' ), 1250 ); 1251 1234 1252 bp_button( array( 1235 1253 'id' => 'edit_profile', … … 1237 1255 'must_be_logged_in' => true, 1238 1256 'block_self' => true, 1239 'link_href' => trailingslashit( bp_displayed_user_domain() . bp_get_profile_slug() . '/edit'),1257 'link_href' => bp_displayed_user_url( $path_chunks ), 1240 1258 'link_class' => 'edit', 1241 1259 'link_text' => __( 'Edit Profile', 'buddypress' ),
Note: See TracChangeset
for help on using the changeset viewer.