Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/20/2010 12:32:00 PM (14 years ago)
Author:
apeatling
Message:

Fixed duplicate database hits when calling is_site_admin() in a loop on single WP installs. Fixed duplicate call to bp_activity_content_body() causing issues with filters.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.2/bp-activity/bp-activity-templatetags.php

    r2750 r2753  
    460460    }
    461461
     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
    462471function bp_activity_content() {
    463472    echo bp_get_activity_content();
     
    574583
    575584                /* 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 )
    577586                    $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>';
    578587
Note: See TracChangeset for help on using the changeset viewer.