There is no login_post action that I know of – use the authenticate filter instead, inside wp_authenticate(), called by wp_signon():
function wpse_185339_check_user_answer( $user ) {
if ( $_SERVER['REQUEST_METHOD'] === 'POST' ) {
if ( empty( $_POST[ 'user_proof' ] ) ) {
$user = new WP_Error( 'proofempty', '<strong>ERROR</strong>: You did not answer the proof-of-humanship question.' );
} elseif ( strtolower( $_POST[ 'user_proof' ] ) !== 'white' ) {
$user = new WP_Error( 'prooffail', '<strong>ERROR</strong>: You did not answer the proof-of-humanship question correctly.' );
}
}
return $user;
}
add_filter( 'authenticate', 'wpse_185339_check_user_answer', 100 );
Related Posts:
- How to do I get a list of active plugins on my wordpress blog programmatically?
- How to add field for new site-wide option on Network Settings screen?
- How to tell if a plugin is multisite compatible?
- WordPress sharding: which multi-DB plugin to use?
- How to get the main blog’s id and db prefix from a mu plugin?
- What is a Network Activated Plugin Exactly?
- How to run Two WordPress blogs with different themes and with single database and same content
- Using Vagrant for customizable WordPress Multi-sites [closed]
- Sharing Ad Revenue among Users of a Multisite in a Collaborative Model?
- While using WordPress Multisite is it possible to display data to main site from subsites?
- Prevent multisite sites from using a plugin
- Is it possible to run plugin code when a multisite blog is deleted?
- Multi domain, multi sites with different themes and content
- Getting Custom Post Type content from main-site of a Multisite
- How do I add a widget programmatically to a newly created site (WPMU) within a plugin?
- Duplicate settings of master blog to slave blogs in WP multi-site installation
- How can I list only sites that use a particular theme or plugin?
- Aggregate Summaries of Posts of Different Blogs in Multisite Instance
- Posts wont expire
- Multisite functions to communicate with individual site functions
- WordPress network: set themes and plugins for new blog
- Unique post-id for WordPress Multisite Network
- Duplicate a Multi-Site Subdomain
- How to get last_updated and newest_blogs in WP 3.0
- Display All Non-Used Plugins
- Having separate plugins and themes folder for multi-site setup
- Creating Custom Roles for use on a WordPress Multi-site Instance?
- Remove filter from WordPress Plugin
- What Plugin Do You Use to Turn WordPress based site to A Blog Aggregator
- Check if User exists in WordPress Multisite
- Plugin to list active plugins across networked sites
- Exclude plugins on Main site on Multisite installation?
- How to hide plugin from WordPress Multisite admin plugin list
- Is the wordpress user-model changed in wpmu?
- Network: retrieve a list of latest posts
- Unable to install theme recommended plugins on Multisite
- How to add class in plugin only for network site?
- How to make an interface similar to multi-site for switching between multiple (single) sites for administrators?
- How to write a plugin to add users to a mail list
- My Category is too big on the Menu what can i do?
- WordPress Multisite user activation hook from email
- Best method to upgrade multisite plugin’s numerous database table
- WordPress on AWS with ELB
- Solutions to repost categories into multisite blogs?
- Media is not attached after import
- Any recommendation on how to manage ads?
- Plugins not showing in Multisite dashboard
- How can I force users to a particular subdomain to log in for MU (Multisite)?
- Does any one have Idea to get these functionalities with the plugin wp-multi-network
- There is any way to remove post-format filter? [closed]
- WordPress multi domain – redirect
- How to create user that has permission to create new sites on WordPress with multisite option enabled?
- Setup page on first login on multisite
- Subdomains with almost the same content
- Uninstalling plugins across all sites
- Custom table naming/access convention for multisite: $table_prefix vs base_prefix or other?
- Users are being redirected to main site when trying to register on subsite of my Multisite network
- Create a single website with 3 theme options in wordpress
- Understanding State in WordPress Multisites
- One sub site is slow while all others load fine, same theme & plugins [closed]
- How to display terms and conditions in post area?
- How to check wp_options’s rewrite_rules if current and existing are the same before flush the rules?
- How to integrate together a website currently hosted WordPress.com and a custom web application currently hosted on Azure?
- WordPress super admin login issue. (Automatically logout)
- How to remove a CPT Menu from the Root Admin only
- Hosting multiple sites
- Cannot add edit themes and add plugins after multisite update
- how to make a wplang for network fill automatically
- Multisite Plugin – Access options (wp_options) on child sites
- Plugin to create unlimited custom shortcodes?
- Constructing a Pay to Download music website with wordpress
- In a WPMU that uses several different domains, how to enable users to register subdomains of any domain from the main site?
- Multisite Change from domain.com to sub.newdomain.com
- WP Forms not displaying,becomming an fatal error
- Can I edit multiple sites with an online WordPress account?
- disable plugin activation on no multisite
- Fatal error: require_once(): Failed opening required
- Creating one user access account for all the multiple sites
- Multisite converted to Single Site can’t add new plugins or new themes
- Copying content from my other websites
- how to add navigation icons in specific template?
- Category as Subdomain for One WP Install
- Update javascript URL in header – Domain Mapping Plugin [closed]
- How to Call Function From Separate WordPress Install on Same Server?
- Coming soon pages with rest of site in maintenance mode
- Query Shortcode from a multisite to appear on a different site?
- How to enable Admins to see Plugins
- How do plugin updates work?
- Automatization for automatization
- Multiple Accounts on 1 email – Multisite
- Is there going to an issue running different features of WP site in different subdomains?
- Plugin on all site except primary one
- Check if user is in a group of another site within multisite network [closed]
- Integrating planning tools in wordpress
- WordPress multisite haml templates
- Pulling sub-site content into specific pages
- Frontpage Admin Bar Disappeared
- turn off WooCommerce for a site in a multi site environment
- Change email notification language based on the site language in WPForms
- Change homepage logo for each site multisite setup