Skip to content

Instantly share code, notes, and snippets.

@alessandrotesoro
Last active September 2, 2015 09:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alessandrotesoro/dfe2940c58ebe78af0b0 to your computer and use it in GitHub Desktop.
Save alessandrotesoro/dfe2940c58ebe78af0b0 to your computer and use it in GitHub Desktop.
RSA plugin integration with WPUM - allow registration page to be visible
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