[wp-trac] [WordPress Trac] #35658: Provide additional data for registered meta through register_meta()

WordPress Trac noreply at wordpress.org
Thu Jul 14 23:59:29 UTC 2016


#35658: Provide additional data for registered meta through register_meta()
-------------------------------------------------+-------------------------
 Reporter:  jeremyfelt                           |       Owner:  helen
     Type:  task (blessed)                       |      Status:  accepted
 Priority:  high                                 |   Milestone:  4.6
Component:  Options, Meta APIs                   |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  needs-unit-tests needs-testing has-  |     Focuses:
  patch rest-api needs-dev-note                  |
-------------------------------------------------+-------------------------

Comment (by jeremyfelt):

 With the latest patch, if meta is registered with `register_meta( 'post',
 'key', array( 'sanitize_callback' => 'etc' ) );`, then `add_post_meta()`
 would not run the `sanitize_post:post_meta_key` filter, even though
 registration handled it fine. Instead, `add_metadata( 'post:post' .... )`
 would be needed. This is due to the automatic fallback for core object
 types and is something we need to figure out. :)

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35658#comment:122>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list