bp_dtheme_sidebar_login_redirect_to

Adds a hidden "redirect_to" input field to the sidebar login form.

Description

bp_dtheme_sidebar_login_redirect_to(); 

Usage

  1. if ( !function_exists( 'bp_dtheme_sidebar_login_redirect_to' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-themes/bp-default/functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bp_dtheme_sidebar_login_redirect_to(); 
  7.  

Defined (1)

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

/bp-themes/bp-default/functions.php  
  1. function bp_dtheme_sidebar_login_redirect_to() { 
  2. $redirect_to = !empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : ''; 
  3. $redirect_to = apply_filters( 'bp_no_access_redirect', $redirect_to ); ?> 
  4.  
  5. <input type="hidden" name="redirect_to" value="<?php echo esc_url( $redirect_to ); ?>" /> 
  6.  
  7. <?php