[wp-trac] [WordPress Trac] #19919: Do not work сustom fields in XML-RPC

WordPress Trac wp-trac at lists.automattic.com
Mon Jan 30 05:29:54 UTC 2012


#19919: Do not work сustom fields in XML-RPC
--------------------------+------------------------------
 Reporter:  xpert13       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  XML-RPC       |     Version:  3.3.1
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+------------------------------

Comment (by nacin):

 A custom field that starts with an underscore does not pass this check. It
 is considered "protected" and cannot be modified through any UI, which
 includes a generic XML-RPC method.

 If you wish to whitelist a custom field, you can use register_meta(). This
 takes a meta type (i.e. "post"), the meta key, a function to sanitize the
 value on save (similar to the sanitization callback for
 register_setting()) and an authorization callback to determine whether a
 user can edit_post_meta, add_post_meta, or delete_post_meta.

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


More information about the wp-trac mailing list