WP hooks navigation: Home/browse • Actions index • Filters index
To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).
The best way to understand what a hook does is to look at where it occurs in the source code.
do_action( "hook_name" )apply_filters( "hook_name", "what_to_filter" ).Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.
This hook occurs 2 times in this file.
| Line | Code |
|---|---|
| 185 | * @return string|null String when retrieving, null when displaying. |
| 186 | */ |
| 187 | function wp_loginout($redirect = '', $echo = true) { |
| 188 | if ( ! is_user_logged_in() ) |
| 189 | $link = '<a href="' . esc_url( wp_login_url($redirect) ) . '">' . __('Log in') . '</a>'; |
| 190 | else |
| 191 | $link = '<a href="' . esc_url( wp_logout_url($redirect) ) . '">' . __('Log out') . '</a>'; |
| 192 | |
| 193 | if ( $echo ) |
| 194 | echo apply_filters('loginout', $link); |
| 195 | else |
| 196 | return apply_filters('loginout', $link); |
| 197 | } |
| 198 | |
| 199 | /** |
| 200 | * Returns the Log Out URL. |
| 201 | * |
| 202 | * Returns the URL that allows the user to log out of the site |
| 203 | * |
| 204 | * @since 2.7.0 |
| 205 | * @uses wp_nonce_url() To protect against CSRF |