[buddypress-trac] [BuddyPress Trac] #7333: Make it easier for developers to add data to core classes

buddypress-trac noreply at wordpress.org
Mon Nov 7 03:35:55 UTC 2016


#7333: Make it easier for developers to add data to core classes
--------------------------+-----------------------------
 Reporter:  boonebgorges  |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Core          |    Version:
 Severity:  normal        |   Keywords:  2nd-opinion
--------------------------+-----------------------------
 See #7290. Our move to split queries has made it more difficult than it
 already was to modify core objects.

 One idea is to fire an action at the end of each object's `populate()`
 method:

 {{{
 do_action( 'bp_groups_group_populate', $this );
 }}}

 This change may have weird repercussions as we move toward improved OOP
 for BP objects. For example, our inline documentation will no longer be a
 reliable guarantee of the properties available on an object. But perhaps
 there are technical limitations we could put in place (like black-box
 magic methods) that would help us to work around this, while still
 allowing developers to modify defined properties on the fly.

 To reiterate, I don't think it's critical that we allow developers to add
 new properties to these objects, as is being requested in #7290. In that
 case, it'd be just as easy for plugins to stash their stuff elsewhere for
 use in the loop. But there are definitely legitimate use cases for
 modifying existing properties.

 Does anyone have thoughts about this?

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7333>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list