Changeset 3208
- Timestamp:
- 05/24/2011 05:54:19 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/plugin/bbp-includes/bbp-user-functions.php
r3120 r3208 26 26 */ 27 27 function bbp_redirect_login( $url = '', $raw_url = '', $user = '' ) { 28 if ( is_wp_error( $user ) ) 29 return $url; 30 31 if ( empty( $url ) && !empty( $raw_url ) ) 28 29 // Raw redirect_to was passed, so use it 30 if ( !empty( $raw_url ) ) 32 31 $url = $raw_url; 33 32 34 if ( empty( $url ) || $url == admin_url() ) 33 // $url was manually set in wp-login.php to redirect to admin 34 elseif ( admin_url() == $url ) 35 35 $url = home_url(); 36 36 37 wp_safe_redirect( esc_url( $url ) ); 38 exit; 37 // $url is empty 38 elseif ( empty( $url ) ) 39 $url = home_url(); 40 41 return apply_filters( 'bbp_redirect_login', $url, $raw_url, $user ); 39 42 } 40 43
Note: See TracChangeset
for help on using the changeset viewer.