Changeset 2753
- Timestamp:
- 02/20/2010 12:32:00 PM (15 years ago)
- Location:
- branches/1.2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.2/bp-activity/bp-activity-templatetags.php
r2750 r2753 460 460 } 461 461 462 function bp_activity_has_content() { 463 global $activities_template; 464 465 if ( !empty( $activities_template->activity->content ) ) 466 return true; 467 468 return false; 469 } 470 462 471 function bp_activity_content() { 463 472 echo bp_get_activity_content(); … … 574 583 575 584 /* Delete link */ 576 if ( is_site_admin()|| $bp->loggedin_user->id == $comment->user_id )585 if ( $bp->loggedin_user->is_site_admin || $bp->loggedin_user->id == $comment->user_id ) 577 586 $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>'; 578 587 -
branches/1.2/bp-core.php
r2745 r2753 106 106 /* The core userdata of the user who is currently logged in. */ 107 107 $bp->loggedin_user->userdata = bp_core_get_core_userdata( $bp->loggedin_user->id ); 108 109 /* is_site_admin() hits the DB on single WP installs, so we need to get this separately so we can call it in a loop. */ 110 $bp->loggedin_user->is_site_admin = is_site_admin(); 108 111 109 112 /* The user id of the user currently being viewed, set in /bp-core/bp-core-catchuri.php */ -
branches/1.2/bp-themes/bp-default/activity/entry.php
r2692 r2753 16 16 </div> 17 17 18 <?php if ( bp_ get_activity_content_body() ) : ?>18 <?php if ( bp_activity_has_content() ) : ?> 19 19 <div class="activity-inner"> 20 20 <?php bp_activity_content_body() ?>
Note: See TracChangeset
for help on using the changeset viewer.