[buddypress-trac] [BuddyPress] #5130: Synchronizing activity comments to main component

buddypress-trac noreply at wordpress.org
Sun Aug 11 16:00:45 UTC 2013


#5130: Synchronizing activity comments to main component
-------------------------+--------------------
 Reporter:  r-a-y        |       Owner:  r-a-y
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  1.9
Component:  Core         |     Version:  1.2
 Severity:  normal       |  Resolution:
 Keywords:               |
-------------------------+--------------------

Comment (by boonebgorges):

 > Any benefit to doing it this way vs. the patch?

 One reason for doing it r-a-y's way is to keep the components separate.
 `bp_activity_new_comment()` shouldn't make any reference to the Blogs
 component. The way r-a-y has it set up, Blogs (and Forums, and whatever
 other component might want to do something similar) will just hook to the
 generic 'bp_activity_comment_posted' action, keeping things independent.

 Either way, there's some "bailing out" required. As r-a-y has it
 configured, we have to bail from running `bp_blogs_record_comment()` for
 WP Comments created this way. If we went with your model, we'd need to put
 some sort of bailout into `bp_activity_new_comment()` - maybe something
 like:

 {{{
 $pre = apply_filters( 'bp_activity_new_comment_pre', false );
 if ( $pre !== false ) {
   return $pre;
 }
 }}}

 (Sorta like update_metadata() etc work.) But this seems to be more
 confusing than keeping everything on the same hook at the end of the
 function, at least IMO.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5130#comment:6>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list