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

WordPress Trac noreply at wordpress.org
Fri Jul 15 19:02:42 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 MikeSchinkel):

 Replying to [comment:121 jeremyfelt]:
 > To retrieve individual registered meta for a custom post type **and**
 have it pass through registered sanitize/auth callbacks, a developer would
 need to use `get_metadata( 'post:books', .... )` instead of
 `get_post_meta()` *unless* we add another parameter for subtype to
 `get_post_meta()`.

 Any reason that `get_post_meta()` cannot effectively be:

 {{{
 function get_post_meta( $post_type, ... )
    return get_metadata( "post:{post_type}", .... );
 }
 }}}

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


More information about the wp-trac mailing list