bbp_get_logout_link

Return the logout link.

Description

(string) bbp_get_logout_link( (string) $redirect_to = '' ); 

Returns (string)

The logout link

Parameters (1)

0. $redirect_to — Optional. (string) => ''
The redirect to.

Usage

  1. if ( !function_exists( 'bbp_get_logout_link' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bbpress/includes/common/template.php'; 
  3.  
  4. // The redirect to. 
  5. $redirect_to = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bbp_get_logout_link($redirect_to); 
  9.  

Defined (1)

The function is defined in the following location(s).

/includes/common/template.php  
  1. function bbp_get_logout_link( $redirect_to = '' ) { 
  2. return apply_filters( 'bbp_get_logout_link', '<a href="' . wp_logout_url( $redirect_to ) . '" class="button logout-link">' . esc_html__( 'Log Out', bbpress ) . '</a>', $redirect_to );