From 3eb30a5dbcde2885a674f1aca6321d9fa55184dd Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Mon, 12 Nov 2018 16:10:15 -0500 Subject: [PATCH] redoing the login redirect functionality to go to a page instead of staying on home page --- functions.php | 6 +++--- inc/glm-dev.php | 2 +- js/custom.js | 6 +++--- style.css | 1 + 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/functions.php b/functions.php index 562f7a7..fa42aa8 100644 --- a/functions.php +++ b/functions.php @@ -187,11 +187,11 @@ function accesspress_parallax_scripts() { wp_enqueue_script( 'jquery-fitvid', get_template_directory_uri() . '/js/jquery.fitvids.js', array('jquery'), '1.0', true ); wp_enqueue_script( 'nivo-lightbox', get_template_directory_uri() . '/js/nivo-lightbox.min.js', array('jquery'), '1.2.0', true ); wp_enqueue_script( 'slick', get_template_directory_uri() . '/js/slick.js', array('jquery'), '1.8.0', true ); - wp_enqueue_script( 'accesspress-parallax-custom', get_template_directory_uri() . '/js/custom.js', array('jquery'), '1.0.2', true ); + wp_enqueue_script( 'accesspress-parallax-custom', get_template_directory_uri() . '/js/custom.js', array('jquery'), '1.0.3', true ); wp_localize_script( 'accesspress-parallax-custom', 'ap_params', $slider_parameters ); - wp_enqueue_script( 'glm-dev', get_template_directory_uri() . '/assets/js/glm-dev.js', array(), '1.0.2', true ); - wp_enqueue_style( 'glm-style', get_template_directory_uri() . '/assets/css/glm-dev.css', false, "1.0.2" ); + wp_enqueue_script( 'glm-dev', get_template_directory_uri() . '/assets/js/glm-dev.js', array(), '1.0.3', true ); + wp_enqueue_style( 'glm-style', get_template_directory_uri() . '/assets/css/glm-dev.css', false, "1.0.3" ); if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); diff --git a/inc/glm-dev.php b/inc/glm-dev.php index d38398f..e3750cc 100644 --- a/inc/glm-dev.php +++ b/inc/glm-dev.php @@ -76,7 +76,7 @@ function login_fail( $username ) { $referrer = $_SERVER['HTTP_REFERER']; // where did the post submission come from? // 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(home_url() . '/?login=failed' ); // let's append some information (login=failed) to the URL for the theme to use + wp_redirect(get_permalink(441) . '/?login=failed' ); // let's append some information (login=failed) to the URL for the theme to use exit; } } \ No newline at end of file diff --git a/js/custom.js b/js/custom.js index dcf3771..83119fc 100644 --- a/js/custom.js +++ b/js/custom.js @@ -240,7 +240,7 @@ jQuery(document).ready(function($){ // login_section.on("click", function(){ // $("#modal-login").toggleClass("show-login"); // }) - if(window.location.href.indexOf("login=failed") > -1) { - $(".menu-login").trigger("click"); - } + // if(window.location.href.indexOf("login=failed") > -1) { + // $(".menu-login").trigger("click"); + // } }); \ No newline at end of file diff --git a/style.css b/style.css index d5698d3..3b5a6d4 100644 --- a/style.css +++ b/style.css @@ -2756,4 +2756,5 @@ body .cmvl-navbar-navigation span{ } #glm-member-login-notification{ color: red; + text-align: center; } \ No newline at end of file -- 2.17.1