Skip to:
Content

bbPress.org


Ignore:
Timestamp:
07/10/2014 03:54:41 PM (11 years ago)
Author:
johnjamesjacoby
Message:

Bracketize extensions, and missed a spot in the admin.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/extend/buddypress/groups.php

    r5416 r5441  
    179179
    180180        // Bail if not viewing a single group
    181         if ( ! bp_is_group() )
     181        if ( ! bp_is_group() ) {
    182182            return;
     183        }
    183184
    184185        // Are forums enabled for this group?
     
    328329
    329330        // Bail if not a POST action
    330         if ( ! bbp_is_post_request() )
     331        if ( ! bbp_is_post_request() ) {
    331332            return;
     333        }
    332334
    333335        // Admin Nonce check
     
    466468
    467469        // Bail if not looking at this screen
    468         if ( !bp_is_group_creation_step( $this->slug ) )
     470        if ( !bp_is_group_creation_step( $this->slug ) ) {
    469471            return false;
     472        }
    470473
    471474        // Check for possibly empty group_id
     
    509512        $forum_ids    = bbp_get_group_forum_ids( $group_id );
    510513
    511         if ( !empty( $forum_ids ) )
     514        if ( !empty( $forum_ids ) ) {
    512515            $forum_id = (int) is_array( $forum_ids ) ? $forum_ids[0] : $forum_ids;
     516        }
    513517
    514518        // Create a forum, or not
     
    517521
    518522                // Bail if initial content was already created
    519                 if ( !empty( $forum_id ) )
     523                if ( !empty( $forum_id ) ) {
    520524                    return;
     525                }
    521526
    522527                // Set the default forum status
     
    605610
    606611        // Bail if no forum_id was passed
    607         if ( empty( $forum_args['forum_id'] ) )
     612        if ( empty( $forum_args['forum_id'] ) ) {
    608613            return;
     614        }
    609615
    610616        // Validate forum_id
     
    631637
    632638        // Bail if no forum_id was passed
    633         if ( empty( $forum_args['forum_id'] ) )
     639        if ( empty( $forum_args['forum_id'] ) ) {
    634640            return;
     641        }
    635642
    636643        // Validate forum_id
     
    662669
    663670        // Use the first forum ID
    664         if ( empty( $forum_ids ) )
     671        if ( empty( $forum_ids ) ) {
    665672            return;
     673        }
    666674
    667675        // Get the first forum ID
     
    689697
    690698        // Bail if group cannot be found
    691         if ( empty( $group ) )
     699        if ( empty( $group ) ) {
    692700            return false;
     701        }
    693702
    694703        // Set forum enabled status
     
    10331042
    10341043        // If this is a group of any kind, empty out the redirect URL
    1035         if ( bp_is_group_admin_screen( $this->slug ) )
     1044        if ( bp_is_group_admin_screen( $this->slug ) ) {
    10361045            $redirect_url = trailingslashit( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/' . $group->slug . '/admin/' . $this->slug );
     1046        }
    10371047
    10381048        return $redirect_url;
     
    11321142
    11331143        // if a forum is not enabled, we don't need to add this field
    1134         if ( ! bp_group_is_forum_enabled() )
    1135             return; ?>
     1144        if ( ! bp_group_is_forum_enabled() ) {
     1145            return;
     1146        } ?>
    11361147
    11371148        <input type="hidden" name="group-show-forum" id="group-show-forum" value="1" />
     
    11971208
    11981209        // Bail if the post isn't associated with a group
    1199         if ( empty( $group_ids ) )
     1210        if ( empty( $group_ids ) ) {
    12001211            return $url;
     1212        }
    12011213
    12021214        // @todo Multiple group forums/forum groups
     
    12681280        $new = $this->maybe_map_permalink_to_group( $reply_id );
    12691281
    1270         if ( empty( $new ) )
     1282        if ( empty( $new ) ) {
    12711283            return $url;
     1284        }
    12721285
    12731286        return trailingslashit( $new ) . bbpress()->edit_id  . '/';
     
    13341347        $new = $this->maybe_map_permalink_to_group( bbp_get_forum_id() );
    13351348
    1336         if ( empty( $new ) )
     1349        if ( empty( $new ) ) {
    13371350            return $args;
     1351        }
    13381352
    13391353        global $wp_rewrite;
     
    13571371    public function replies_pagination( $args ) {
    13581372        $new = $this->maybe_map_permalink_to_group( bbp_get_topic_id() );
    1359         if ( empty( $new ) )
     1373        if ( empty( $new ) ) {
    13601374            return $args;
     1375        }
    13611376
    13621377        global $wp_rewrite;
     
    13931408
    13941409        // Bail if not a group forum
    1395         if ( empty( $group_ids ) )
     1410        if ( empty( $group_ids ) ) {
    13961411            return;
     1412        }
    13971413
    13981414        // Use the first group ID
     
    14281444
    14291445        // Not posting from a BuddyPress group? stop now!
    1430         if ( empty( $group ) )
     1446        if ( empty( $group ) ) {
    14311447            return $args;
     1448        }
    14321449
    14331450        // Set the component to 'groups' so the activity item shows up in the group
Note: See TracChangeset for help on using the changeset viewer.