From: Anthony Talarico Date: Thu, 2 Feb 2017 13:57:35 +0000 (-0500) Subject: removing glm_login functions from functions.php X-Git-Tag: v1.1.14^2 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=829b1487c30473a9702cce480baacde83a5d8f4b;p=WP-Themes%2FDiscoverKZOO.git removing glm_login functions from functions.php --- diff --git a/functions.php b/functions.php index 98a346a..b4fd8fa 100644 --- a/functions.php +++ b/functions.php @@ -230,42 +230,4 @@ if (!function_exists('is_in_tree')) { return false; } } - -/** - * Function Name: front_end_login_fail. - * Added for: GLM Member DB front-end login failure custom redirection. - * Description: This redirects the failed login to the custom login page - * instead of default login page with a modified url -**/ -add_action( 'wp_login_failed', 'front_end_login_fail' ); -function front_end_login_fail( $username ) { - // Getting URL of the login page - $referrer = $_SERVER['HTTP_REFERER']; - // if there's a valid referrer, and it's not the default log-in screen - if( !empty( $referrer ) && !strstr( $referrer,'wp-login' ) && !strstr( $referrer,'wp-admin' ) ) { - wp_redirect( get_permalink( get_option('glm_members_database_option_members_only_id') ) . "?login=failed" ); - exit; - } -} - -/** - * Function Name: front_end_blank_credentials. - * Added for: GLM Member DB front-end login failure custom redirection. - * Description: This redirects to the custom login page if user name or - * password is empty with a modified url -**/ -add_action( 'authenticate', 'front_end_blank_credentials', 1, 3); -function front_end_blank_credentials( $login, $username, $password ) { - - // Getting URL of the login page - $referrer = $_SERVER['HTTP_REFERER']; - // if there's a valid referrer, and it's not the default log-in screen - if( !empty( $referrer ) && !strstr( $referrer,'wp-login' ) && !strstr( $referrer,'wp-admin' ) ) { - if( $username == "" || $password == "" ){ - wp_redirect( get_permalink( get_option('glm_members_database_option_members_only_id') ) . "?login=empty" ); - exit; - } - } -} - -?> +?> \ No newline at end of file