WordPress.org

Make WordPress Core

Ticket #7002: 7002.filter.diff

File 7002.filter.diff, 553 bytes (added by ryan, 6 years ago)
  • wp-login.php

     
    434434 
    435435        $user = wp_signon('', $secure_cookie); 
    436436 
     437        $redirect_to = apply_filters('login_redirect', $redirect_to, isset( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '', $user); 
     438 
    437439        if ( !is_wp_error($user) ) { 
    438440                // If the user can't edit posts, send them to their profile. 
    439441                if ( !$user->has_cap('edit_posts') && ( empty( $redirect_to ) || $redirect_to == 'wp-admin/' ) )