Skip to:
Content

BuddyPress.org

Changeset 6987


Ignore:
Timestamp:
05/01/2013 07:20:08 PM (13 years ago)
Author:
boonebgorges
Message:

Whitespace and coding standards in BP_Group_Extension::_register(). See #4955

File:
1 edited

Legend:

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

    r6986 r6987  
    14431443        // If admin/create names and slugs are not provided, they fall back on the main
    14441444        // name and slug for the extension
    1445         if ( !$this->admin_name ) {
     1445        if ( ! $this->admin_name ) {
    14461446            $this->admin_name = $this->name;
    14471447        }
    14481448
    1449         if ( !$this->admin_slug ) {
     1449        if ( ! $this->admin_slug ) {
    14501450            $this->admin_slug = $this->slug;
    14511451        }
    14521452
    1453         if ( !$this->create_name ) {
     1453        if ( ! $this->create_name ) {
    14541454            $this->create_name = $this->name;
    14551455        }
    14561456
    1457         if ( !$this->create_slug ) {
     1457        if ( ! $this->create_slug ) {
    14581458            $this->create_slug = $this->slug;
    14591459        }
    14601460
    1461         if ( !empty( $this->enable_create_step ) ) {
     1461        if ( ! empty( $this->enable_create_step ) ) {
    14621462            // Insert the group creation step for the new group extension
    1463             $bp->groups->group_creation_steps[$this->create_slug] = array( 'name' => $this->create_name, 'slug' => $this->create_slug, 'position' => $this->create_step_position );
     1463            $bp->groups->group_creation_steps[ $this->create_slug ] = array(
     1464                'name'     => $this->create_name,
     1465                'slug'     => $this->create_slug,
     1466                'position' => $this->create_step_position,
     1467            );
    14641468
    14651469            // Attach the group creation step display content action
     
    14741478            if ( $this->visibility == 'public' || ( $this->visibility != 'public' && $bp->groups->current_group->user_has_access ) ) {
    14751479                if ( $this->enable_nav_item ) {
    1476                     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 ) );
     1480                    bp_core_new_subnav_item( array(
     1481                        'name' => !$this->nav_item_name ? $this->name : $this->nav_item_name,
     1482                        'slug' => $this->slug,
     1483                        'parent_slug' => $bp->groups->current_group->slug,
     1484                        'parent_url' => bp_get_group_permalink( $bp->groups->current_group ),
     1485                        'position' => $this->nav_item_position,
     1486                        'item_css_id' => 'nav-' . $this->slug,
     1487                        'screen_function' => array( &$this, '_display_hook' ),
     1488                        'user_has_access' => $this->enable_nav_item
     1489                    ) );
    14771490
    14781491                    // When we are viewing the extension display page, set the title and options title
     
    14841497
    14851498                // Hook the group home widget
    1486                 if ( !bp_current_action() && bp_is_current_action( 'home' ) )
     1499                if ( ! bp_current_action() && bp_is_current_action( 'home' ) ) {
    14871500                    add_action( $this->display_hook, array( &$this, 'widget_display' ) );
     1501                }
    14881502            }
    14891503        }
    14901504
    14911505        // Construct the admin edit tab for the new group extension
    1492         if ( !empty( $this->enable_edit_item ) && bp_is_item_admin() ) {
    1493             add_action( 'groups_admin_tabs', create_function( '$current, $group_slug', '$selected = ""; if ( "' . esc_attr( $this->admin_slug ) . '" == $current ) $selected = " class=\"current\""; echo "<li{$selected}><a href=\"' . trailingslashit( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/{$group_slug}/admin/' . esc_attr( $this->admin_slug ) ) . '\">' . esc_attr( $this->admin_name ) . '</a></li>";' ), 10, 2 );
     1506        if ( ! empty( $this->enable_edit_item ) && bp_is_item_admin() ) {
     1507            add_action( 'groups_admin_tabs', create_function( '$current, $group_slug',
     1508                '$selected = "";
     1509                if ( "' . esc_attr( $this->admin_slug ) . '" == $current )
     1510                    $selected = " class=\"current\"";
     1511                echo "<li{$selected}><a href=\"' . trailingslashit( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/{$group_slug}/admin/' . esc_attr( $this->admin_slug ) ) . '\">' . esc_attr( $this->admin_name ) . '</a></li>";'
     1512            ), 10, 2 );
    14941513
    14951514            // Catch the edit screen and forward it to the plugin template
Note: See TracChangeset for help on using the changeset viewer.