Change validation criteria when creating new blogs on wp-signup.php
-
I’m about to create a plugin that changes the validation criterias in the wp-signup.php
My approach is to create a plugin that hooks a filter to the wpmu_validate_blog_signup hook and modifies the WP_Error object that comes from the wpmu_validate_blog_signup function.
Something like this:
function filter_new_signup_criterias($content) { // Check if the error exist // If the error exist, remove it and revalidate with 2 characters. // Add a new error if the current blogname is shorter than 2 characters. } add_filter('wpmu_validate_blog_signup','filter_new_signup_criterias');
What I can’t understand (maybe it’s not possible?) is how to remove an existing error from the WP_Error object?
In my case I would like to remove the error with error code: “blogname” and error message: “Site name must be at least 4 characters” and change the criteria so that it can take blog names with only 2 characters.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Change validation criteria when creating new blogs on wp-signup.php’ is closed to new replies.