Changeset 5542
- Timestamp:
- 12/13/2011 06:19:36 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.5/bp-members/bp-members-filters.php
r4961 r5542 46 46 add_action( 'bp_loaded', 'bp_members_signup_sanitization' ); 47 47 48 /** 49 * Filter the user profile URL to point to BuddyPress profile edit 50 * 51 * @since BuddyPress 1.5.2 52 * 53 * @global BuddyPress $bp 54 * @param string $url 55 * @param int $user_id 56 * @param string $scheme 57 * @return string 58 */ 59 function bp_members_edit_profile_url( $url, $user_id, $scheme = 'admin' ) { 60 global $bp; 61 62 // Default to $url 63 $profile_link = $url; 64 65 // If xprofile is active, use profile domain link 66 if ( bp_is_active( 'xprofile' ) ) { 67 $user_domain = bp_core_get_user_domain( $user_id ); 68 $profile_link = trailingslashit( $user_domain . $bp->profile->slug . '/edit' ); 69 } 70 71 return apply_filters( 'bp_members_edit_profile_url', $profile_link, $url, $user_id, $scheme ); 72 } 73 add_filter( 'edit_profile_url', 'bp_members_edit_profile_url', 10, 3 ); 74 48 75 ?>
Note: See TracChangeset
for help on using the changeset viewer.