Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
10/04/2015 07:29:24 AM (5 years ago)
Author:
tw2113
Message:

Initial documentation cleanup for the BP Forums Component.

See #6397.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-forums/bp-forums-screens.php

    r10096 r10183  
    1515function bp_forums_directory_forums_setup() {
    1616
    17     // Get BuddyPress once
     17    // Get BuddyPress once.
    1818    $bp = buddypress();
    1919
     
    4242            $bp->groups->current_group = groups_get_group( array( 'group_id' => $_POST['topic_group_id'] ) );
    4343            if ( !empty( $bp->groups->current_group->id ) ) {
    44                 // Auto join this user if they are not yet a member of this group
     44                // Auto join this user if they are not yet a member of this group.
    4545                if ( !bp_current_user_can( 'bp_moderate' ) && 'public' == $bp->groups->current_group->status && !groups_is_user_member( bp_loggedin_user_id(), $bp->groups->current_group->id ) )
    4646                    groups_join_group( $bp->groups->current_group->id );
     
    7575                }
    7676
    77             }    else {
     77            } else {
    7878                bp_core_add_message( __( 'Please pick the group forum where you would like to post this topic.', 'buddypress' ), 'error' );
    7979                bp_core_redirect( add_query_arg( 'new', '', bp_get_forums_directory_permalink() ) );
     
    249249    public function is_legacy_forum() {
    250250
    251         // Bail if not looking at a group
     251        // Bail if not looking at a group.
    252252        if ( ! bp_is_forums_component() )
    253253            return;
    254254
    255         // forum Directory
     255        // Forum Directory.
    256256        if ( ( ! bp_current_action() || ( 'tag' == bp_current_action() && bp_action_variables() ) ) && ! bp_current_item() ) {
    257257
     
    284284    public function directory_dummy_post() {
    285285
    286         // Title based on ability to create groups
     286        // Title based on ability to create groups.
    287287        if ( is_user_logged_in() ) {
    288288            $title = __( 'Forums', 'buddypress' ) . '&nbsp;<a class="button show-hide-new bp-title-button" href="#new-topic" id="new-topic-button">' . __( 'New Topic', 'buddypress' ) . '</a>';
Note: See TracChangeset for help on using the changeset viewer.