[wp-trac] [WordPress Trac] #28092: Ability to filter or remove error codes from WP_Error class
WordPress Trac
noreply at wordpress.org
Thu May 1 21:08:03 UTC 2014
#28092: Ability to filter or remove error codes from WP_Error class
------------------------------------+------------------------------
Reporter: AdamCapriola | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Login and Registration | Version: 2.1
Severity: normal | Resolution:
Keywords: reporter-feedback | Focuses:
------------------------------------+------------------------------
Comment (by SergeyBiryukov):
Replying to [comment:2 AdamCapriola]:
> I am filtering the username validation and want to give a more specific
error message to the registrant than "ERROR: This username is invalid
because it uses illegal characters. Please enter a valid username." when
the username is invalid. It would be nice if I could remove that error
message since it becomes extraneous.
You can just add `unset( $errors->errors['invalid_username'] )` to your
`ac_registration_errors()` function.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28092#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list