[buddypress-trac] [BuddyPress] #5153: Add hooks to modify display of entire comment

buddypress-trac noreply at wordpress.org
Mon Sep 2 18:20:28 UTC 2013


#5153: Add hooks to modify display of entire comment
-------------------------+------------------
 Reporter:  lchski       |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  1.9
Component:  Theme        |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  needs-patch  |
-------------------------+------------------

Comment (by r-a-y):

 > it'd be great to have a hook that could be used to modify the content of
 just one comment, ignoring its children.

 If you are manipulating this with hooks, then I believe you can just check
 the current activity comment ID before doing your manipulation.

 eg.

 {{{

 function my_add_div_to_specific_activity_comment() {

         // add a open <div> element if the activity comment ID equals 1
         if ( bp_get_activity_comment_id() == 1 ) {
                 echo '<div>';
         }

 }
 add_action( 'bp_before_activity_comment',
 'my_add_div_to_specific_activity_comment' );
 }}}

 You'll have to use the same logic when closing the `<div>` as well.

 Let me know if this is enough to address your issue.

 ----

 Although, I do agree with this:
 > This would mean putting the first hook before .acomment-avatar, and the
 second hook after .accomment-options.

 These would have to be new hooks.  We can't move existing hooks due to
 backwards-compatibility reasons.

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


More information about the buddypress-trac mailing list