Version 1.0.49

This commit is contained in:
ultimatemember
2015-02-11 00:50:38 +02:00
parent b4f313e8bc
commit 23c30f6a39
17 changed files with 112 additions and 31 deletions
+7 -2
View File
@@ -24,8 +24,13 @@ class UM_Access {
do_action('um_access_post_settings');
if ( $this->redirect_handler && !$this->allow_access ) {
$curr = $ultimatemember->permalinks->get_current_url();
$this->redirect_handler = add_query_arg('redirect_to', $curr, $this->redirect_handler);
// login page add protected page automatically
if ( strstr( $this->redirect_handler, um_get_core_page('login') ) ){
$curr = $ultimatemember->permalinks->get_current_url();
$this->redirect_handler = add_query_arg('redirect_to', $curr, $this->redirect_handler);
}
exit( wp_redirect( $this->redirect_handler ) );
}