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

WordPress Trac noreply at wordpress.org
Wed Jul 13 14:39:43 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 jtsternberg):

 Replying to [comment:112 jeremyfelt]:
 > `add_metadata()` does not currently support an `$object_subtype`
 parameter. A new style sanitize filter will not be triggered because
 `add_metadata()` calls `sanitize_meta()` without the object subtype as
 well. We need to add subtype into this part of the process.
 [attachment:35658.39.diff] does this, though 6 parameters on `add_meta()`
 seems like it's stretching it. :/

 This makes the Object_Type and colon-separated object-type schema sound
 even more appealing. Now multiply this x every function/filter/etc where
 you now how to take into account a sub-type, or possibility for a sub-
 type. Retrofitting the existing type parameter w/ optional colon-
 separated-sub-type makes a ton of sense to me.

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


More information about the wp-trac mailing list