[buddypress-trac] [BuddyPress Trac] #5399: Review metadata functions for irregularities

buddypress-trac noreply at wordpress.org
Fri Mar 14 01:04:59 UTC 2014


#5399: Review metadata functions for irregularities
--------------------------+---------------------------
 Reporter:  boonebgorges  |       Owner:  boonebgorges
     Type:  enhancement   |      Status:  assigned
 Priority:  normal        |   Milestone:  2.0
Component:  Core          |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  2nd-opinion   |
--------------------------+---------------------------

Comment (by boonebgorges):

 In [changeset:"8133"]:
 {{{
 #!CommitTicketReference repository="" revision="8133"
 Use WP's array format for get_meta() functions when no $meta_key is
 provided

 Passing only an object_id to a get_meta() function in WP will return an
 array
 of arrays, keyed by meta_keys, each containing a list of meta_values for
 that
 meta_key. BP's get_meta() functions were inconsistent in this regard: some
 returned arrays of stdClass, some returned one-d arrays of meta_values.
 All
 returned values that were practically of little use, because they didn't
 have
 enough information about the located data to make it useful.

 This changeset aligns BP's get_meta() functions with WP's. We now allow
 the
 return value of get_metadata() to pass through untouched in all cases.
 Unit
 tests have been updated as necessary.

 See #5399
 }}}

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5399#comment:11>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list