Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/12/2011 02:39:11 AM (15 years ago)
Author:
johnjamesjacoby
Message:

Audit the usage of $bp->groups->slug. See #3325.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-groups/bp-groups-classes.php

    r4618 r4648  
    11801180        if ( $this->visibility == 'public' || ( $this->visibility != 'public' && $bp->groups->current_group->user_has_access ) ) {
    11811181            if ( $this->enable_nav_item ) {
    1182                 if ( bp_is_current_component( 'groups' ) && $bp->is_single_item ) {
     1182                if ( bp_is_groups_component() && $bp->is_single_item ) {
    11831183                    bp_core_new_subnav_item( array( 'name' => ( !$this->nav_item_name ) ? $this->name : $this->nav_item_name, 'slug' => $this->slug, 'parent_slug' => $bp->groups->current_group->slug, 'parent_url' => bp_get_group_permalink( $bp->groups->current_group ), 'position' => $this->nav_item_position, 'item_css_id' => 'nav-' . $this->slug, 'screen_function' => array( &$this, '_display_hook' ), 'user_has_access' => $this->enable_nav_item ) );
    11841184                }
    11851185
    11861186                // When we are viewing the extension display page, set the title and options title
    1187                 if ( bp_is_current_component( 'groups' ) && $bp->is_single_item && $bp->current_action == $this->slug ) {
     1187                if ( bp_is_groups_component() && $bp->is_single_item && $bp->current_action == $this->slug ) {
    11881188                    add_action( 'bp_template_content_header', create_function( '', 'echo "' . esc_attr( $this->name ) . '";' ) );
    11891189                    add_action( 'bp_template_title', create_function( '', 'echo "' . esc_attr( $this->name ) . '";' ) );
     
    11921192
    11931193            // Hook the group home widget
    1194             if ( bp_is_current_component( 'groups' ) && $bp->is_single_item && ( !$bp->current_action || 'home' == $bp->current_action ) )
     1194            if ( bp_is_groups_component() && $bp->is_single_item && ( !$bp->current_action || 'home' == $bp->current_action ) )
    11951195                add_action( $this->display_hook, array( &$this, 'widget_display' ) );
    11961196        }
     
    12011201
    12021202            // Catch the edit screen and forward it to the plugin template
    1203             if ( bp_is_current_component( 'groups' ) && bp_is_current_action( 'admin' ) && !empty( $bp->action_variables[0] ) && $this->slug == $bp->action_variables[0] ) {
     1203            if ( bp_is_groups_component() && bp_is_current_action( 'admin' ) && !empty( $bp->action_variables[0] ) && $this->slug == $bp->action_variables[0] ) {
    12041204                // Check whether the user is saving changes
    12051205                $this->edit_screen_save();
Note: See TracChangeset for help on using the changeset viewer.