Skip to content

Instantly share code, notes, and snippets.

@octalmage
Last active September 15, 2016 10:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save octalmage/6b43fef11b7576f60ba1 to your computer and use it in GitHub Desktop.
Save octalmage/6b43fef11b7576f60ba1 to your computer and use it in GitHub Desktop.
This fixes 403s for ajax login plugins.
<?php
/**
* Plugin Name: Fix Ajax Login on WP Engine.
* Description: Removes the wpe_login_failed_403 action.
* Version: 0.1
* Author: Jason Stallings
*/
// Prevent direct access to this file
if ( ! defined( 'ABSPATH' ) ) {
die( "You can't do anything by accessing this file directly." );
}
//Remove our action that 403s on failed login.
add_action( 'plugins_loaded', 'jstall_remove_login_failed');
function jstall_remove_login_failed()
{
remove_action( "wp_login_failed", "wpe_login_failed_403");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment