Skip to:
Content

BuddyPress.org

Opened 12 years ago

Closed 12 years ago

#2530 closed defect (bug) (fixed)

Filters needed for Activity Comment templatetags (and ajax.php)

Reported by: nuprn1's profile 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 .= ' &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

Change History (4)

#1 @nuprn1
12 years ago

same filter needed under ajax.php

function bp_dtheme_new_activity_comment() {

#2 @paulhastings0
12 years ago

+1 for this functionality.

#3 @johnjamesjacoby
12 years ago

  • Milestone changed from 1.2.6 to 1.3

As much as I'd love to change this for 1.2.6, this needs more attention for 1.3 than should be put into a bug fix release.

Bumping to 1.3.

#4 @boonebgorges
12 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [3525]) Adds apply_filters() to activity comment Reply and Delete links. Fixes #2530

Note: See TracTickets for help on using tickets.