Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/02/2009 06:56:42 PM (17 years ago)
Author:
apeatling
Message:

Merging last few trunk changes and stripping all whitespace.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.1/bp-core/bp-core-templatetags.php

    r2075 r2076  
    66 * Uses the $bp->bp_nav global to render out the navigation within a BuddyPress install.
    77 * Each component adds to this navigation array within its own [component_name]_setup_nav() function.
    8  * 
     8 *
    99 * This navigation array is the top level navigation, so it contains items such as:
    1010 *      [Blog, Profile, Messages, Groups, Friends] ...
    … …  
    1818function bp_get_loggedin_user_nav() {
    1919        global $bp, $current_blog;
    20        
     20
    2121        /* Loop through each navigation item */
    2222        foreach( (array) $bp->bp_nav as $nav_item ) {
    … …  
    2727                        $selected = '';
    2828                }
    29                
     29
    3030                /* If we are viewing another person (current_userid does not equal loggedin_user->id)
    3131                   then check to see if the two users are friends. if they are, add a highlight CSS class
    … …  
    3333                if ( !bp_is_home() && $bp->displayed_user->id ) {
    3434                        $selected = '';
    35                        
     35
    3636                        if ( function_exists('friends_install') ) {
    3737                                if ( $nav_item['css_id'] == $bp->friends->id ) {
    … …  
    4141                        }
    4242                }
    43                
     43
    4444                /* echo out the final list item */
    4545                echo apply_filters( 'bp_get_loggedin_user_nav_' . $nav_item['css_id'], '<li id="li-nav-' . $nav_item['css_id'] . '" ' . $selected . '><a id="my-' . $nav_item['css_id'] . '" href="' . $nav_item['link'] . '">' . $nav_item['name'] . '</a></li>', &$nav_item );
    4646        }
    47        
     47
    4848        /* Always add a log out list item to the end of the navigation */
    4949        if ( function_exists( 'wp_logout_url' ) ) {
    50                 $logout_link = '<li><a id="wp-logout" href="' .  wp_logout_url( $bp->root_domain ) . '">' . __( 'Log Out', 'buddypress' ) . '</a></li>';               
     50                $logout_link = '<li><a id="wp-logout" href="' .  wp_logout_url( $bp->root_domain ) . '">' . __( 'Log Out', 'buddypress' ) . '</a></li>';
    5151        } else {
    5252                $logout_link = '<li><a id="wp-logout" href="' . site_url() . '/wp-login.php?action=logout&amp;redirect_to=' . $bp->root_domain . '">' . __( 'Log Out', 'buddypress' ) . '</a></li>';
    5353        }
    54        
     54
    5555        echo apply_filters( 'bp_logout_nav_link', $logout_link );
    5656}
    … …  
    7272
    7373        foreach ( $bp->bp_nav as $user_nav_item ) {
    74                 if ( !$user_nav_item['show_for_displayed_user'] ) 
     74                if ( !$user_nav_item['show_for_displayed_user'] )
    7575                        continue;
    76                        
     76
    7777                if ( $bp->current_component == $user_nav_item['css_id'] )
    7878                        $selected = ' class="current"';
    7979                else
    8080                        $selected = '';
    81                
     81
    8282                if ( $bp->loggedin_user->domain )
    8383                        $link = str_replace( $bp->loggedin_user->domain, $bp->displayed_user->domain, $user_nav_item['link'] );
    8484                else
    8585                        $link = $bp->displayed_user->domain . $user_nav_item['link'];
    86                
     86
    8787                echo apply_filters( 'bp_get_displayed_user_nav_' . $user_nav_item['css_id'], '<li id="li-subnav-' . $user_nav_item['css_id'] . '" ' . $selected . '><a id="user-' . $user_nav_item['css_id'] . '" href="' . $link . '">' . $user_nav_item['name'] . '</a></li>', &$user_nav_item );
    88         }       
     88        }
    8989}
    9090        /* DEPRECATED - use bp_get_displayed_user_nav() */
    9191        function bp_get_user_nav() { bp_get_displayed_user_nav(); }
    92        
     92
    9393/**
    9494 * bp_get_options_nav()
    … …  
    9797 * Uses the $bp->bp_options_nav global to render out the sub navigation for the current component.
    9898 * Each component adds to its sub navigation array within its own [component_name]_setup_nav() function.
    99  * 
     99 *
    100100 * This sub navigation array is the secondary level navigation, so for profile it contains:
    101101 *      [Public, Edit Profile, Change Avatar]
    … …  
    103103 * The function will also analyze the current action for the current component to determine whether
    104104 * or not to highlight a particular sub nav item.
    105  * 
     105 *
    106106 * @package BuddyPress Core
    107107 * @global $bp The global BuddyPress settings variable created in bp_core_setup_globals()
    … …  
    118118                if ( count( $bp->bp_options_nav[$bp->current_component] ) < 1 )
    119119                        return false;
    120        
     120
    121121                /* Loop through each navigation item */
    122122                foreach ( $bp->bp_options_nav[$bp->current_component] as $subnav_item ) {
    123123                        if ( !$subnav_item['user_has_access'] )
    124124                                continue;
    125                        
     125
    126126                        /* If the current action or an action variable matches the nav item id, then add a highlight CSS class. */
    127127                        if ( $subnav_item['slug'] == $bp->current_action ) {
    … …  
    130130                                $selected = '';
    131131                        }
    132                        
     132
    133133                        /* echo out the final list item */
    134                         echo apply_filters( 'bp_get_options_nav_' . $subnav_item['css_id'], '<li id="li-subnav-' . $subnav_item['css_id'] . '" ' . $selected . '><a id="' . $subnav_item['css_id'] . '" href="' . $subnav_item['link'] . '">' . $subnav_item['name'] . '</a></li>', $subnav_item );             
     134                        echo apply_filters( 'bp_get_options_nav_' . $subnav_item['css_id'], '<li id="li-subnav-' . $subnav_item['css_id'] . '" ' . $selected . '><a id="' . $subnav_item['css_id'] . '" href="' . $subnav_item['link'] . '">' . $subnav_item['name'] . '</a></li>', $subnav_item );
    135135                }
    136136        } else {
    … …  
    142142function bp_get_options_title() {
    143143        global $bp;
    144        
     144
    145145        if ( empty( $bp->bp_options_title ) )
    146146                $bp->bp_options_title = __( 'Options', 'buddypress' );
    147        
     147
    148148        echo apply_filters( 'bp_get_options_title', attribute_escape( $bp->bp_options_title ) );
    149149}
    150        
     150
    151151
    152152/** AVATAR TEMPLATE TAGS *******************************************************/
    … …  
    164164function bp_has_options_avatar() {
    165165        global $bp;
    166        
     166
    167167        if ( empty( $bp->bp_options_avatar ) )
    168168                return false;
    169        
     169
    170170        return true;
    171171}
    … …  
    179179function bp_comment_author_avatar() {
    180180        global $comment;
    181        
     181
    182182        if ( function_exists('bp_core_fetch_avatar') ) {
    183                 echo apply_filters( 'bp_comment_author_avatar', bp_core_fetch_avatar( array( 'item_id' => $comment->user_id, 'type' => 'thumb' ) ) );   
     183                echo apply_filters( 'bp_comment_author_avatar', bp_core_fetch_avatar( array( 'item_id' => $comment->user_id, 'type' => 'thumb' ) ) );
    184184        } else if ( function_exists('get_avatar') ) {
    185185                get_avatar();
    … …  
    189189function bp_post_author_avatar() {
    190190        global $post;
    191        
     191
    192192        if ( function_exists('bp_core_fetch_avatar') ) {
    193                 echo apply_filters( 'bp_post_author_avatar', bp_core_fetch_avatar( array( 'item_id' => $post->post_author, 'type' => 'thumb' ) ) );     
     193                echo apply_filters( 'bp_post_author_avatar', bp_core_fetch_avatar( array( 'item_id' => $post->post_author, 'type' => 'thumb' ) ) );
    194194        } else if ( function_exists('get_avatar') ) {
    195195                get_avatar();
    … …  
    211211                $r = wp_parse_args( $args, $defaults );
    212212                extract( $r, EXTR_SKIP );
    213                
     213
    214214                return apply_filters( 'bp_get_loggedin_user_avatar', bp_core_fetch_avatar( array( 'item_id' => $bp->loggedin_user->id, 'type' => $type, 'width' => $width, 'height' => $height ) ) );
    215         } 
     215        }
    216216
    217217function bp_displayed_user_avatar( $args = '' ) {
    … …  
    229229                $r = wp_parse_args( $args, $defaults );
    230230                extract( $r, EXTR_SKIP );
    231                
     231
    232232                return apply_filters( 'bp_get_displayed_user_avatar', bp_core_fetch_avatar( array( 'item_id' => $bp->displayed_user->id, 'type' => $type, 'width' => $width, 'height' => $height ) ) );
    233         } 
     233        }
    234234
    235235function bp_avatar_admin_step() {
    … …  
    256256        function bp_get_avatar_to_crop_src() {
    257257                global $bp;
    258        
     258
    259259                return apply_filters( 'bp_get_avatar_to_crop_src', str_replace( WP_CONTENT_DIR, '', $bp->avatar_admin->image->dir ) );
    260260        }
    261        
     261
    262262function bp_avatar_cropper() {
    263263        global $bp;
    264        
     264
    265265        echo '<img id="avatar-to-crop" class="avatar" src="' . $bp->avatar_admin->image . '" />';
    266266}
    … …  
    272272function bp_is_home() {
    273273        global $bp;
    274        
     274
    275275        if ( is_user_logged_in() && $bp->loggedin_user->id == $bp->displayed_user->id )
    276276                return true;
    277                
     277
    278278        return false;
    279279}
    … …  
    281281function bp_last_activity( $user_id = false, $echo = true ) {
    282282        global $bp;
    283        
     283
    284284        if ( !$user_id )
    285285                $user_id = $bp->displayed_user->id;
    286        
     286
    287287        $last_activity = bp_core_get_last_activity( get_usermeta( $user_id, 'last_activity' ), __('active %s ago', 'buddypress') );
    288288
    … …  
    295295function bp_user_link() {
    296296        global $bp;
    297        
     297
    298298        echo apply_filters( 'bp_the_avatar_thumbnail', $bp->displayed_user->domain );
    299299}
    … …  
    301301function bp_get_loggedin_user_link() {
    302302        global $bp;
    303        
     303
    304304        return $bp->loggedin_user->domain;
    305305}
    … …  
    307307function bp_get_displayed_user_link() {
    308308        global $bp;
    309        
     309
    310310        return $bp->displayed_user->domain;
    311311}
    … …  
    313313function bp_core_get_wp_profile() {
    314314        global $bp;
    315        
     315
    316316        $ud = get_userdata( $bp->displayed_user->id );
    317317?>
    … …  
    393393        if ( function_exists($component_name . '_install') )
    394394                return true;
    395        
     395
    396396        return false;
    397397}
    … …  
    399399function bp_format_time( $time, $just_date = false ) {
    400400        $date = date( get_option('date_format'), $time );
    401        
     401
    402402        if ( !$just_date ) {
    403403                $date .= ' ' . __( 'at', 'buddypress' ) . date( ' ' . get_option('time_format'), $time );
    404404        }
    405        
     405
    406406        return apply_filters( 'bp_format_time', $date );
    407407}
    … …  
    409409function bp_word_or_name( $youtext, $nametext, $capitalize = true, $echo = true ) {
    410410        global $bp;
    411        
     411
    412412        if ( $capitalize )
    413413                $youtext = bp_core_ucfirst($youtext);
    414        
     414
    415415        if ( $bp->displayed_user->id == $bp->loggedin_user->id ) {
    416416                if ( $echo )
    … …  
    429429function bp_your_or_their( $capitalize = true, $echo = true ) {
    430430        global $bp;
    431        
     431
    432432        if ( $capitalize )
    433433                $yourtext = bp_core_ucfirst($yourtext);
    434        
     434
    435435        if ( $bp->displayed_user->id == $bp->loggedin_user->id ) {
    436436                if ( $echo )
    … …  
    448448function bp_loggedinuser_link() {
    449449        global $bp;
    450        
     450
    451451        if ( $link = bp_core_get_userlink( $bp->loggedin_user->id ) ) {
    452452                echo apply_filters( 'bp_loggedinuser_link', $link );
    … …  
    483483                        $title = __( 'Blog &#8212; ' . $post->post_title, 'buddypress' );
    484484                } else if ( is_category() ) {
    485                         $title = __( 'Blog &#8212; Categories &#8212; ' . ucwords( $wp_query->query_vars['category_name'] ), 'buddypress' );                           
     485                        $title = __( 'Blog &#8212; Categories &#8212; ' . ucwords( $wp_query->query_vars['category_name'] ), 'buddypress' );
    486486                } else if ( is_tag() ) {
    487                         $title = __( 'Blog &#8212; Tags &#8212; ' . ucwords( $wp_query->query_vars['tag'] ), 'buddypress' );                           
     487                        $title = __( 'Blog &#8212; Tags &#8212; ' . ucwords( $wp_query->query_vars['tag'] ), 'buddypress' );
    488488                } else
    489489                        $title = __( 'Blog', 'buddypress' );
    … …  
    502502                $title = get_the_title($post->ID);
    503503        }
    504        
     504
    505505        if ( defined( 'BP_ENABLE_MULTIBLOG' ) ) {
    506506                $blog_title = get_blog_option( $current_blog->blog_id, 'blogname' );
    507507        } else {
    508                 $blog_title = get_blog_option( BP_ROOT_BLOG, 'blogname' );             
    509         }
    510        
     508                $blog_title = get_blog_option( BP_ROOT_BLOG, 'blogname' );
     509        }
     510
    511511        return apply_filters( 'bp_page_title', $blog_title . ' &#8212; ' . attribute_escape( $title ), attribute_escape( $title ) );
    512512}
    … …  
    519519function bp_is_page($page) {
    520520        global $bp;
    521        
     521
    522522        if ( $bp->displayed_user->id || $bp->is_single_item )
    523523                return false;
    524        
     524
    525525        if ( $page == $bp->current_component || ( is_home() && $page == 'home' && $bp->current_component == $bp->default_component ) || ( $page == BP_MEMBERS_SLUG && !$bp->current_component ) )
    526526                return true;
    527        
     527
    528528        return false;
    529529}
    … …  
    535535        if ( file_exists( WP_CONTENT_DIR . '/themes/' . get_blog_option( BP_ROOT_BLOG, 'template') . '/registration/register.php') )
    536536                return true;
    537                
     537
    538538        return false;
    539539}
    … …  
    547547        function bp_get_signup_page() {
    548548                global $bp;
    549                
     549
    550550                if ( bp_has_custom_signup_page() ) {
    551551                                return apply_filters( 'bp_get_signup_page', $bp->root_domain . '/' . BP_REGISTER_SLUG );
    … …  
    561561        if ( file_exists( WP_CONTENT_DIR . '/themes/' . get_blog_option( BP_ROOT_BLOG, 'template') . '/registration/activate.php') )
    562562                return true;
    563        
     563
    564564        return false;
    565565}
    … …  
    567567function bp_activation_page( $echo = true ) {
    568568        global $bp;
    569        
     569
    570570        if ( bp_has_custom_activation_page() ) {
    571571                if ( $echo )
    … …  
    583583function bp_search_form_action() {
    584584        global $bp;
    585        
     585
    586586        return apply_filters( 'bp_search_form_action', $bp->root_domain . '/search' );
    587587}
    … …  
    590590        // Eventually this won't be needed and a page will be built to integrate all search results.
    591591        $selection_box = '<select name="search-which" id="search-which" style="width: auto">';
    592        
     592
    593593        if ( function_exists( 'xprofile_install' ) ) {
    594594                $selection_box .= '<option value="members">' . __( 'Members', 'buddypress' ) . '</option>';
    595595        }
    596        
     596
    597597        if ( function_exists( 'groups_install' ) ) {
    598598                $selection_box .= '<option value="groups">' . __( 'Groups', 'buddypress' ) . '</option>';
    … …  
    602602                $selection_box .= '<option value="forums">' . __( 'Forums', 'buddypress' ) . '</option>';
    603603        }
    604        
     604
    605605        if ( function_exists( 'bp_blogs_install' ) ) {
    606606                $selection_box .= '<option value="blogs">' . __( 'Blogs', 'buddypress' ) . '</option>';
    607607        }
    608                        
     608
    609609        $selection_box .= '</select>';
    610        
     610
    611611        return apply_filters( 'bp_search_form_type_select', $selection_box );
    612612}
    … …  
    615615        $form = '
    616616                <form action="' . bp_search_form_action() . '" method="post" id="search-form">
    617                         <input type="text" id="search-terms" name="search-terms" value="" /> 
     617                        <input type="text" id="search-terms" name="search-terms" value="" />
    618618                        ' . bp_search_form_type_select() . '
    619                
     619
    620620                        <input type="submit" name="search-submit" id="search-submit" value="' . __( 'Search', 'buddypress' ) . '" />
    621621                        ' . wp_nonce_field( 'bp_search_form' ) . '
    622622                </form>
    623623        ';
    624        
     624
    625625        echo apply_filters( 'bp_search_form', $form );
    626626}
    … …  
    631631                $logout_link = '<a href="' . wp_logout_url( $bp->root_domain ) . '">' . __( 'Log Out', 'buddypress' ) . '</a>';
    632632        else
    633                 $logout_link = '<a href="' . $bp->root_domain . '/wp-login.php?action=logout&amp;redirect_to=' . $bp->root_domain . '">' . __( 'Log Out', 'buddypress' ) . '</a>';             
     633                $logout_link = '<a href="' . $bp->root_domain . '/wp-login.php?action=logout&amp;redirect_to=' . $bp->root_domain . '">' . __( 'Log Out', 'buddypress' ) . '</a>';
    634634
    635635        echo apply_filters( 'bp_logout_link', $logout_link );
    … …  
    638638function bp_profile_wire_can_post() {
    639639        global $bp;
    640        
     640
    641641        if ( bp_is_home() )
    642642                return true;
    643        
     643
    644644        if ( function_exists('friends_install') ) {
    645645                if ( friends_check_friendship( $bp->loggedin_user->id, $bp->displayed_user->id ) )
    … …  
    647647                else
    648648                        return false;
    649         } 
    650        
     649        }
     650
    651651        return true;
    652652}
    … …  
    659659        <li<?php if ( bp_is_page( BP_HOME_BLOG_SLUG ) ) {?> class="selected"<?php } ?>><a href="<?php echo get_option('home') ?>/<?php echo BP_HOME_BLOG_SLUG ?>" title="<?php _e( 'Blog', 'buddypress' ) ?>"><?php _e( 'Blog', 'buddypress' ) ?></a></li>
    660660        <li<?php if ( bp_is_page( BP_MEMBERS_SLUG ) ) {?> class="selected"<?php } ?>><a href="<?php echo get_option('home') ?>/<?php echo BP_MEMBERS_SLUG ?>" title="<?php _e( 'Members', 'buddypress' ) ?>"><?php _e( 'Members', 'buddypress' ) ?></a></li>
    661        
     661
    662662        <?php if ( function_exists( 'groups_install' ) ) { ?>
    663663                <li<?php if ( bp_is_page( $bp->groups->slug ) ) {?> class="selected"<?php } ?>><a href="<?php echo get_option('home') ?>/<?php echo $bp->groups->slug ?>" title="<?php _e( 'Groups', 'buddypress' ) ?>"><?php _e( 'Groups', 'buddypress' ) ?></a></li>
    664664        <?php } ?>
    665        
     665
    666666        <?php if ( function_exists( 'bp_blogs_install' ) ) { ?>
    667667                <li<?php if ( bp_is_page( $bp->blogs->slug ) ) {?> class="selected"<?php } ?>><a href="<?php echo get_option('home') ?>/<?php echo $bp->blogs->slug ?>" title="<?php _e( 'Blogs', 'buddypress' ) ?>"><?php _e( 'Blogs', 'buddypress' ) ?></a></li>
    … …  
    681681function bp_is_directory() {
    682682        global $bp;
    683        
     683
    684684        return $bp->is_directory;
    685685}
    … …  
    689689 *
    690690 * Fakes an excerpt on any content. Will not truncate words.
    691  * 
     691 *
    692692 * @package BuddyPress Core
    693693 * @param $text str The text to create the excerpt from
    … …  
    707707                $text = implode(' ', $words);
    708708        }
    709        
     709
    710710        return apply_filters( 'bp_create_excerpt', $text );
    711711}
    … …  
    722722 *
    723723 * Checks to see if the data passed has been serialized.
    724  * 
     724 *
    725725 * @package BuddyPress Core
    726726 * @param $data str The data that will be checked
    … …  
    762762                return apply_filters( 'bp_get_signup_with_blog_value', $_POST['signup_with_blog'] );
    763763        }
    764        
     764
    765765function bp_signup_blog_url_value() {
    766766        echo bp_get_signup_blog_url_value();
    … …  
    789789        function bp_get_signup_avatar_dir_value() {
    790790                global $bp;
    791                
     791
    792792                return apply_filters( 'bp_get_signup_avatar_dir_value', $bp->signup->avatar_dir );
    793793        }
    … …  
    798798        function bp_get_current_signup_step() {
    799799                global $bp;
    800                
     800
    801801                return $bp->signup->step;
    802802        }
    … …  
    807807        function bp_get_signup_avatar( $args = '' ) {
    808808                global $bp;
    809                
     809
    810810                $defaults = array(
    811811                        'size' => BP_AVATAR_FULL_WIDTH,
    812812                        'class' => 'avatar',
    813                         'alt' => __( 'Your Avatar', 'buddypress' )                     
     813                        'alt' => __( 'Your Avatar', 'buddypress' )
    814814                );
    815815
    816816                $r = wp_parse_args( $args, $defaults );
    817817                extract( $r, EXTR_SKIP );
    818                
     818
    819819                $signup_avatar_dir = ( !empty( $_POST['signup_avatar_dir'] ) ) ? $_POST['signup_avatar_dir'] : $bp->signup->avatar_dir;
    820820
    … …  
    827827                                $default_grav = $bp->grav_default->user;
    828828                        }
    829                
     829
    830830                        $gravatar_url = apply_filters( 'bp_gravatar_url', 'http://www.gravatar.com/avatar/' );
    831831                        return apply_filters( 'bp_get_signup_avatar', '<img src="' . $gravatar_url . md5( $_POST['signup_email'] ) . '?d=' . $default_grav . '&amp;s=' . $size ) . '" width="' . $size . '" height="' . $size . '" alt="' . $alt . '" class="' . $class . '" />';
    … …  
    844844function bp_account_was_activated() {
    845845        global $bp;
    846        
     846
    847847        return $bp->activation_complete;
    848848}
    … …  
    863863        var $pag_links;
    864864        var $total_member_count;
    865        
     865
    866866        function bp_core_members_template( $type, $per_page, $max ) {
    867867                global $bp, $bp_the_member_query;
    … …  
    869869                $this->pag_page = isset( $_REQUEST['upage'] ) ? intval( $_REQUEST['upage'] ) : 1;
    870870                $this->pag_num = isset( $_REQUEST['num'] ) ? intval( $_REQUEST['num'] ) : $per_page;
    871                                
     871
    872872                if ( isset( $_REQUEST['s'] ) && '' != $_REQUEST['s'] && $type != 'random' ) {
    873873                        $this->members = BP_Core_User::search_users( $_REQUEST['s'], $this->pag_num, $this->pag_page );
    … …  
    879879                                        $this->members = BP_Core_User::get_random_users( $this->pag_num, $this->pag_page );
    880880                                        break;
    881                                
     881
    882882                                case 'newest':
    883883                                        $this->members = BP_Core_User::get_newest_users( $this->pag_num, $this->pag_page );
    … …  
    886886                                case 'popular':
    887887                                        $this->members = BP_Core_User::get_popular_users( $this->pag_num, $this->pag_page );
    888                                         break; 
     888                                        break;
    889889
    890890                                case 'online':
    891891                                        $this->members = BP_Core_User::get_online_users( $this->pag_num, $this->pag_page );
    892892                                        break;
    893                                        
     893
    894894                                case 'alphabetical':
    895895                                        $this->members = BP_Core_User::get_alphabetical_users( $this->pag_num, $this->pag_page );
    896896                                        break;
    897                                
     897
    898898                                case 'active': default:
    899899                                        $this->members = BP_Core_User::get_active_users( $this->pag_num, $this->pag_page );
    900                                         break;                                 
     900                                        break;
    901901                        }
    902902                }
    903                
     903
    904904                if ( !$max || $max >= (int)$this->members['total'] )
    905905                        $this->total_member_count = (int)$this->members['total'];
    … …  
    917917                        $this->member_count = count($this->members);
    918918                }
    919                
    920                 if ( (int) $this->total_member_count && (int) $this->pag_num ) { 
     919
     920                if ( (int) $this->total_member_count && (int) $this->pag_num ) {
    921921                        $this->pag_links = paginate_links( array(
    922922                                'base' => add_query_arg( 'upage', '%#%' ),
    … …  
    927927                                'next_text' => '&raquo;',
    928928                                'mid_size' => 1
    929                         ));             
     929                        ));
    930930                }
    931931        }
    932        
     932
    933933        function has_members() {
    934934                if ( $this->member_count )
    935935                        return true;
    936                
     936
    937937                return false;
    938938        }
    939        
     939
    940940        function next_member() {
    941941                $this->current_member++;
    942942                $this->member = $this->members[$this->current_member];
    943                
     943
    944944                return $this->member;
    945945        }
    946        
     946
    947947        function rewind_members() {
    948948                $this->current_member = -1;
    … …  
    951951                }
    952952        }
    953        
    954         function site_members() { 
     953
     954        function site_members() {
    955955                if ( $this->current_member + 1 < $this->member_count ) {
    956956                        return true;
    … …  
    964964                return false;
    965965        }
    966        
     966
    967967        function the_member() {
    968968                global $member, $bp;
    … …  
    977977                        wp_cache_set( 'bp_user_' . $user_id, $this->member, 'bp' );
    978978                }
    979                
     979
    980980                if ( $user_registered )
    981981                        $this->member->user_registered = $user_registered;
    982                        
     982
    983983                if ( 0 == $this->current_member ) // loop has just started
    984984                        do_action('loop_start');
    … …  
    988988function bp_rewind_site_members() {
    989989        global $site_members_template;
    990        
     990
    991991        return $site_members_template->rewind_members();
    992992}
    … …  
    10051005
    10061006        // type: active ( default ) | random | newest | popular | online | alphabetical
    1007        
     1007
    10081008        if ( $max ) {
    10091009                if ( $per_page > $max )
    … …  
    10121012
    10131013        $site_members_template = new BP_Core_Members_Template( $type, $per_page, $max );
    1014        
     1014
    10151015        return $site_members_template->has_members();
    10161016}
    … …  
    10281028function bp_site_members_pagination_count() {
    10291029        global $bp, $site_members_template;
    1030        
     1030
    10311031        $from_num = intval( ( $site_members_template->pag_page - 1 ) * $site_members_template->pag_num ) + 1;
    10321032        $to_num = ( $from_num + ( $site_members_template->pag_num - 1 ) > $site_members_template->total_member_count ) ? $site_members_template->total_member_count : $from_num + ( $site_members_template->pag_num - 1) ;
    … …  
    10411041        function bp_get_site_members_pagination_links() {
    10421042                global $site_members_template;
    1043                
     1043
    10441044                return apply_filters( 'bp_get_site_members_pagination_links', $site_members_template->pag_links );
    10451045        }
    10461046
    1047 function bp_the_site_member_user_id() { 
    1048         echo bp_get_the_site_member_user_id(); 
    1049 }
    1050         function bp_get_the_site_member_user_id() { 
    1051                 global $site_members_template; 
    1052 
    1053                 return apply_filters( 'bp_get_the_site_member_user_id', $site_members_template->member->id ); 
     1047function bp_the_site_member_user_id() {
     1048        echo bp_get_the_site_member_user_id();
     1049}
     1050        function bp_get_the_site_member_user_id() {
     1051                global $site_members_template;
     1052
     1053                return apply_filters( 'bp_get_the_site_member_user_id', $site_members_template->member->id );
    10541054        }
    10551055
    … …  
    10571057        echo apply_filters( 'bp_the_site_member_avatar', bp_get_the_site_member_avatar() );
    10581058}
    1059         function bp_get_the_site_member_avatar() { 
    1060                 global $site_members_template; 
     1059        function bp_get_the_site_member_avatar() {
     1060                global $site_members_template;
    10611061
    10621062                return apply_filters( 'bp_get_the_site_member_avatar', $site_members_template->member->avatar_thumb );
    … …  
    11001100                return apply_filters( 'bp_the_site_member_last_active', strtotime( $site_members_template->member->user_registered ) );
    11011101        }
    1102        
     1102
    11031103function bp_the_site_member_add_friend_button() {
    11041104        global $site_members_template;
    1105        
     1105
    11061106        if ( function_exists( 'bp_add_friend_button' ) ) {
    11071107                echo bp_add_friend_button( $site_members_template->member->id );
    … …  
    11111111function bp_the_site_member_total_friend_count() {
    11121112        global $site_members_template;
    1113        
     1113
    11141114        if ( !(int) $site_members_template->member->total_friends )
    11151115                return false;
    1116        
     1116
    11171117        echo bp_get_the_site_member_total_friend_count();
    11181118}
    … …  
    11261126                        return apply_filters( 'bp_get_the_site_member_total_friend_count', sprintf( __( '%d friend', 'buddypress' ), (int) $site_members_template->member->total_friends ) );
    11271127                else
    1128                         return apply_filters( 'bp_get_the_site_member_total_friend_count', sprintf( __( '%d friends', 'buddypress' ), (int) $site_members_template->member->total_friends ) );         
    1129         }
    1130        
     1128                        return apply_filters( 'bp_get_the_site_member_total_friend_count', sprintf( __( '%d friends', 'buddypress' ), (int) $site_members_template->member->total_friends ) );
     1129        }
     1130
    11311131function bp_the_site_member_random_profile_data() {
    11321132        global $site_members_template;
    … …  
    11651165function bp_home_blog_url() {
    11661166        global $bp, $current_blog;
    1167        
     1167
    11681168        if ( defined( 'BP_ENABLE_MULTIBLOG' ) ) {
    11691169                $blog_id = $current_blog->blog_id;
    … …  
    12161216        function bp_get_loggedin_user_fullname() {
    12171217                global $bp;
    1218                 return apply_filters( 'bp_get_loggedin_user_fullname', $bp->loggedin_user->fullname ); 
     1218                return apply_filters( 'bp_get_loggedin_user_fullname', $bp->loggedin_user->fullname );
    12191219        }
    12201220
    12211221function bp_current_component() {
    12221222        global $bp;
    1223         return apply_filters( 'bp_current_component', $bp->current_component );         
     1223        return apply_filters( 'bp_current_component', $bp->current_component );
    12241224}
    12251225
    12261226function bp_current_action() {
    12271227        global $bp;
    1228         return apply_filters( 'bp_current_action', $bp->current_action );               
     1228        return apply_filters( 'bp_current_action', $bp->current_action );
    12291229}
    12301230
    12311231function bp_current_item() {
    12321232        global $bp;
    1233         return apply_filters( 'bp_current_item', $bp->current_item );           
     1233        return apply_filters( 'bp_current_item', $bp->current_item );
    12341234}
    12351235
    12361236function bp_action_variables() {
    12371237        global $bp;
    1238         return apply_filters( 'bp_action_variables', $bp->action_variables );           
     1238        return apply_filters( 'bp_action_variables', $bp->action_variables );
    12391239}
    12401240
    … …  
    12441244        function bp_get_root_domain() {
    12451245                global $bp;
    1246                
     1246
    12471247                return $bp->root_domain;
    12481248        }
    … …  
    12521252function bp_is_profile_component() {
    12531253        global $bp;
    1254        
     1254
    12551255        if ( BP_XPROFILE_SLUG == $bp->current_component )
    12561256                return true;
    1257        
     1257
    12581258        return false;
    12591259}
    … …  
    12611261function bp_is_activity_component() {
    12621262        global $bp;
    1263        
     1263
    12641264        if ( BP_ACTIVITY_SLUG == $bp->current_component )
    12651265                return true;
    1266        
    1267         return false;   
     1266
     1267        return false;
    12681268}
    12691269
    12701270function bp_is_blogs_component() {
    12711271        global $bp;
    1272        
     1272
    12731273        if ( BP_BLOGS_SLUG == $bp->current_component )
    12741274                return true;
    1275        
    1276         return false;   
     1275
     1276        return false;
    12771277}
    12781278
    12791279function bp_is_wire_component() {
    12801280        global $bp;
    1281        
     1281
    12821282        if ( BP_WIRE_SLUG == $bp->current_action || in_array( BP_WIRE_SLUG, (array)$bp->action_variables ) )
    12831283                return true;
    1284        
    1285         return false;   
     1284
     1285        return false;
    12861286}
    12871287
    12881288function bp_is_messages_component() {
    12891289        global $bp;
    1290        
     1290
    12911291        if ( BP_MESSAGES_SLUG == $bp->current_component )
    12921292                return true;
    1293        
    1294         return false;   
     1293
     1294        return false;
    12951295}
    12961296
    12971297function bp_is_friends_component() {
    12981298        global $bp;
    1299        
     1299
    13001300        if ( BP_FRIENDS_SLUG == $bp->current_component )
    13011301                return true;
    1302        
    1303         return false;   
     1302
     1303        return false;
    13041304}
    13051305
    13061306function bp_is_groups_component() {
    13071307        global $bp;
    1308        
     1308
    13091309        if ( BP_GROUPS_SLUG == $bp->current_component )
    13101310                return true;
    1311        
    1312         return false;   
     1311
     1312        return false;
    13131313}
    13141314
    13151315function bp_is_settings_component() {
    13161316        global $bp;
    1317        
     1317
    13181318        if ( BP_SETTINGS_SLUG == $bp->current_component )
    13191319                return true;
    1320        
    1321         return false;   
     1320
     1321        return false;
    13221322}
    13231323
    13241324function bp_is_user_activity() {
    13251325        global $bp;
    1326        
     1326
    13271327        if ( BP_ACTIVITY_SLUG == $bp->current_component && ( !$bp->current_action || 'my-activity' == $bp->current_action ) )
    13281328                return true;
    1329        
    1330         return false;
    1331 }       
     1329
     1330        return false;
     1331}
    13321332
    13331333function bp_is_user_friends_activity() {
    13341334        global $bp;
    1335        
     1335
    13361336        if ( BP_ACTIVITY_SLUG == $bp->current_component && 'my-friends' == $bp->current_action )
    13371337                return true;
    1338        
    1339         return false;   
     1338
     1339        return false;
    13401340}
    13411341
    13421342function bp_is_user_profile() {
    13431343        global $bp;
    1344        
     1344
    13451345        if ( BP_XPROFILE_SLUG == $bp->current_component )
    13461346                return true;
    1347        
    1348         return false;   
     1347
     1348        return false;
    13491349}
    13501350
    13511351function bp_is_profile_edit() {
    13521352        global $bp;
    1353        
     1353
    13541354        if ( BP_XPROFILE_SLUG == $bp->current_component && 'edit' == $bp->current_action )
    13551355                return true;
    1356        
     1356
    13571357        return false;
    13581358}
    … …  
    13601360function bp_is_change_avatar() {
    13611361        global $bp;
    1362        
     1362
    13631363        if ( BP_XPROFILE_SLUG == $bp->current_component && 'change-avatar' == $bp->current_action )
    13641364                return true;
    1365        
    1366         return false;   
     1365
     1366        return false;
    13671367}
    13681368
    13691369function bp_is_profile_wire() {
    13701370        global $bp;
    1371        
     1371
    13721372        if ( BP_XPROFILE_SLUG == $bp->current_component && 'wire' == $bp->current_action )
    13731373                return true;
    1374        
    1375         return false;   
     1374
     1375        return false;
    13761376}
    13771377
    13781378function bp_is_user_groups() {
    13791379        global $bp;
    1380        
     1380
    13811381        if ( BP_GROUPS_SLUG == $bp->current_component && ( !$bp->current_action || 'my-groups' == $bp->current_action ) )
    13821382                return true;
    1383        
    1384         return false;           
     1383
     1384        return false;
    13851385}
    13861386
    13871387function bp_is_group_home() {
    13881388        global $bp;
    1389        
     1389
    13901390        if ( BP_GROUPS_SLUG == $bp->current_component && $bp->is_single_item && ( !$bp->current_action || 'home' == $bp->current_action ) )
    13911391                return true;
    1392        
    1393         return false;   
     1392
     1393        return false;
    13941394}
    13951395
    13961396function bp_is_group_create() {
    13971397        global $bp;
    1398        
     1398
    13991399        if ( BP_GROUPS_SLUG == $bp->current_component && 'create' == $bp->current_action )
    14001400                return true;
    1401        
     1401
    14021402        return false;
    14031403}
    … …  
    14061406function bp_is_group_admin_page() {
    14071407        global $bp;
    1408        
     1408
    14091409        if ( BP_GROUPS_SLUG == $bp->current_component && $bp->is_single_item && 'admin' == $bp->current_action )
    14101410                return true;
    1411        
    1412         return false;   
     1411
     1412        return false;
    14131413}
    14141414
    14151415function bp_is_group_wire() {
    14161416        global $bp;
    1417        
     1417
    14181418        if ( BP_GROUPS_SLUG == $bp->current_component && $bp->is_single_item && 'wire' == $bp->current_action )
    14191419                return true;
    1420        
    1421         return false;           
     1420
     1421        return false;
    14221422}
    14231423
    14241424function bp_is_group_forum() {
    14251425        global $bp;
    1426        
     1426
    14271427        if ( BP_GROUPS_SLUG == $bp->current_component && $bp->is_single_item && 'forum' == $bp->current_action )
    14281428                return true;
    1429        
    1430         return false;           
     1429
     1430        return false;
    14311431}
    14321432
    14331433function bp_is_group_forum_topic() {
    14341434        global $bp;
    1435        
     1435
    14361436        if ( BP_GROUPS_SLUG == $bp->current_component && $bp->is_single_item && 'forum' == $bp->current_action && 'topic' == $bp->action_variables[0] )
    14371437                return true;
    1438        
    1439         return false;   
     1438
     1439        return false;
    14401440}
    14411441
    14421442function bp_is_group_members() {
    14431443        global $bp;
    1444        
     1444
    14451445        if ( BP_GROUPS_SLUG == $bp->current_component && $bp->is_single_item && 'members' == $bp->current_action )
    14461446                return true;
    1447        
    1448         return false;   
     1447
     1448        return false;
    14491449}
    14501450
    14511451function bp_is_group_invites() {
    14521452        global $bp;
    1453        
     1453
    14541454        if ( BP_GROUPS_SLUG == $bp->current_component && 'invites' == $bp->current_action )
    14551455                return true;
    1456        
    1457         return false;           
     1456
     1457        return false;
    14581458}
    14591459
    14601460function bp_is_group_leave() {
    14611461        global $bp;
    1462        
     1462
    14631463        if ( BP_GROUPS_SLUG == $bp->current_component && $bp->is_single_item && 'leave-group' == $bp->current_action )
    14641464                return true;
    1465        
    1466         return false;   
    1467 }
    1468 
    1469 function bp_is_group_single() { 
    1470         global $bp; 
    1471 
    1472         if ( BP_GROUPS_SLUG == $bp->current_component && $bp->is_single_item ) 
    1473                 return true; 
    1474 
    1475         return false; 
     1465
     1466        return false;
     1467}
     1468
     1469function bp_is_group_single() {
     1470        global $bp;
     1471
     1472        if ( BP_GROUPS_SLUG == $bp->current_component && $bp->is_single_item )
     1473                return true;
     1474
     1475        return false;
    14761476}
    14771477
    14781478function bp_is_user_blogs() {
    14791479        global $bp;
    1480        
     1480
    14811481        if ( BP_BLOGS_SLUG == $bp->current_component && ( !$bp->current_action || 'my-blogs' == $bp->current_action ) )
    14821482                return true;
    1483        
    1484         return false;           
     1483
     1484        return false;
    14851485}
    14861486
    14871487function bp_is_user_recent_posts() {
    14881488        global $bp;
    1489        
     1489
    14901490        if ( BP_BLOGS_SLUG == $bp->current_component && 'recent-posts' == $bp->current_action )
    14911491                return true;
    1492        
    1493         return false;   
     1492
     1493        return false;
    14941494}
    14951495
    14961496function bp_is_user_recent_commments() {
    14971497        global $bp;
    1498        
     1498
    14991499        if ( BP_BLOGS_SLUG == $bp->current_component && 'recent-comments' == $bp->current_action )
    15001500                return true;
    1501        
    1502         return false;           
     1501
     1502        return false;
    15031503}
    15041504
    15051505function bp_is_create_blog() {
    15061506        global $bp;
    1507        
     1507
    15081508        if ( BP_BLOGS_SLUG == $bp->current_component && 'create-a-blog' == $bp->current_action )
    15091509                return true;
    1510        
    1511         return false;   
     1510
     1511        return false;
    15121512}
    15131513
    15141514function bp_is_user_friends() {
    15151515        global $bp;
    1516        
     1516
    15171517        if ( BP_FRIENDS_SLUG == $bp->current_component && ( !$bp->current_action || 'my-friends' == $bp->current_action ) )
    15181518                return true;
    1519        
    1520         return false;   
     1519
     1520        return false;
    15211521}
    15221522
    15231523function bp_is_friend_requests() {
    15241524        global $bp;
    1525        
     1525
    15261526        if ( BP_FRIENDS_SLUG == $bp->current_component && 'requests' == $bp->current_action )
    15271527                return true;
    1528        
    1529         return false;   
     1528
     1529        return false;
    15301530}
    15311531
    15321532function bp_is_messages_inbox() {
    15331533        global $bp;
    1534        
     1534
    15351535        if ( BP_MESSAGES_SLUG == $bp->current_component && ( !$bp->current_action || 'inbox' == $bp->current_action ) )
    15361536                return true;
    1537        
    1538         return false;   
     1537
     1538        return false;
    15391539}
    15401540
    15411541function bp_is_messages_sentbox() {
    15421542        global $bp;
    1543        
     1543
    15441544        if ( BP_MESSAGES_SLUG == $bp->current_component && 'sentbox' == $bp->current_action )
    15451545                return true;
    1546        
    1547         return false;           
     1546
     1547        return false;
    15481548}
    15491549
    … …  
    15511551function bp_is_notices() {
    15521552        global $bp;
    1553        
     1553
    15541554        if ( BP_MESSAGES_SLUG == $bp->current_component && 'notices' == $bp->current_action )
    15551555                return true;
    1556        
    1557         return false;   
     1556
     1557        return false;
    15581558}
    15591559
    … …  
    15611561function bp_is_messages_compose_screen() {
    15621562        global $bp;
    1563        
     1563
    15641564        if ( BP_MESSAGES_SLUG == $bp->current_component && 'compose' == $bp->current_action )
    15651565                return true;
    1566        
    1567         return false;   
     1566
     1567        return false;
    15681568}
    15691569
    15701570function bp_is_single_item() {
    15711571        global $bp;
    1572        
     1572
    15731573        if ( $bp->is_single_item )
    15741574                return true;
    1575        
     1575
    15761576        return false;
    15771577}
    … …  
    15791579function bp_is_activation_page() {
    15801580        global $bp;
    1581        
     1581
    15821582        if ( BP_ACTIVATION_SLUG == $bp->current_component )
    15831583                return true;
    1584        
    1585         return false;   
     1584
     1585        return false;
    15861586}
    15871587
    15881588function bp_is_register_page() {
    15891589        global $bp;
    1590        
     1590
    15911591        if ( BP_REGISTER_SLUG == $bp->current_component )
    15921592                return true;
    1593        
    1594         return false;   
     1593
     1594        return false;
    15951595}
    15961596
    … …  
    16031603                global $bp;
    16041604
    1605                 if ( bp_is_blog_page() && is_front_page() && $bp->current_component != BP_HOME_BLOG_SLUG ) 
    1606                         $bp_classes[] = 'home-page'; 
    1607                
     1605                if ( bp_is_blog_page() && is_front_page() && $bp->current_component != BP_HOME_BLOG_SLUG )
     1606                        $bp_classes[] = 'home-page';
     1607
    16081608                if ( bp_is_blog_page() || bp_is_register_page() || bp_is_activation_page() )
    16091609                        $bp_classes[] = 'blog-page';
    1610                
     1610
    16111611                if ( !bp_is_blog_page() && !bp_is_register_page() && !bp_is_activation_page() )
    16121612                        $bp_classes[] = 'internal-page';
    1613                
     1613
    16141614                if ( bp_is_directory() )
    16151615                        $bp_classes[] = 'directory';
    1616                        
     1616
    16171617                if ( bp_is_user_profile() && !bp_is_blog_page() )
    16181618                        $bp_classes[] = 'profile';
    1619                
     1619
    16201620                if ( bp_is_activity_component() && !bp_is_blog_page()  )
    1621                         $bp_classes[] = 'activity';             
     1621                        $bp_classes[] = 'activity';
    16221622
    16231623                if ( bp_is_blogs_component() && !bp_is_blog_page()  )
    … …  
    16281628
    16291629                if ( bp_is_messages_component() && !bp_is_blog_page()  )
    1630                         $bp_classes[] = 'messages';                                     
    1631                
     1630                        $bp_classes[] = 'messages';
     1631
    16321632                if ( bp_is_friends_component() && !bp_is_blog_page()  )
    16331633                        $bp_classes[] = 'friends';
    1634                        
     1634
    16351635                if ( bp_is_groups_component() && !bp_is_blog_page()  )
    16361636                        $bp_classes[] = 'groups';
    … …  
    16381638                if ( bp_is_settings_component() && !bp_is_blog_page()  )
    16391639                        $bp_classes[] = 'settings';
    1640                        
     1640
    16411641                if ( bp_is_single_item() )
    16421642                        $bp_classes[] = 'single-item';
    1643                        
     1643
    16441644                if ( bp_is_messages_inbox() )
    16451645                        $bp_classes[] = 'inbox';
    … …  
    16531653                if ( bp_is_notices() )
    16541654                        $bp_classes[] = 'notices';
    1655                                                
     1655
    16561656                if ( bp_is_friend_requests() )
    16571657                        $bp_classes[] = 'friend-requests';
    … …  
    16591659                if ( bp_is_user_friends() )
    16601660                        $bp_classes[] = 'my-friends';
    1661                        
     1661
    16621662                if ( bp_is_create_blog() )
    16631663                        $bp_classes[] = 'create-blog';
    1664                        
     1664
    16651665                if ( bp_is_user_recent_commments() )
    16661666                        $bp_classes[] = 'recent-comments';
    1667                        
     1667
    16681668                if ( bp_is_user_recent_posts() )
    16691669                        $bp_classes[] = 'recent-posts';
    1670                        
     1670
    16711671                if ( bp_is_user_blogs() && !bp_is_directory() )
    16721672                        $bp_classes[] = 'my-blogs';
    1673                        
     1673
    16741674                if ( bp_is_user_groups() && !bp_is_directory() )
    16751675                        $bp_classes[] = 'my-groups';
    1676                        
     1676
    16771677                if ( bp_is_group_leave() )
    16781678                        $bp_classes[] = 'leave-group';
    1679                        
     1679
    16801680                if ( bp_is_group_invites() )
    16811681                        $bp_classes[] = 'group-invites';
    1682                        
     1682
    16831683                if ( bp_is_group_members() )
    16841684                        $bp_classes[] = 'group-members';
    1685                        
     1685
    16861686                if ( bp_is_group_forum_topic() )
    16871687                        $bp_classes[] = 'group-forum-topic';
    1688                        
     1688
    16891689                if ( bp_is_group_forum() )
    16901690                        $bp_classes[] = 'group-forum';
    1691                        
     1691
    16921692                if ( bp_is_group_wire() )
    16931693                        $bp_classes[] = 'group-wire';
    1694                
     1694
    16951695                if ( bp_is_group_admin_page() )
    16961696                        $bp_classes[] = 'group-admin';
    1697                        
     1697
    16981698                if ( bp_is_group_create() )
    16991699                        $bp_classes[] = 'group-create';
    1700                
     1700
    17011701                if ( bp_is_group_home() )
    17021702                        $bp_classes[] = 'group-home';
    1703                        
     1703
    17041704                if ( bp_is_profile_wire() )
    17051705                        $bp_classes[] = 'profile-wire';
    1706                        
     1706
    17071707                if ( bp_is_change_avatar() )
    17081708                        $bp_classes[] = 'change-avatar';
    1709                        
     1709
    17101710                if ( bp_is_profile_edit() )
    17111711                        $bp_classes[] = 'profile-edit';
    1712                        
     1712
    17131713                if ( bp_is_user_friends_activity() )
    17141714                        $bp_classes[] = 'friends-activity';
    1715                        
     1715
    17161716                if ( bp_is_user_activity() )
    17171717                        $bp_classes[] = 'my-activity';
    1718                
     1718
    17191719                if ( bp_is_register_page() )
    17201720                        $bp_classes[] = 'registration';
    1721                
     1721
    17221722                if ( bp_is_activation_page() )
    17231723                        $bp_classes[] = 'activation';
    1724                        
     1724
    17251725                if ( is_user_logged_in() )
    17261726                        $bp_classes[] = 'logged-in';
    … …  
    17301730                        if ( !empty( $bp->current_component ) )
    17311731                                $bp_classes[] = $bp->current_component;
    1732                
     1732
    17331733                        if ( !empty( $bp->current_action ) )
    17341734                                $bp_classes[] = $bp->current_action;
    17351735                }
    1736                
     1736
    17371737                /* We don't want WordPress blog classes to appear on non-blog pages. */
    17381738                if ( !bp_is_blog_page() || is_home() ) {
    … …  
    17431743                                $wp_classes = array();
    17441744                }
    1745  
     1745
    17461746                /* Merge WP classes with BP classes */
    17471747                $classes = array_merge( (array) $bp_classes, (array) $wp_classes );
    1748                
     1748
    17491749                /* Remove any duplicates */
    17501750                $classes = array_unique( $classes );
    1751                
     1751
    17521752                return apply_filters( 'bp_get_the_body_class', $classes, $bp_classes, $wp_classes, $custom_classes );
    17531753        }
Note: See TracChangeset for help on using the changeset viewer.