[wp-trac] [WordPress Trac] #21907: Allow custom errors on login when using XML-RPC
WordPress Trac
wp-trac at lists.automattic.com
Tue Sep 18 15:26:06 UTC 2012
#21907: Allow custom errors on login when using XML-RPC
-------------------------------------------------+-------------------------
Reporter: koke | Owner: westi
Type: feature request | Status: accepted
Priority: normal | Milestone: 3.5
Component: XML-RPC | Version: trunk
Severity: normal | Resolution:
Keywords: mobile westi-likes has-patch dev- |
feedback |
-------------------------------------------------+-------------------------
Comment (by JustinSainton):
Actually, unless I'm mis-reading something, all of the errors returned by
wp_authenticate_username_password contain HTML (at least the <strong>
ERROR: </strong>, if not also a link). All of them except for
blog_suspended, at least.
Any thoughts on approach? Could preg_replace or strip_tags - but both
would end up hacky. We could map the error codes to non-HTML versions.
Or we could just keep it as-is.
FWIW, the reason I used the filter in my initial approach rather than
Sergey's approach was because my understanding was that you needed to add
a custom error message for an application key, rather than return the
message directly from the WP_Error object.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21907#comment:8>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list