wp_register

Display the Registration or Admin link.

Description

(string|void) wp_register( $before = '<li>', $after = '</li>', (bool) $echo = true ); 

Display a link which allows the user to navigate to the registration page if not logged in and registration is enabled or to the dashboard if logged in.

Returns (string|void)

String when retrieving.

Parameters (3)

0. $before — Optional. (string) => '
  • '
  • Text to output before the link. Default
  • ..
  • 1. $after — Optional. (string) => ''
    Text to output after the link. Default..
    2. $echo — Optional. (bool) => true
    Default to echo and not return the link.

    Usage

    1. if ( !function_exists( 'wp_register' ) ) { 
    2. require_once ABSPATH . WPINC . '/general-template.php'; 
    3.  
    4. // Text to output before the link. Default `
    5. `. 
  • $before = '
  • '; 
  •  
  • // Text to output after the link. Default `
  • `.