Search
 
SCRIPT & CODE EXAMPLE
 

PHP

wp_login_form wrong password redirect

//Add this to your plugin functions.php

add_action( 'wp_login_failed', 'my_front_end_login_fail' );  // hook failed login

function my_front_end_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( $referrer . '?login=failed' );  // let's append some information (login=failed) to the URL for the theme to use
      exit;
   }
}
Comment

PREVIOUS NEXT
Code Example
Php :: laravel amount migration 
Php :: php rand int 
Php :: How to create and access angular HTTP params in PHP 
Php :: woocommerce php product gallery change to carousel 
Php :: where in laravel 
Php :: laravel blank page 
Php :: laravel pluck example 
Php :: How to order by using id with firstWhere in laravel 
Php :: how hide empty category woocommerce wordpress 
Php :: php concat objects 
Php :: php implode 
Php :: count_chars (PHP 4, PHP 5, PHP 7, PHP 8) count_chars — Return information about characters used in a string 
Php :: taxonomy_get_parents drupal 8 
Php :: wp reserved image size names 
Php :: merge collections laravel 
Php :: laravel read csv file 
Php :: check if host is local in php 
Php :: how to make custom logiger in laravel 
Php :: php hello world program 
Php :: wp_list_custom_post type 
Php :: check if date has passed php 
Php :: php get char from string position 
Php :: showing from to in larvel pagination 
Php :: has password argon2i 
Php :: php path in ubuntu 
Php :: laravel constract method 
Php :: laravel route optional parameter 
Php :: php artisan insert user with tinker 
Php :: substract two datetime and get the different hours and minutes php 
Php :: last item coma replace and php 
ADD CONTENT
Topic
Content
Source link
Name
6+3 =