[wp-trac] [WordPress Trac] #11474: Add validation error reporting system to Settings API

WordPress Trac wp-trac at lists.automattic.com
Tue Feb 16 19:39:27 UTC 2010


#11474: Add validation error reporting system to Settings API
----------------------------+-----------------------------------------------
 Reporter:  jeremyclarke    |       Owner:  jeremyclarke           
     Type:  enhancement     |      Status:  new                    
 Priority:  high            |   Milestone:  3.0                    
Component:  Administration  |     Version:  2.9                    
 Severity:  normal          |    Keywords:  has-patch needs-testing
----------------------------+-----------------------------------------------

Comment(by jeremyclarke):

 I spent some time trying to integrate WP_Error class into this system but
 its not very well designed for this purpose. Specifically, the raw data it
 saves is organized but inconvenient to access, and there is no display
 function to show errors.

 After investigating how WP_Error errors are shown in the admin I found the
 show_message() function which is sometimes used by core but is flimsy and
 insufficient for working with complex WP_Error objects. Ticket #12254 is
 an outline of how show_message can be fixed to work with any WP_Error
 object and make showing errors from inside very simple. If a patch to that
 ticket was committed I think integrating WP_Error into the settings API
 would make a lot more sense.

 For now I think its better off the way it is and should be committed in
 this format. If/when show_message is updated it will be easy and back-
 compatible to convert it to use WP_Error.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/11474#comment:10>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list