From: Anthony Talarico Date: Thu, 2 Feb 2017 15:03:46 +0000 (-0500) Subject: removing glm_login functions from functions.php, changing enter admin area button X-Git-Tag: v1.0.3^2 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=35d21b61784263013dba1380538392fb5d27b165;p=WP-Themes%2Fkalamazoobeerweek.git removing glm_login functions from functions.php, changing enter admin area button to redirect to the main admin page --- diff --git a/functions.php b/functions.php index b4ef486..cf49224 100644 --- a/functions.php +++ b/functions.php @@ -230,44 +230,6 @@ 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; - } - } -} - if ( ! function_exists( 'glm_members_only_menu')) { function glm_members_only_menu() { wp_nav_menu(array( diff --git a/parts/glm-members-only-top-bar.php b/parts/glm-members-only-top-bar.php index 0207260..733c002 100644 --- a/parts/glm-members-only-top-bar.php +++ b/parts/glm-members-only-top-bar.php @@ -3,6 +3,6 @@ Logout - Enter Admin Area + Enter Admin Area \ No newline at end of file