[ create a new paste ] login | about

Link: http://codepad.org/hUI9tLmj    [ raw code | output | fork ]

PHP, pasted on Oct 18:
1
2
3
4
5
6
7
8
function appthemes_auth_redirect_login() {
     $user = wp_get_current_user();
    if ( $user->ID || 0 ) {
        nocache_headers();
        wp_redirect( wp_login_url($_SERVER['REQUEST_URI']) );
        exit();
    }
}


Output:
1
2
3
4
5
6
7
8
function appthemes_auth_redirect_login() {
     $user = wp_get_current_user();
    if ( $user->ID || 0 ) {
        nocache_headers();
        wp_redirect( wp_login_url($_SERVER['REQUEST_URI']) );
        exit();
    }
}


Create a new paste based on this one


Comments: