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', true );
+ wp_enqueue_script( 'accesspress-parallax-custom', get_template_directory_uri() . '/js/custom.js', array('jquery'), '1.0.2', 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.1', true );
- wp_enqueue_style( 'glm-style', get_template_directory_uri() . '/assets/css/glm-dev.css', false, "1.0.1" );
+ 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" );
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
function glm_login_form( $atts ){
ob_start(); ?>
+ <div class="wp_login_error">
+ <p id="glm-member-login-notification">
+ <?php if( isset( $_GET['login'] ) && $_GET['login'] == 'failed' ) { ?>
+ The information you entered is incorrect. Please try again.
+ <?php }
+ else if( isset( $_GET['login'] ) && $_GET['login'] == 'empty' ) { ?>
+ Please enter both username and password.
+ <?php } ?>
+ </p>
+ </div>
<div id='glm-member-login-form'>
<?php
$args = array(
//Assign modified $form object back to the validation result
$validation_result['form'] = $form;
return $validation_result;
-
+}
+add_action( 'wp_login_failed', 'login_fail' ); // hook failed login
+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
+ exit;
+ }
}
\ No newline at end of file
// login_section.on("click", function(){
// $("#modal-login").toggleClass("show-login");
// })
+ if(window.location.href.indexOf("login=failed") > -1) {
+ $(".menu-login").trigger("click");
+ }
});
\ No newline at end of file