Changeset 31417 for trunk/src/wp-login.php
- Timestamp:
- 02/11/2015 07:18:19 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-login.php
r31090 r31417 485 485 case 'logout' : 486 486 check_admin_referer('log-out'); 487 488 $user = wp_get_current_user(); 489 487 490 wp_logout(); 488 491 489 $redirect_to = !empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : 'wp-login.php?loggedout=true'; 492 if ( ! empty( $_REQUEST['redirect_to'] ) ) { 493 $redirect_to = $requested_redirect_to = $_REQUEST['redirect_to']; 494 } else { 495 $redirect_to = 'wp-login.php?loggedout=true'; 496 $requested_redirect_to = ''; 497 } 498 499 /** 500 * Filter the log out redirect URL. 501 * 502 * @since 4.2.0 503 * 504 * @param string $redirect_to The redirect destination URL. 505 * @param string $requested_redirect_to The requested redirect destination URL passed as a parameter. 506 * @param WP_User $user The WP_User object for the user that's logging out. 507 */ 508 $redirect_to = apply_filters( 'logout_redirect', $redirect_to, $requested_redirect_to, $user ); 490 509 wp_safe_redirect( $redirect_to ); 491 510 exit();
Note: See TracChangeset
for help on using the changeset viewer.