Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: loginout

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
127  * @since 1.5.0
128  * @uses apply_filters() Calls 'loginout' hook on HTML link content.
129  */
130 function wp_loginout() {
131      if ( ! is_user_logged_in() )
132           $link = '<a href="' . wp_login_url() . '">' . __('Log in') . '</a>';
133      else
134           $link = '<a href="' . wp_logout_url() . '">' . __('Log out') . '</a>';
135
136      echo apply_filters('loginout', $link);
137 }
138
139 /**
140  * Returns the Log Out URL.
141  *
142  * Returns the URL that allows the user to log out of the site
143  *
144  * @since 2.7
145  * @uses wp_nonce_url() To protect against CSRF