bp_no_access_redirect

  • apply_filters( 'bp_no_access_redirect', !empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '' )

    Source Reference:

    • Component: BuddyPress :: bp-themes
      File: /bp-themes/bp-default/functions.php :: Trac Source Line: 707
      endif;
      
      if ( !function_exists( 'bp_dtheme_sidebar_login_redirect_to' ) ) :
      /**
       * Adds a hidden "redirect_to" input field to the sidebar login form.
       *
       * @since 1.5
       */
      function bp_dtheme_sidebar_login_redirect_to() {
      	$redirect_to = apply_filters( 'bp_no_access_redirect', !empty( $_REQUEST['redirect_to'] ) ? $_REQUEST['redirect_to'] : '' );
      ?>
      	<input type="hidden" name="redirect_to" value="<?php echo esc_attr( $redirect_to ); ?>" />
      <?php
      }
      add_action( 'bp_sidebar_login_form', 'bp_dtheme_sidebar_login_redirect_to' );
      endif;
      
      if ( !function_exists( 'bp_dtheme_content_nav' ) ) :
      /**
       * Display navigation to next/previous pages when applicable
      
  • apply_filters( 'bp_no_access_redirect', $redirect, $root, $message, $mode )

    Source Reference:

    • Component: BuddyPress :: bp-core
      File: /bp-core/bp-core-catchuri.php :: Trac Source Line: 411
      		'redirect' => wp_guess_url(),	// the URL you get redirected to when a user successfully logs in
      		'root'     => $bp->root_domain	// the landing page you get redirected to when a user doesn't have access
      	);
      
      	$r = wp_parse_args( $args, $defaults );
      	extract( $r, EXTR_SKIP );
      
      	// Apply filters to these variables
      	$mode		= apply_filters( 'bp_no_access_mode', $mode, $root, $redirect, $message );
      	$redirect	= apply_filters( 'bp_no_access_redirect', $redirect, $root, $message, $mode );
      	$root		= trailingslashit( apply_filters( 'bp_no_access_root', $root, $redirect, $message, $mode ) );
      	$message	= apply_filters( 'bp_no_access_message', $message, $root, $redirect, $mode );
      
      	switch ( $mode ) {
      		// Option to redirect to wp-login.php
      		// Error message is displayed with bp_core_no_access_wp_login_error()
      		case 2 :
      			if ( $redirect ) {
      				bp_core_redirect( wp_login_url( $redirect ) . '&action=bpnoaccess' );
      			} else {
      

Comments are closed.