Bypass Force Login For Password Pages
-
First, thanks for such a great plugin. It has been very helpful. In all my attempt to bypass Force Login for the various registration and activation pages, I found the code below from your support forum to be the most helpful (since I am running the Buddy Press plugin and corresponding registration and activation pages). My question is this: can the WP login apparatus/urls be added to this exception code, specifically the WP lost password apparatus/urls? Is there a catch all for those pages, like below? I think I have an idea, but need help with the right nomenclature.
/**
* Bypass Force Login to allow for exceptions.
*
* @param bool $bypass Whether to disable Force Login. Default false.
* @return bool
*/
function my_forcelogin_bypass( $bypass ) {
// add exception for BuddyPress URLs
if ( function_exists( ‘bp_is_register_page’ ) ) {
if ( bp_is_register_page() || bp_is_activation_page() ) {
$bypass = true;
}
}
return $bypass;
}
add_filter( ‘v_forcelogin_bypass’, ‘my_forcelogin_bypass’ );
- The topic ‘Bypass Force Login For Password Pages’ is closed to new replies.