Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/09/2012 11:00:59 PM (13 years ago)
Author:
johnjamesjacoby
Message:

Audit the usage of $bp->is_item_admin and $bp->is_item_mod to use the _is_ functions isntead. Also fix some $bp globals in the process. See #3989.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-forums/bp-forums-template.php

    r5480 r5687  
    775775}
    776776    function bp_get_the_topic_is_mine() {
    777         global $bp, $forum_template;
     777        global $forum_template;
    778778
    779779        return bp_loggedin_user_id() == $forum_template->topic->topic_poster;
     
    784784}
    785785    function bp_get_the_topic_admin_links( $args = '' ) {
    786         global $bp, $forum_template;
     786        global $forum_template;
    787787
    788788        $defaults = array(
     
    795795        $links[] = '<a href="' . wp_nonce_url( bp_get_the_topic_permalink() . 'edit', 'bp_forums_edit_topic' ) . '">' . __( 'Edit Topic', 'buddypress' ) . '</a>';
    796796
    797         if ( $bp->is_item_admin || $bp->is_item_mod || bp_current_user_can( 'bp_moderate' ) ) {
     797        if ( bp_is_item_admin() || bp_is_item_mod() || bp_current_user_can( 'bp_moderate' ) ) {
    798798            if ( 0 == (int)$forum_template->topic->topic_sticky )
    799799                $links[] = '<a href="' . wp_nonce_url( bp_get_the_topic_permalink() . 'stick', 'bp_forums_stick_topic' ) . '">' . __( 'Sticky Topic', 'buddypress' ) . '</a>';
Note: See TracChangeset for help on using the changeset viewer.