bp_no_access_mode

  • apply_filters( 'bp_no_access_mode', $mode, $root, $redirect, $message )

    Source Reference:

    • Component: BuddyPress :: bp-core
      File: /bp-core/bp-core-catchuri.php :: Trac Source Line: 410
      		'message'  => __( 'You must log in to access the page you requested.', 'buddypress' ),
      		'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' );
      

Comments are closed.