Changeset 3563
- Timestamp:
- 12/22/2010 02:46:17 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-templatetags.php
r3525 r3563 611 611 612 612 // Add the delete link if the user has permission on this item 613 if ( ( is_user_logged_in() && $activities_template->activity->user_id == $bp->loggedin_user->id ) || $bp->is_item_admin || $bp->loggedin_user->is_super_admin)613 if ( bp_activity_user_can_delete() ) 614 614 $content .= apply_filters( 'bp_activity_delete_link', ' · ' . bp_get_activity_delete_link(), $activities_template->activity ); 615 615 616 616 return apply_filters( 'bp_insert_activity_meta', $content ); 617 617 } 618 619 function bp_activity_user_can_delete() { 620 global $activities_template, $bp; 621 622 if ( !is_user_logged_in() ) 623 $can_delete = false; 624 625 if ( $bp->loggedin_user->is_super_admin ) 626 $can_delete = true; 627 628 if ( $activities_template->activity->user_id == $bp->loggedin_user->id ) 629 $can_delete = true; 630 631 if ( $bp->is_item_admin && $bp->is_single_item ) 632 $can_delete = true; 633 634 return apply_filters( 'bp_activity_user_can_delete', $can_delete ); 635 } 618 636 619 637 function bp_activity_parent_content( $args = '' ) {
Note: See TracChangeset
for help on using the changeset viewer.