[buddypress-trac] [BuddyPress] #2530: Filters needed for Activity Comment templatetags (and ajax.php)

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Wed Jul 14 14:48:03 UTC 2010


#2530: Filters needed for Activity Comment templatetags (and ajax.php)
----------------------+-----------------------------------------------------
 Reporter:  nuprn1    |       Owner:       
     Type:  defect    |      Status:  new  
 Priority:  normal    |   Milestone:  1.2.6
Component:  Activity  |    Keywords:       
----------------------+-----------------------------------------------------
 Comparing bp_insert_activity_meta to the activity comments template tags.
 Certain filters are applied (ie, bp_activity_delete_link) to the parent
 activity. But for the comments the same filter should be applied to the
 delete link (see the case: http://buddypress.org/community/groups/how-to-
 and-troubleshooting/forum/topic/hidng-the-delete-link-from-members-in-the-
 activity-stream/#post-633966 )

 Activity Parent:
 {{{

                 /* Add the delete link if the user has permission on this
 item */
                 if ( ( is_user_logged_in() &&
 $activities_template->activity->user_id == $bp->loggedin_user->id ) ||
 $bp->is_item_admin || $bp->loggedin_user->is_site_admin )
                          $content .= apply_filters(
 'bp_activity_delete_link', ' · ' . bp_get_activity_delete_link(),
 &$activities_template->activity );

 }}}


 vs

 Activity Comments:
 {{{
                                 /* Delete link */
                                 if ( $bp->loggedin_user->is_site_admin ||
 $bp->loggedin_user->id == $comment->user_id )
                                         $content .= ' &middot; <a href="'
 . wp_nonce_url( $bp->root_domain . '/' . $bp->activity->slug .
 '/delete/?cid=' . $comment->id, 'bp_activity_delete_link' ) . '"
 class="delete acomment-delete">' . __( 'Delete', 'buddypress' ) . '</a>';
 }}}

 Also a permalink would be nice within each comment too

-- 
Ticket URL: <http://trac.buddypress.org/ticket/2530>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list