Last active
September 2, 2015 09:50
-
-
Save alessandrotesoro/dfe2940c58ebe78af0b0 to your computer and use it in GitHub Desktop.
RSA plugin integration with WPUM - allow registration page to be visible
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function wpum_rsa_access( $is_restricted, $wp ) { | |
// Get registration page slug | |
$page_id = wpum_get_core_page_id( 'register' ); | |
$register_page = get_post( $page_id ); | |
// check query variables to see if this is the registration page | |
if ( $wp->query_vars['pagename'] == $register_page->post_name ) { | |
$is_restricted = false; | |
} | |
return $is_restricted; | |
} | |
add_filter( 'restricted_site_access_is_restricted', 'wpum_rsa_access', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment