bbp_get_wp_login_action

Return the login form action url.

Description

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

Parameters (1)

0. $args — Optional. (string) => ''
Pass a URL to redirect to

Usage

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

Defined (1)

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

/includes/common/template.php  
  1. function bbp_get_wp_login_action( $args = '' ) { 
  2.  
  3. // Parse arguments against default values 
  4. $r = bbp_parse_args( $args, array( 
  5. 'action' => '',  
  6. 'context' => '',  
  7. 'url' => 'wp-login.php' 
  8. ), 'login_action' ); 
  9.  
  10. // Add action as query arg 
  11. if ( !empty( $r['action'] ) ) { 
  12. $login_url = add_query_arg( array( 'action' => $r['action'] ), $r['url'] ); 
  13.  
  14. // No query arg 
  15. } else { 
  16. $login_url = $r['url']; 
  17.  
  18. $login_url = site_url( $login_url, $r['context'] ); 
  19.  
  20. return apply_filters( 'bbp_get_wp_login_action', $login_url, $r, $args );