Filter hook 'register'

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

View Source

register

Filter Hook
Description
Filters the HTML link to the Registration or Admin page. Users are sent to the admin page if logged-in, or the registration page if enabled and logged-out.

Hook Information

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

Hook Parameters

Type Name Description
string $link The HTML code for the link to the Registration or Admin page.

Usage Examples

Basic Usage
<?php
// Hook into register
add_filter('register', '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:724 - How this hook is used in WordPress core
<?php
 719  	 *
 720  	 * @since 1.5.0
 721  	 *
 722  	 * @param string $link The HTML code for the link to the Registration or Admin page.
 723  	 */
 724  	$link = apply_filters( 'register', $link );
 725  
 726  	if ( $display ) {
 727  		echo $link;
 728  	} else {
 729  		return $link;

PHP Documentation

<?php
/**
	 * Filters the HTML link to the Registration or Admin page.
	 *
	 * Users are sent to the admin page if logged-in, or the registration page
	 * if enabled and logged-out.
	 *
	 * @since 1.5.0
	 *
	 * @param string $link The HTML code for the link to the Registration or Admin page.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 1
  • File: wp-includes/general-template.php
Related Hooks

Related hooks will be displayed here in future updates.