Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




wp_logout_url [ WordPress Function ]

wp_logout_url ( $redirect = '' )
Parameters:
  • (string) $redirect Path to redirect to on logout.
Uses:
Defined at:



Returns the Log Out URL.

Returns the URL that allows the user to log out of the site

Source


<?php
function wp_logout_url($redirect '') {
    
$args = array( 'action' => 'logout' );
    if ( !empty(
$redirect) ) {
        
$args['redirect_to'] = urlencode$redirect );
    }

    
$logout_url add_query_arg($argssite_url('wp-login.php''login'));
    
$logout_url wp_nonce_url$logout_url'log-out' );

    return 
apply_filters('logout_url'$logout_url$redirect);
}
?>

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics