bb_get_logout_link

The BuddyPress bb get logout link function.

Description

bb_get_logout_link( (string) $args = '' ); 

Parameters (1)

0. $args — Optional. (string) => ''
The args.

Usage

  1. if ( !function_exists( 'bb_get_logout_link' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/bbpress/bb-includes/functions.bb-template.php'; 
  3.  
  4. // The args. 
  5. $args = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bb_get_logout_link($args); 
  9.  

Defined (1)

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

/bp-forums/bbpress/bb-includes/functions.bb-template.php  
  1. function bb_get_logout_link( $args = '' ) { 
  2. if ( $args && is_string($args) && false === strpos($args, '=') ) 
  3. $args = array( 'text' => $args ); 
  4.  
  5. $defaults = array('text' => __('Log Out'), 'before' => '', 'after' => '', 'redirect' => ''); 
  6. $args = wp_parse_args( $args, $defaults ); 
  7. extract($args, EXTR_SKIP); 
  8.  
  9. $query = array( 'action' => 'logout' ); 
  10. if ( $redirect ) { 
  11. $query['redirect_to'] = $redirect; 
  12.  
  13.  
  14. return apply_filters( 'bb_get_logout_link', $before . '<a href="' . $uri . '">' . $text . '</a>' . $after, $args );