Filter hook 'loginout'

in WP Core File wp-includes/general-template.php at line 402

View Source

loginout

Filter Hook
Description
Filters the HTML output for the Log In/Log Out link.

Hook Information

File Location wp-includes/general-template.php View on GitHub
Hook Type Filter
Line Number 402

Hook Parameters

Type Name Description
string $link The HTML link content.

Usage Examples

Basic Usage
<?php
// Hook into loginout
add_filter('loginout', 'my_custom_filter', 10, 1);

function my_custom_filter($link) {
    // Your custom filtering logic here
    return $link;
}

Source Code Context

wp-includes/general-template.php:402 - How this hook is used in WordPress core
<?php
 397  		 * @param string $link The HTML link content.
 398  		 */
 399  		echo apply_filters( 'loginout', $link );
 400  	} else {
 401  		/** This filter is documented in wp-includes/general-template.php */
 402  		return apply_filters( 'loginout', $link );
 403  	}
 404  }
 405  
 406  /**
 407   * Retrieves the logout URL.

PHP Documentation

<?php
/**
		 * Filters the HTML output for the Log In/Log Out link.
		 *
		 * @since 1.5.0
		 *
		 * @param string $link The HTML link content.
		 */
Quick Info
  • Hook Type: Filter
  • Parameters: 1
  • File: wp-includes/general-template.php
Related Hooks

Related hooks will be displayed here in future updates.