Opened 14 years ago
Closed 14 years ago
#2530 closed defect (bug) (fixed)
Filters needed for Activity Comment templatetags (and ajax.php)
Reported by: | nuprn1 | Owned by: | |
---|---|---|---|
Milestone: | 1.5 | Priority: | normal |
Severity: | Version: | ||
Component: | Activity | Keywords: | |
Cc: |
Description
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 .= ' · <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
Change History (4)
Note: See
TracTickets for help on using
tickets.
same filter needed under ajax.php