wp-includes/general-template.php:586Displays the Log In/Out link.
$redirectstringoptional''$displaybooloptionaltruevoid|string2 hooks fire while wp_loginout() runs, in this order:
Filters the HTML output for the Log In/Log Out link.
Filters the HTML output for the Log In/Log Out link.
function wp_loginout( $redirect = '', $display = true ) { if ( ! is_user_logged_in() ) { $link = '<a href="' . esc_url( wp_login_url( $redirect ) ) . '">' . __( 'Log in' ) . '</a>'; } else { $link = '<a href="' . esc_url( wp_logout_url( $redirect ) ) . '">' . __( 'Log out' ) . '</a>'; } if ( $display ) { /** * Filters the HTML output for the Log In/Log Out link. * * @since 1.5.0 * * @param string $link The HTML link content. */ echo apply_filters( 'loginout', $link ); } else { /** This filter is documented in wp-includes/general-template.php */ return apply_filters( 'loginout', $link ); }}Introduced in 1.5.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-includes/general-template.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.