[buddypress-trac] [BuddyPress Trac] #6358: Query methods should return arrays of BP objects

buddypress-trac noreply at wordpress.org
Wed Oct 7 14:30:32 UTC 2015


#6358: Query methods should return arrays of BP objects
-------------------------------+-----------------------------
 Reporter:  boonebgorges       |       Owner:
     Type:  enhancement        |      Status:  new
 Priority:  normal             |   Milestone:  Future Release
Component:  API                |     Version:  1.0
 Severity:  normal             |  Resolution:
 Keywords:  needs-patch early  |
-------------------------------+-----------------------------

Comment (by boonebgorges):

 In [changeset:"10198"]:
 {{{
 #!CommitTicketReference repository="" revision="10198"
 Introduce cache support for xprofile fields.

 `xprofile_get_field()` will now look in the cache before returning a
 `BP_XProfile_Field` object (via the new
 `BP_XProfile_Field::get_instance()`),
 and will populate the cache if necessary. It's strongly recommended to use
 `xprofile_get_field()` when fetching individual existing fields, instead
 of
 creating new `BP_XProfile_Field` objects directly.

 `BP_XProfile_Group::get()` now leverages the field cache too. Instead of a
 `SELECT *` query, it fetches a list of matching field IDs `SELECT id`, and
 populates the full field objects from the cache, if available. The
 `fields`
 property of `BP_XProfile_Group` objects is now an array of
 `BP_XProfile_Field`
 objects, not `stdClass`. See #6358.

 Props boonebgorges, r-a-y.
 See #6638.
 }}}

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


More information about the buddypress-trac mailing list