You are not using the registration_errors hook properly. It should look like this:
add_filter( 'registration_errors', 'reg_user_register', 10, 3);
function reg_user_register($errors, $sanitized_user_login, $user_email){
$custom_reg_field1 = $_POST["custom_reg_field1"];
// add error checking here
if ( empty($custom_reg_field1) ) {
$errors->add('custom_reg_field1', __( 'Please enter a reg_field1.' ) );
}
return $errors;
}
Related Posts:
- How to include code only on specific pages?
- Schedule WordPress Auto-Updates to only run during business hours
- Remove action from plugin on other plugin
- Preventing a plugin from updating
- How To Determine If A Filter Is Called In A Sidebar/Widget Context?
- Is there any debug toolbar that shows whick hooks are called for the current page in WordPress?
- When can you get current page ID and initialize hooks right after?
- WordPress admin notice in plugin function
- Using the ‘draft_to_publish’ hook (post status transition)
- Filter Hook on plugin update
- WordPress Hook that will run when media file deleted
- Disallow a user to post in certain categories
- Generic plugin (de)activation hook?
- Adding a form at the end of the content
- Use external link in the add sub menu
- Failed to invoke other hook from the init hook
- How can I add a custom meta value on file upload?
- How can I filter blog name?
- why does the add_action(‘the_content’) overwrite my page
- Fatal error: Class not found in
- Showing Notifications While Activating Plugin
- Is it possible to remove this action? (as it’s added just before it’s called)
- Woocommerce Shipping module available only for type of products [closed]
- WordPress Plugin Boilerplate – add_action hook in static “activate” function
- Put code into body tags near top, using a plugin
- Hook before & after plugin / core update
- publish_post plugin hook doesn’t always pass $post->post_content
- get_plugins() doesn’t work after plugins_loaded
- add_action in functions.php, do_action in plugin?
- add action for displaying posts using a shortcode
- Randomize attachment IDs
- ‘wp_login’ action hook not working with wp-login.php file
- Are there hooks for WordPress updates?
- Pass info from functions.php to plugin
- Plugin activation hook in an abstract class
- Remove rewrite rules generated by plugin during deactivation
- Change permalink structure hidden button edit
- Where (or when) should I register a new taxonomy?
- WordPress filter that hook after each action/filter hook
- When to use action hooks and plugins
- Hook (or other way) to find out when another plugin is activated / installed
- Is there an earlier hook than login_head or login_enqueue_scripts?
- Gravity Forms plugin: How to use “gform_editor_js” action hook? [closed]
- Inserting above the comment template
- Insert new user with form submit ‘init’ hook
- Map a custom id to wordpress post id
- Calling plugin function inside custom plugin for onclick event
- get current date + 90 days and checking every day
- Calculate price and display on woocommerce product single page under price (simple price, variable price) [closed]
- Hook into existing tinyMCE button
- How to get post ID with hooks publish_post, new_to_publish, etc
- edit_user_profile and show_user_profile are not firing inside a class
- Template filter for custom taxonomy terms
- What exactly happens to function argument availability when using a filter?
- Combining several CSS files into one for optimization
- the_post hook is not firing for me
- Create a post builder skin in a plugin
- Plugin Development – Functions or Hooks?
- How do I add some javascript validation to the admin interface form’s onsubmit?
- Hook for page Request?
- How to remove js ui library added by default by wordpress
- Add item to the woocommerce dashboard menu from a plugin
- How to use the pre_option filter before a plugin loads?
- How do I add $_SESSION[”] to my wordpress page?
- WordPress: Add custom add_filter for custom functions
- How to remove a class function from a plugin by using remove_action()?
- profile_update hook doesn’t works inside a class
- Plugin: Hooking up classes that have their own hooks
- Hook for altering the content of all wp mails
- What hook can I use to modify custom post data before it is displayed on the page?
- Quick press publish post hook
- How to deactivate my plugin upon deactivation of NextGen
- Creating a plugin that will display text on every page
- Hook for plugin to insert into entry-meta
- Why does “updated_post_meta” did not fire when uploading media other than image?
- Build a must-use plugin that tracks when other plugins are activated or deactivated
- Change Dashboard URL from wp-admin to wp-admin/index.php
- Activation flow of a plugin in a multisite environment
- Callback hooked to post_updated firing on new posts as well
- Randomize post (and page) IDs on generation
- My plugin runs on every single WordPress page, but I want it to run only on activation
- The function called on the wp head hook becomes null
- front end editor creation for Restropress plug in – displaying information from a WP admin area, on a different URL
- Replace plugin HTML to single text using hooks
- How can I disable W3 Total Cache Image Lazy Load for Specific Post Type?
- Customize plugin templates
- wordpress plugin translation not working
- Hook on widget context plugin to add custom context for widget
- wp_login_form() ignoring login_form action hook
- Admin page and admin menu. Permissions plugin
- How should I use a plugin function as a hook?
- change output location of plugin function using a custom hook
- Plugin constructor called multiple times
- How to change value of $menu_class in ep_nav_menu?
- Variable scope in plugin outside loop [closed]
- Checking url from plugin [duplicate]
- How to display a link in the footer section
- User register hook can’t access form request
- Can’t use updated variables in handle function
- Neither update_option nor delete_option fires in deactivation hook