Skip to:
Content

BuddyPress.org

Ticket #3466: 3466.001.diff

File 3466.001.diff, 95.7 KB (added by cnorris23, 14 years ago)
  • bp-themes/bp-default/groups/single/forum/topic.php

     
    2323
    2424                <div id="topic-meta">
    2525                        <h3><?php bp_the_topic_title() ?> (<?php bp_the_topic_total_post_count() ?>)</h3>
    26                        
     26
    2727                        <?php if ( bp_forum_topic_has_tags() ) : ?>
    28                                
     28
    2929                                <div class="topic-tags">
    30                                
     30
    3131                                        <?php _e( 'Topic tags:', 'buddypress' ) ?> <?php bp_forum_topic_tag_list() ?>
    32                                
     32
    3333                                </div>
    34                                
     34
    3535                        <?php endif; ?>
    3636
    3737                        <?php if ( bp_group_is_admin() || bp_group_is_mod() || bp_get_the_topic_is_mine() ) : ?>
  • bp-themes/bp-default/groups/single/forum/edit.php

     
    5151
    5252                                        <label for="topic_text"><?php _e( 'Content:', 'buddypress' ); ?></label>
    5353                                        <textarea name="topic_text" id="topic_text"><?php bp_the_topic_text(); ?></textarea>
    54                                        
     54
    5555                                        <label><?php _e( 'Tags (comma separated):', 'buddypress' ) ?></label>
    5656                                        <input type="text" name="topic_tags" id="topic_tags" value="<?php bp_forum_topic_tag_list() ?>" />
    5757
  • bp-themes/bp-default/groups/single/home.php

     
    3838                                elseif ( bp_is_group_invites() && bp_group_is_visible() ) :
    3939                                        locate_template( array( 'groups/single/send-invites.php' ), true );
    4040
    41                                         elseif ( bp_is_group_forum() && bp_group_is_visible() && bp_is_active( 'forums' ) && bp_forums_is_installed_correctly() ) : 
     41                                        elseif ( bp_is_group_forum() && bp_group_is_visible() && bp_is_active( 'forums' ) && bp_forums_is_installed_correctly() ) :
    4242                                                locate_template( array( 'groups/single/forum.php' ), true );
    4343
    4444                                elseif ( bp_is_group_membership_request() ) :
  • bp-themes/bp-default/groups/create.php

     
    107107                                        </div>
    108108
    109109                                        <hr />
    110                                        
    111                                         <h4><?php _e( 'Group Invitations', 'buddypress' ); ?></h4>
    112110
    113                                         <p><?php _e( 'Which members of this group are allowed to invite others?', 'buddypress' ) ?></p>
    114                                
    115                                         <div class="radio">
    116                                                 <label>
    117                                                         <input type="radio" name="group-invite-status" value="members"<?php bp_group_show_invite_status_setting( 'members' ) ?> />
    118                                                         <strong><?php _e( 'All group members', 'buddypress' ) ?></strong>
    119                                                 </label>
    120                                
    121                                                 <label>
    122                                                         <input type="radio" name="group-invite-status" value="mods"<?php bp_group_show_invite_status_setting( 'mods' ) ?> />
    123                                                         <strong><?php _e( 'Group admins and mods only', 'buddypress' ) ?></strong>
     111                                        <h4><?php _e( 'Group Invitations', 'buddypress' ); ?></h4>
     112
     113                                        <p><?php _e( 'Which members of this group are allowed to invite others?', 'buddypress' ) ?></p>
     114
     115                                        <div class="radio">
     116                                                <label>
     117                                                        <input type="radio" name="group-invite-status" value="members"<?php bp_group_show_invite_status_setting( 'members' ) ?> />
     118                                                        <strong><?php _e( 'All group members', 'buddypress' ) ?></strong>
    124119                                                </label>
    125                                                
    126                                                 <label>
    127                                                         <input type="radio" name="group-invite-status" value="admins"<?php bp_group_show_invite_status_setting( 'admins' ) ?> />
    128                                                         <strong><?php _e( 'Group admins only', 'buddypress' ) ?></strong>
    129                                                 </label>
    130                                         </div>
    131                                
    132                                         <hr />
    133120
     121                                                <label>
     122                                                        <input type="radio" name="group-invite-status" value="mods"<?php bp_group_show_invite_status_setting( 'mods' ) ?> />
     123                                                        <strong><?php _e( 'Group admins and mods only', 'buddypress' ) ?></strong>
     124                                                </label>
     125
     126                                                <label>
     127                                                        <input type="radio" name="group-invite-status" value="admins"<?php bp_group_show_invite_status_setting( 'admins' ) ?> />
     128                                                        <strong><?php _e( 'Group admins only', 'buddypress' ) ?></strong>
     129                                                </label>
     130                                        </div>
     131
     132                                        <hr />
     133
    134134                                        <?php do_action( 'bp_after_group_settings_creation_step' ); ?>
    135135
    136136                                        <?php wp_nonce_field( 'groups_create_save_group-settings' ); ?>
  • bp-themes/bp-default/members/single/activity.php

     
    1515                <?php bp_get_options_nav() ?>
    1616
    1717                <li id="activity-filter-select" class="last">
    18                         <label for="activity-filter-by"><?php _e( 'Show:', 'buddypress' ); ?></label> 
     18                        <label for="activity-filter-by"><?php _e( 'Show:', 'buddypress' ); ?></label>
    1919                        <select id="activity-filter-by">
    2020                                <option value="-1"><?php _e( 'Everything', 'buddypress' ) ?></option>
    2121                                <option value="activity_update"><?php _e( 'Updates', 'buddypress' ) ?></option>
  • bp-themes/bp-default/members/single/forums/topics.php

     
    11<?php
    2 /* 
     2/*
    33 * To change this template, choose Tools | Templates
    44 * and open the template in the editor.
    55 */
  • bp-themes/bp-default/members/single/home.php

     
    3737                        <div id="item-body">
    3838
    3939                                <?php do_action( 'bp_before_member_body' );
    40                                
     40
    4141                                if ( bp_is_user_activity() || !bp_current_component() ) :
    4242                                        locate_template( array( 'members/single/activity.php' ), true );
    4343
  • bp-themes/bp-default/activity/entry.php

     
    9090        <?php if ( ( is_user_logged_in() && bp_activity_can_comment() ) || bp_activity_get_comment_count() ) : ?>
    9191
    9292                <div class="activity-comments">
    93                        
     93
    9494                        <?php bp_activity_comments(); ?>
    9595
    9696                        <?php if ( is_user_logged_in() ) : ?>
  • bp-themes/bp-default/activity/comment.php

     
    99 * @package BuddyPress
    1010 * @subpackage bp-default
    1111 */
    12  
     12
    1313?>
    1414
    1515<?php do_action( 'bp_before_activity_comment' ); ?>
  • bp-themes/bp-default/index.php

     
    44                <div class="padder">
    55
    66                <?php do_action( 'bp_before_blog_home' ) ?>
    7                
     7
    88                <?php do_action( 'template_notices' ) ?>
    99
    1010                <div class="page" id="blog-latest" role="main">
  • bp-themes/bp-default/_inc/css/default-rtl.css

     
    11/*--------------------------------------------------------------
    22Hello, this is the BuddyPress Default rtl stylesheet.
    3 Right to left styles. This will transform the theme to read from 
     3Right to left styles. This will transform the theme to read from
    44right to left for languages that support this method.
    55----------------------------------------------------------------
    66>>> TABLE OF CONTENTS:
     
    3333        5.6 - Forms
    3434        5.7 - Topics and Tables - Forums and General
    3535        5.8 - Headers, Lists and Tabs - Activity, Groups, Blogs, Forums
    36         5.9 - Private Messaging Threads 
     36        5.9 - Private Messaging Threads
    3737--------------------------------------------------------------*/
    3838/*--------------------------------------------------------------
    39391.0 - Structure
     
    238238        margin-right: 5px;
    239239        float: right;
    240240}
    241 #nav li li { 
     241#nav li li {
    242242        margin-left: auto;
    243         margin-right: 0; 
     243        margin-right: 0;
    244244}
    245245#nav ul,
    246246#nav .sfhover ul ul,
  • bp-themes/bp-default/_inc/css/default.css

     
    13061306        -webkit-border-radius: 3px;
    13071307        border-radius: 3px;
    13081308        color: #fff;
    1309         font-size: 90%; 
     1309        font-size: 90%;
    13101310        margin-left: 2px;
    13111311        padding: 0 5px;
    13121312}
     
    21872187        text-decoration: none;
    21882188}
    21892189div.item-list-tabs ul li a span {
    2190         background: #1fb3dd; 
     2190        background: #1fb3dd;
    21912191        -moz-border-radius: 3px;
    21922192        -webkit-border-radius: 3px;
    21932193        border-radius: 3px;
    21942194        color: #fff;
    21952195        display: inline;
    2196         font-size: 90%; 
     2196        font-size: 90%;
    21972197        margin-left: 2px;
    21982198        padding: 1px 6px;
    21992199}
  • bp-themes/bp-default/_inc/global.js

     
    928928                                        var inboxcount = jq('tr.unread').length;
    929929
    930930                                        jq('a#user-messages span').html( inboxcount );
    931                                        
     931
    932932                                        if ( i != checkboxes.length - 1 ) {
    933933                                                checkboxes_tosend += ','
    934934                                        }
  • bp-xprofile/bp-xprofile-loader.php

     
    231231if ( !isset( $bp->profile->id ) )
    232232        $bp->profile = new BP_XProfile_Component();
    233233
    234 ?>
     234?>
     235 No newline at end of file
  • bp-xprofile/bp-xprofile-filters.php

     
    9797                        $kses_field_value       = xprofile_filter_kses( $value );
    9898                        $filtered_value         = wp_rel_nofollow( force_balance_tags( $kses_field_value ) );
    9999                        $filtered_values[] = apply_filters( 'xprofile_filtered_data_value_before_save', $filtered_value, $value );
    100                        
     100
    101101                }
    102102
    103103                if ( $reserialize )
     
    180180}
    181181add_filter( 'comments_array', 'xprofile_filter_comments', 10, 2 );
    182182
    183 ?>
     183?>
     184 No newline at end of file
  • bp-xprofile/bp-xprofile-template.php

     
    195195}
    196196        function bp_get_field_css_class( $class = false ) {
    197197                global $profile_template;
    198                
     198
    199199                $css_classes = array();
    200200
    201201                if ( $class )
     
    709709        function bp_get_profile_group_name() {
    710710                if ( !$group_id = bp_action_variable( 1 ) )
    711711                        $group_id = 1;
    712                        
     712
    713713                if ( !is_numeric( $group_id ) )
    714714                        $group_id = 1;
    715715
  • bp-xprofile/bp-xprofile-activity.php

     
    115115 */
    116116function bp_xprofile_new_avatar_activity() {
    117117        global $bp;
    118        
     118
    119119        if ( !bp_is_active( 'activity' ) )
    120120                return false;
    121121
  • bp-xprofile/bp-xprofile-classes.php

     
    167167
    168168                        if ( !empty( $field_ids ) )
    169169                                $field_data = $wpdb->get_results( $wpdb->prepare( "SELECT field_id, value FROM {$bp->profile->table_name_data} WHERE field_id IN ( {$field_ids_sql} ) AND user_id = %d", $user_id ) );
    170                                
     170
    171171                        // Remove data-less fields, if necessary
    172172                        if ( $hide_empty_fields ) {
    173                        
     173
    174174                                // Loop through the results and find the fields that have data.
    175175                                foreach( (array)$field_data as $data ) {
    176176                                        if ( false !== $key = array_search( $data->field_id, $field_ids ) ) {
     
    178178                                                unset( $field_ids[$key] );
    179179                                        }
    180180                                }
    181                                
     181
    182182                                // The remaining members of $field_ids are empty. Remove them.
    183183                                foreach( $fields as $field_key => $field ) {
    184184                                        if ( in_array( $field->id, $field_ids ) ) {
    185185                                                unset( $fields[$field_key] );
    186186                                        }
    187187                                }
    188                                
     188
    189189                                // Reset indexes
    190190                                $fields = array_values( $fields );
    191                                
     191
    192192                        }
    193                        
     193
    194194                        // Field data was found
    195195                        if ( !empty( $field_data ) && !is_wp_error( $field_data ) ) {
    196                                
     196
    197197                                // Loop through fields
    198198                                foreach( (array)$fields as $field_key => $field ) {
    199                                        
     199
    200200                                        // Loop throught the data in each field
    201201                                        foreach( (array)$field_data as $data ) {
    202                                        
     202
    203203                                                // Assign correct data value to the field
    204204                                                if ( $field->id == $data->field_id )
    205205                                                        $fields[$field_key]->data->value = $data->value;
    206                                         }       
    207                                 }       
     206                                        }
     207                                }
    208208                        }
    209209                }
    210210
     
    214214                                if ( $group->id == $field->group_id )
    215215                                        $groups[$group_key]->fields[] = $field;
    216216                        }
    217                        
     217
    218218                        // When we unset fields above, we may have created empty groups.
    219219                        // Remove them, if necessary.
    220220                        if ( empty( $group->fields ) && $hide_empty_groups ) {
    221221                                unset( $groups[$group_key] );
    222222                        }
    223                        
     223
    224224                        // Reset indexes
    225225                        $groups = array_values( $groups );
    226226                }
     
    327327        var $data;
    328328        var $message = null;
    329329        var $message_type = 'err';
    330        
     330
    331331        function bp_xprofile_field( $id = null, $user_id = null, $get_data = true ) {
    332332                $this->__construct( $id, $user_id, $get_data );
    333333        }
    334        
     334
    335335        function __construct( $id = null, $user_id = null, $get_data = true ) {
    336336                if ( $id )
    337337                        $this->populate( $id, $user_id, $get_data );
     
    793793        var $field_id;
    794794        var $value;
    795795        var $last_updated;
    796        
     796
    797797        function bp_xprofile_profiledata( $field_id = null, $user_id = null ) {
    798                 $this->__construct( $field_id, $user_id );             
     798                $this->__construct( $field_id, $user_id );
    799799        }
    800        
     800
    801801        function __construct( $field_id = null, $user_id = null ) {
    802802                if ( $field_id )
    803803                        $this->populate( $field_id, $user_id );
  • bp-xprofile/bp-xprofile-actions.php

     
    2222 */
    2323function xprofile_action_delete_avatar() {
    2424        global $bp;
    25        
     25
    2626        if ( !bp_is_current_component( 'profile' ) || !bp_is_current_action( 'change-avatar' ) || !bp_is_action_variable( 'delete-avatar', 0 ) )
    2727                return false;
    2828
     
    4141}
    4242add_action( 'bp_actions', 'xprofile_action_delete_avatar' );
    4343
    44 ?>
     44?>
     45 No newline at end of file
  • bp-xprofile/bp-xprofile-screens.php

     
    1414 * @package BuddyPress XProfile
    1515 * @uses bp_core_load_template() Looks for and loads a template file within the current member theme (folder/filename)
    1616 */
    17 function xprofile_screen_display_profile() {   
     17function xprofile_screen_display_profile() {
    1818        $new = isset( $_GET['new'] ) ? $_GET['new'] : '';
    1919
    2020        do_action( 'xprofile_screen_display_profile', $new );
     
    174174        bp_core_load_template( apply_filters( 'xprofile_template_change_avatar', 'members/single/home' ) );
    175175}
    176176
    177 ?>
     177?>
     178 No newline at end of file
  • bp-xprofile/bp-xprofile-cache.php

     
    2727// List actions to clear super cached pages on, if super cache is installed
    2828add_action( 'xprofile_updated_profile', 'bp_core_clear_cache' );
    2929
    30 ?>
     30?>
     31 No newline at end of file
  • bp-core/bp-core-loader.php

     
    2424        require( BP_PLUGIN_DIR . '/bp-core/bp-core-adminbar.php'  );
    2525
    2626// Move active components from sitemeta, if necessary
    27 // Provides backpat with earlier versions of BP 
     27// Provides backpat with earlier versions of BP
    2828if ( is_multisite() && $active_components = get_site_option( 'bp-active-components' ) )
    2929        bp_update_option( 'bp-active-components', $active_components );
    3030
  • bp-core/bp-core-filters.php

     
    7676        if ( $wpdb->blogid == bp_get_root_blog_id() ) {
    7777                $themes['bp-default'] = 1;
    7878        }
    79        
     79
    8080        return $themes;
    8181}
    8282add_filter( 'allowed_themes', 'bp_core_allow_default_theme' );
     
    278278        // Displayed user
    279279        if ( !empty( $bp->displayed_user->fullname ) && !is_404() ) {
    280280                // translators: "displayed user's name | canonicalised component name"
    281                 $title = strip_tags( sprintf( __( '%1$s | %2$s', 'buddypress' ), bp_get_displayed_user_fullname(), ucwords( bp_current_component() ) ) ); 
     281                $title = strip_tags( sprintf( __( '%1$s | %2$s', 'buddypress' ), bp_get_displayed_user_fullname(), ucwords( bp_current_component() ) ) );
    282282
    283283        // A single group
    284284        } elseif ( bp_is_active( 'groups' ) && !empty( $bp->groups->current_group ) && !empty( $bp->bp_options_nav[$bp->groups->current_group->slug] ) ) {
     
    313313        // Blog creation page
    314314        } elseif ( bp_is_create_blog() ) {
    315315                $title = __( 'Create a Site', 'buddypress' );
    316         }       
     316        }
    317317
    318318        // Some BP nav items contain item counts. Remove them
    319319        $title = preg_replace( '|<span>[0-9]+</span>|', '', $title );
  • bp-core/bp-core-functions.php

     
    129129 */
    130130function bp_core_get_directory_pages() {
    131131        global $wpdb, $bp;
    132        
     132
    133133        // Set pages as standard class
    134134        $pages = new stdClass;
    135135
     
    978978 */
    979979function bp_core_get_root_options() {
    980980        global $wpdb;
    981        
     981
    982982        // These options come from the root blog options table
    983983        $root_blog_options = apply_filters( 'bp_core_site_options', array(
    984        
     984
    985985        // BuddyPress core settings
    986986        'bp-deactivated-components'       => serialize( array( ) ),
    987987        'bp-blogs-first-install'          => '0',
     
    994994        'bp-disable-blogforum-comments'   => '0',
    995995        'bb-config-location'              => ABSPATH,
    996996        'hide-loggedout-adminbar'         => '0',
    997        
     997
    998998        // Useful WordPress settings
    999999        'registration'                    => '0',
    10001000        'avatar_default'                  => 'mysteryman'
    10011001        ) );
    1002        
     1002
    10031003        $root_blog_option_keys  = array_keys( $root_blog_options );
    10041004        $blog_options_keys      = implode( "', '", (array) $root_blog_option_keys );
    10051005        $blog_options_query     = sprintf( "SELECT option_name AS name, option_value AS value FROM {$wpdb->options} WHERE option_name IN ('%s')", $blog_options_keys );
    10061006        $root_blog_options_meta = $wpdb->get_results( $blog_options_query );
    1007        
     1007
    10081008        // On Multisite installations, some options must always be fetched from sitemeta
    10091009        if ( is_multisite() ) {
    10101010                $network_options = apply_filters( 'bp_core_network_options', array(
     
    10121012                        'registration'    => '0',
    10131013                        'fileupload_maxk' => '1500'
    10141014                ) );
    1015                
     1015
    10161016                $network_option_keys    = array_keys( $network_options );
    10171017                $sitemeta_options_keys  = implode( "','", (array) $network_option_keys );
    10181018                $sitemeta_options_query = sprintf( "SELECT meta_key AS name, meta_value AS value FROM {$wpdb->sitemeta} WHERE meta_key IN ('%s')", $sitemeta_options_keys );
    10191019                $network_options_meta   = $wpdb->get_results( $sitemeta_options_query );
    1020                
     1020
    10211021                // Sitemeta comes second in the merge, so that network 'registration' value wins
    10221022                $root_blog_options_meta = array_merge( $root_blog_options_meta, $network_options_meta );
    10231023        }
    1024        
     1024
    10251025        // Missing some options, so do some one-time fixing
    10261026        if ( empty( $root_blog_options_meta ) || ( count( $root_blog_options_meta ) < count( $root_blog_option_keys ) ) ) {
    1027        
     1027
    10281028        // Unset the query - We'll be resetting it soon
    10291029        unset( $root_blog_options_meta );
    1030        
     1030
    10311031        // Loop through options
    10321032        foreach ( $root_blog_options as $old_meta_key => $old_meta_default ) {
    10331033                // Clear out the value from the last time around
    10341034                unset( $old_meta_value );
    1035                
     1035
    10361036                // Get old site option
    10371037                if ( is_multisite() )
    10381038                        $old_meta_value = get_site_option( $old_meta_key );
    1039                
     1039
    10401040                // No site option so look in root blog
    10411041                if ( empty( $old_meta_value ) )
    10421042                        $old_meta_value = bp_get_option( $old_meta_key, $old_meta_default );
    1043                
     1043
    10441044                // Update the root blog option
    10451045                bp_update_option( $old_meta_key, $old_meta_value );
    1046                
     1046
    10471047                // Update the global array
    10481048                $root_blog_options_meta[$old_meta_key] = $old_meta_value;
    10491049        }
    1050        
     1050
    10511051        // We're all matched up
    10521052        } else {
    10531053                // Loop through our results and make them usable
    10541054                foreach ( $root_blog_options_meta as $root_blog_option )
    10551055                        $root_blog_options[$root_blog_option->name] = $root_blog_option->value;
    1056                
     1056
    10571057                // Copy the options no the return val
    10581058                $root_blog_options_meta = $root_blog_options;
    1059                
     1059
    10601060                // Clean up our temporary copy
    10611061                unset( $root_blog_options );
    10621062        }
    1063        
     1063
    10641064        return apply_filters( 'bp_core_get_root_options', $root_blog_options_meta );
    10651065}
    10661066
     
    10901090        if ( empty( $match ) ) {
    10911091                $bp->add_root[] = $slug;
    10921092        }
    1093        
     1093
    10941094        // Make sure that this component is registered as requiring a top-level directory
    10951095        if ( isset( $bp->{$slug} ) ) {
    10961096                $bp->loaded_components[$bp->{$slug}->slug] = $bp->{$slug}->id;
     
    14641464        if ( 'remove_canonical_direct' == $redirect )
    14651465                remove_action( 'template_redirect', 'redirect_canonical' );
    14661466}
    1467 ?>
     1467?>
     1468 No newline at end of file
  • bp-core/bp-core-template.php

     
    494494 */
    495495function bp_action_variable( $position = 0 ) {
    496496        $action_variables = bp_action_variables();
    497        
     497
    498498        $action_variable = isset( $action_variables[$position] ) ? $action_variables[$position] : false;
    499        
     499
    500500        return apply_filters( 'bp_action_variable', $action_variable, $position );
    501501}
    502502
     
    668668                // Because slugs can differ from root_slugs, we should check them too
    669669                } elseif ( isset( $bp->{$component}->slug ) && $bp->{$component}->slug == $bp->current_component ) {
    670670                        $is_current_component = true;
    671                        
     671
    672672                // Next, check to see whether $component is a canonical,
    673673                // non-translatable component name. If so, we can return its
    674674                // corresponding slug from $bp->active_components.
     
    676676                        if ( strstr( $bp->current_component, $key ) )
    677677                                $is_current_component = true;
    678678
    679                 // If we haven't found a match yet, check against the root_slugs 
     679                // If we haven't found a match yet, check against the root_slugs
    680680                // created by $bp->pages, as well as the regular slugs
    681681                } else {
    682682                        foreach ( $bp->active_components as $key => $id ) {
     
    751751 * @param int $position The array key you're testing against. If you don't provide a $position,
    752752 *   the function will return true if the $action_variable is found *anywhere* in the action
    753753 *   variables array.
    754  * @return bool 
     754 * @return bool
    755755 */
    756756function bp_is_action_variable( $action_variable = '', $position = false ) {
    757757        $is_action_variable = false;
    758        
     758
    759759        if ( false !== $position ) {
    760                 // When a $position is specified, check that slot in the action_variables array         
     760                // When a $position is specified, check that slot in the action_variables array
    761761                if ( $action_variable ) {
    762762                        $is_action_variable = $action_variable == bp_action_variable( $position );
    763763                } else {
     
    769769                // When no $position is specified, check the entire array
    770770                $is_action_variable = in_array( $action_variable, (array)bp_action_variables() );
    771771        }
    772        
     772
    773773        return apply_filters( 'bp_is_action_variable', $is_action_variable, $action_variable, $position );
    774774}
    775775
     
    828828 */
    829829function bp_is_root_component( $component_name ) {
    830830        global $bp;
    831        
     831
    832832        if ( !isset( $bp->active_components ) )
    833833                return false;
    834834
     
    10291029
    10301030        if ( bp_is_current_component( 'xprofile' ) && bp_is_current_action( 'edit' ) )
    10311031                return true;
    1032                
     1032
    10331033        return false;
    10341034}
    10351035
  • bp-core/css/admin.dev.css

     
    9191                float: right;
    9292                top: 5px;
    9393        }
    94        
     94
    9595div#bp-admin div.prev-next, div#bp-admin div.prev-next p,
    9696div#bp-admin div.submit, div#bp-admin div.submit p {
    9797        margin: 0;
  • bp-core/admin/bp-core-admin.php

     
    1818 * @package BuddyPress Core
    1919 * @since {@internal Unknown}}
    2020 */
    21 function bp_core_admin_dashboard() { 
     21function bp_core_admin_dashboard() {
    2222        $base_url = bp_get_admin_url( 'admin.php' );
    2323        $action   = add_query_arg( array( 'page' => 'bp-general-settings' ), $base_url );
    2424        ?>
     
    330330 */
    331331function bp_core_admin_component_options() {
    332332        global $bp_wizard;
    333        
     333
    334334        // Load core functions, if needed
    335335        if ( !function_exists( 'bp_get_option' ) )
    336336                require( BP_PLUGIN_DIR . '/bp-core/bp-core-functions.php' );
    337337
    338338        $active_components = apply_filters( 'bp_active_components', bp_get_option( 'bp-active-components' ) );
    339        
     339
    340340        // An array of strings looped over to create component setup markup
    341341        $optional_components = apply_filters( 'bp_admin_optional_components', array(
    342342                'xprofile' => array(
     
    387387                        'description' => __( 'Everything in a BuddyPress community revolves around its members.', 'buddypress' )
    388388                ),
    389389        ) );
    390        
     390
    391391        // On new install, set all components to be active by default
    392392        if ( !empty( $bp_wizard ) && 'install' == $bp_wizard->setup_type && empty( $active_components ) )
    393393                $active_components = $optional_components;
    394394
    395395        ?>
    396        
     396
    397397        <?php /* The setup wizard uses different, more descriptive text here */ ?>
    398398        <?php if ( empty( $bp_wizard ) ) : ?>
    399399
    400400                <h3><?php _e( 'Available Components', 'buddypress' ); ?></h3>
    401                                
     401
    402402                <p><?php _e( 'Each component has a unique purpose, and your community may not need each one.', 'buddypress' ); ?></p>
    403403
    404404        <?php endif ?>
    405        
     405
    406406        <table class="form-table">
    407407                <tbody>
    408408
     
    479479 */
    480480function bp_core_admin_page_options() {
    481481        global $bp;
    482        
     482
    483483        // Get the existing WP pages
    484484        $existing_pages = bp_core_get_directory_page_ids();
    485485
     
    491491
    492492                // Only components that need directories should be listed here
    493493                if ( isset( $bp->{$component_id} ) && !empty( $bp->{$component_id}->has_directory ) ) {
    494                        
     494
    495495                        // component->name was introduced in BP 1.5, so we must provide a fallback
    496496                        $component_name = !empty( $bp->{$component_id}->name ) ? $bp->{$component_id}->name : ucwords( $component_id );
    497                        
     497
    498498                        $directory_pages[$component_id] = $component_name;
    499499                }
    500500        }
    501        
     501
    502502        $directory_pages = apply_filters( 'bp_directory_pages', $directory_pages );
    503        
     503
    504504        ?>
    505        
     505
    506506        <h3><?php _e( 'Directories', 'buddypress' ); ?></h3>
    507        
     507
    508508        <p><?php _e( 'Associate a WordPress Page with each BuddyPress component directory.', 'buddypress' ); ?></p>
    509509
    510510        <table class="form-table">
     
    512512
    513513                        <?php foreach ( $directory_pages as $name => $label ) : ?>
    514514                                <?php $disabled = !bp_is_active( $name ) ? ' disabled="disabled"' : ''; ?>
    515                                
     515
    516516                                <tr valign="top">
    517517                                        <th scope="row">
    518518                                                <label for="bp_pages[<?php echo esc_attr( $name ) ?>]"><?php echo esc_html( $label ) ?><?php if ( !bp_is_active( $name ) ) : ?> <span class="description">(deactivated)</span><?php endif ?></label>
    519519                                        </th>
    520520
    521521                                        <td>
    522                                                 <?php if ( !bp_is_root_blog() ) 
     522                                                <?php if ( !bp_is_root_blog() )
    523523                                                        switch_to_blog( bp_get_root_blog_id() ) ?>
    524                                                
     524
    525525                                                <?php echo wp_dropdown_pages( array(
    526526                                                        'name'             => 'bp_pages[' . esc_attr( $name ) . ']',
    527527                                                        'echo'             => false,
     
    537537                                                        <a href="<?php echo get_permalink( $existing_pages[$name] ); ?>" class="button-secondary" target="_bp"><?php _e( 'View' ); ?></a>
    538538
    539539                                                <?php endif; ?>
    540                                                
    541                                                 <?php if ( !bp_is_root_blog() ) 
     540
     541                                                <?php if ( !bp_is_root_blog() )
    542542                                                        restore_current_blog() ?>
    543543
    544544                                        </td>
     
    551551
    552552                </tbody>
    553553        </table>
    554        
     554
    555555        <?php
    556556
    557557        // Static pages
     
    620620        wp_enqueue_style( 'thickbox' );
    621621}
    622622
    623 ?>
     623?>
     624 No newline at end of file
  • bp-core/admin/bp-core-update.php

     
    262262        <?php
    263263        }
    264264
    265         function step_ms_update() {             
     265        function step_ms_update() {
    266266                if ( !current_user_can( 'activate_plugins' ) )
    267267                        return false;
    268268
     
    370370                        return false;
    371371
    372372                $existing_pages = bp_core_update_get_page_meta();
    373                
     373
    374374                // Provide empty indexes to avoid PHP errors with wp_dropdown_pages()
    375375                $indexes = array( 'members', 'activity', 'groups', 'forums', 'blogs', 'register', 'activate' );
    376376                foreach ( $indexes as $index ) {
    377377                        if ( !isset( $existing_pages[$index] ) )
    378378                                $existing_pages[$index] = '';
    379379                }
    380                
     380
    381381                if ( !empty( $existing_pages['blogs'] ) )
    382382                        $existing_blog_page = '&selected=' . $existing_pages['blogs'];
    383383                else
     
    12711271
    12721272function bp_core_update_do_network_admin() {
    12731273        $do_network_admin = false;
    1274        
     1274
    12751275        if ( is_multisite() && ( !defined( 'BP_ENABLE_MULTIBLOG' ) || !BP_ENABLE_MULTIBLOG ) )
    12761276                $do_network_admin = true;
    1277        
     1277
    12781278        return apply_filters( 'bp_core_do_network_admin', $do_network_admin );
    12791279}
    12801280
    12811281function bp_core_update_admin_hook() {
    12821282        $hook = bp_core_update_do_network_admin() ? 'network_admin_menu' : 'admin_menu';
    1283        
     1283
    12841284        return apply_filters( 'bp_core_admin_hook', $hook );
    12851285}
    12861286
     
    13211321add_action( 'admin_notices', 'bp_core_update_nag', 5 );
    13221322add_action( 'network_admin_notices', 'bp_core_update_nag', 5 );
    13231323
    1324 ?>
     1324?>
     1325 No newline at end of file
  • bp-core/bp-core-hooks.php

     
    3434
    3535// Setup widgets
    3636add_action( 'bp_loaded',  'bp_setup_widgets'           );
    37        
     37
    3838// Setup admin bar
    3939add_action( 'bp_loaded',  'bp_core_load_admin_bar'     );
    4040
     
    111111        do_action( 'bp_screens' );
    112112}
    113113
    114 ?>
     114?>
     115 No newline at end of file
  • bp-core/bp-core-cssjs.php

     
    7777
    7878        $image = apply_filters( 'bp_inline_cropper_image', getimagesize( bp_core_avatar_upload_path() . $bp->avatar_admin->image->dir ) );
    7979        $aspect_ratio = 1;
    80        
     80
    8181        $full_height = bp_core_avatar_full_height();
    8282        $full_width  = bp_core_avatar_full_width();
    83        
     83
    8484        // Calculate Aspect Ratio
    8585        if ( $full_height && ( $full_width != $full_height ) )
    8686                $aspect_ratio = $full_width / $full_height;
     
    173173}
    174174add_action( 'wp_head', 'bp_core_add_ajax_url_js' );
    175175
    176 ?>
     176?>
     177 No newline at end of file
  • bp-core/deprecated/1.5.php

     
    217217 * @since 1.0
    218218 */
    219219function bp_page_title() {
    220         echo bp_get_page_title(); 
     220        echo bp_get_page_title();
    221221}
    222222        /**
    223223         * Prior to BuddyPress 1.5, this was used to generate the page's <title> text.
     
    259259 */
    260260function groups_at_message_notification( $content, $poster_user_id, $group_id, $activity_id ) {
    261261        global $bp;
    262        
     262
    263263        _deprecated_function( __FUNCTION__, '1.5', 'bp_activity_at_message_notification()' );
    264264
    265265        /* Scan for @username strings in an activity update. Notify each user. */
     
    336336/**
    337337 * In BP 1.5, these functions were renamed for greater consistency
    338338 */
    339 function bp_forum_directory_permalink() { 
     339function bp_forum_directory_permalink() {
    340340        _deprecated_function( __FUNCTION__, '1.5', 'bp_forums_directory_permalink()' );
    341341        bp_forums_directory_permalink();
    342 } 
    343         function bp_get_forum_directory_permalink() { 
     342}
     343        function bp_get_forum_directory_permalink() {
    344344                _deprecated_function( __FUNCTION__, '1.5', 'bp_get_forums_directory_permalink()' );
    345345                return bp_get_forums_directory_permalink();
    346346        }
    347        
     347
    348348/** Theme *********************************************************************/
    349349
    350350/**
  • bp-core/bp-core-catchuri.php

     
    180180                        unset( $uri_chunks );
    181181                }
    182182        }
    183        
    184         // URLs with BP_ENABLE_ROOT_PROFILES enabled won't be caught above 
     183
     184        // URLs with BP_ENABLE_ROOT_PROFILES enabled won't be caught above
    185185        if ( empty( $matches ) && defined( 'BP_ENABLE_ROOT_PROFILES' ) && BP_ENABLE_ROOT_PROFILES ) {
    186                
     186
    187187                // Make sure there's a user corresponding to $bp_uri[0]
    188188                if ( !empty( $bp_uri[0] ) && $root_profile = get_userdatabylogin( $bp_uri[0] ) ) {
    189                        
     189
    190190                        // Force BP to recognize that this is a members page
    191191                        $matches[]  = 1;
    192192                        $match      = $bp->pages->members;
    193193                        $match->key = 'members';
    194                        
     194
    195195                        // Without the 'members' URL chunk, WordPress won't know which page to load
    196196                        // This filter intercepts the WP query and tells it to load the members page
    197197                        add_filter( 'request', create_function( '$query_args', '$query_args["pagename"] = "' . $match->name . '"; return $query_args;' ) );
    198                
     198
    199199                }
    200        
     200
    201201        }
    202202
    203203        // Search doesn't have an associated page, so we check for it separately
     
    223223        }
    224224
    225225        // Global the unfiltered offset to use in bp_core_load_template().
    226         // To avoid PHP warnings in bp_core_load_template(), it must always be >= 0 
     226        // To avoid PHP warnings in bp_core_load_template(), it must always be >= 0
    227227        $bp_unfiltered_uri_offset = $uri_offset >= 0 ? $uri_offset : 0;
    228228
    229229        // We have an exact match
     
    237237
    238238                        // Viewing a specific user
    239239                        if ( !empty( $bp_uri[$uri_offset + 1] ) ) {
    240                                
     240
    241241                                // Switch the displayed_user based on compatbility mode
    242242                                if ( bp_is_username_compatibility_mode() )
    243243                                        $bp->displayed_user->id = (int) bp_core_get_userid( urldecode( $bp_uri[$uri_offset + 1] ) );
     
    246246
    247247                                if ( empty( $bp->displayed_user->id ) ) {
    248248                                        // Prevent components from loading their templates
    249                                         $bp->current_component = ''; 
     249                                        $bp->current_component = '';
    250250
    251251                                        bp_do_404();
    252252                                        return;
     
    262262                                        $bp_uri                = array_merge( array(), array_slice( $bp_uri, $uri_offset + 2 ) );
    263263                                        $bp->current_component = '';
    264264                                }
    265                                
     265
    266266                                // Reset the offset
    267267                                $uri_offset = 0;
    268268                        }
  • bp-core/bp-core-component.php

     
    3333         * @var string Unique slug (used in query string and permalinks)
    3434         */
    3535        var $slug;
    36        
     36
    3737        /**
    38          * @var bool Does this component need a top-level directory? 
     38         * @var bool Does this component need a top-level directory?
    3939         */
    4040        var $has_directory;
    4141
     
    138138                if ( !empty( $r['global_tables'] ) )
    139139                        foreach ( $r['global_tables'] as $global_name => $table_name )
    140140                                $this->$global_name = $table_name;
    141                
     141
    142142                /** BuddyPress ********************************************************/
    143143
    144144                // Register this component in the loaded components array
     
    342342}
    343343endif; // BP_Component
    344344
    345 ?>
     345?>
     346 No newline at end of file
  • bp-core/bp-core-cache.php

     
    4848add_action( 'wp_login',              'bp_core_clear_cache' );
    4949add_action( 'bp_core_render_notice', 'bp_core_clear_cache' );
    5050
    51 ?>
     51?>
     52 No newline at end of file
  • bp-friends/bp-friends-screens.php

     
    9494}
    9595add_action( 'bp_notification_settings', 'friends_screen_notification_settings' );
    9696
    97 ?>
     97?>
     98 No newline at end of file
  • bp-friends/bp-friends-cache.php

     
    3535add_action( 'friends_friendship_deleted',   'bp_core_clear_cache' );
    3636add_action( 'friends_friendship_requested', 'bp_core_clear_cache' );
    3737
    38 ?>
     38?>
     39 No newline at end of file
  • bp-friends/bp-friends-functions.php

     
    256256
    257257function friends_update_friend_totals( $initiator_user_id, $friend_user_id, $status = 'add' ) {
    258258        global $bp;
    259        
     259
    260260        if ( 'add' == $status ) {
    261261                bp_update_user_meta( $initiator_user_id, 'total_friend_count', (int)bp_get_user_meta( $initiator_user_id, 'total_friend_count', true ) + 1 );
    262262                bp_update_user_meta( $friend_user_id, 'total_friend_count', (int)bp_get_user_meta( $friend_user_id, 'total_friend_count', true ) + 1 );
     
    285285add_action( 'delete_user',       'friends_remove_data' );
    286286add_action( 'bp_make_spam_user', 'friends_remove_data' );
    287287
    288 ?>
     288?>
     289 No newline at end of file
  • bp-friends/bp-friends-notifications.php

     
    3434', 'buddypress' ), $initiator_name, $all_requests_link, $initiator_name, $initiator_link );
    3535
    3636        $message .= sprintf( __( 'To disable these notifications please log in and go to: %s', 'buddypress' ), $settings_link );
    37        
     37
    3838        /* Send the message */
    3939        $to = apply_filters( 'friends_notification_new_request_to', $to );
    4040        $subject = apply_filters( 'friends_notification_new_request_subject', $subject, $initiator_name );
  • bp-friends/bp-friends-template.php

     
    7575 */
    7676function bp_friends_filter_title() {
    7777        $current_filter = bp_action_variable( 0 );
    78        
     78
    7979        switch ( $current_filter ) {
    8080                case 'recently-active': default:
    8181                        _e( 'Recently Active', 'buddypress' );
     
    143143                $user_ids = BP_Core_User::get_users( 'random', $total_members );
    144144                wp_cache_set( 'friends_random_users', $user_ids, 'bp' );
    145145        }
    146        
     146
    147147        ?>
    148148
    149149        <?php if ( $user_ids['users'] ) { ?>
     
    446446                return apply_filters( 'bp_friend_get_total_requests_count', count( BP_Friends_Friendship::get_friend_user_ids( $user_id, true ) ) );
    447447        }
    448448
    449 ?>
     449?>
     450 No newline at end of file
  • bp-friends/bp-friends-activity.php

     
    7070        switch ( $action ) {
    7171                case 'friendship_accepted':
    7272                        $link = bp_loggedin_user_domain() . bp_get_friends_slug() . '/my-friends/newest';
    73                        
     73
    7474                        // Set up the string and the filter
    7575                        if ( (int)$total_items > 1 ) {
    7676                                $text = sprintf( __( '%d friends accepted your friendship requests', 'buddypress' ), (int)$total_items );
     
    7979                                $text = sprintf( __( '%s accepted your friendship request', 'buddypress' ),  bp_core_get_user_displayname( $item_id ) );
    8080                                $filter = 'bp_friends_single_friendship_accepted_notification';
    8181                        }
    82                        
     82
    8383                        break;
    8484
    8585                case 'friendship_request':
    8686                        $link = bp_loggedin_user_domain() . bp_get_friends_slug() . '/requests?new';
    87                        
     87
    8888                        // Set up the string and the filter
    8989                        if ( (int)$total_items > 1 ) {
    9090                                $text = sprintf( __( 'You have %d pending friendship requests', 'buddypress' ), (int)$total_items );
     
    9393                                $text = sprintf( __( 'You have a friendship request from %s', 'buddypress' ),  bp_core_get_user_displayname( $item_id ) );
    9494                                $filter = 'bp_friends_single_friendship_request_notification';
    9595                        }
    96                
     96
    9797                        break;
    9898        }
    99                
     99
    100100        // Return either an HTML link or an array, depending on the requested format
    101101        if ( 'string' == $format ) {
    102102                $return = apply_filters( $filter, '<a href="' . $link . '">' . $text . '</a>', (int)$total_items );
     
    112112        return $return;
    113113}
    114114
    115 ?>
     115?>
     116 No newline at end of file
  • bp-friends/bp-friends-actions.php

     
    7878}
    7979add_action( 'bp_init', 'friends_action_remove_friend' );
    8080
    81 ?>
     81?>
     82 No newline at end of file
  • bp-members/bp-members-screens.php

     
    4545add_action( 'bp_screens', 'bp_members_screen_index' );
    4646
    4747
    48 ?>
     48?>
     49 No newline at end of file
  • bp-members/bp-members-signup.php

     
    373373        // Multisite installs have their own install procedure
    374374        if ( is_multisite() ) {
    375375                wpmu_signup_user( $user_login, $user_email, $usermeta );
    376                
     376
    377377                // On multisite, the user id is not created until the user activates the account
    378378                // but we need to cast $user_id to pass to the filters
    379379                $user_id = false;
  • bp-members/bp-members-loader.php

     
    186186// Create the users component
    187187$bp->members = new BP_Members_Component();
    188188
    189 ?>
     189?>
     190 No newline at end of file
  • bp-members/bp-members-filters.php

     
    4545}
    4646add_action( 'bp_loaded', 'bp_members_signup_sanitization' );
    4747
    48 ?>
     48?>
     49 No newline at end of file
  • bp-members/bp-members-functions.php

     
    509509        // No user found
    510510        if ( empty( $user ) ) {
    511511                $is_spammer = false;
    512                
     512
    513513        // User found
    514514        } else {
    515515
     
    547547        // No user found
    548548        if ( empty( $user ) ) {
    549549                $is_deleted = true;
    550                
     550
    551551        // User found
    552552        } else {
    553553
     
    702702        return false;
    703703}
    704704
    705 ?>
     705?>
     706 No newline at end of file
  • bp-members/bp-members-notifications.php

     
    5858
    5959        if ( empty( $grouped_notifications ) )
    6060                return false;
    61        
     61
    6262        $renderable = array();
    63        
     63
    6464        // Calculate a renderable output for each notification type
    6565        foreach ( (array)$grouped_notifications as $component_name => $action_arrays ) {
    6666                if ( !$action_arrays )
     
    7575                        // @deprecated format_notification_function - 1.5
    7676                        if ( isset( $bp->{$component_name}->format_notification_function ) && function_exists( $bp->{$component_name}->format_notification_function ) ) {
    7777                                $renderable[] = call_user_func( $bp->{$component_name}->format_notification_function, $component_action_name, $component_action_items[0]->item_id, $component_action_items[0]->secondary_item_id, $action_item_count );
    78                         } elseif ( isset( $bp->{$component_name}->notification_callback ) && function_exists( $bp->{$component_name}->notification_callback ) ) { 
     78                        } elseif ( isset( $bp->{$component_name}->notification_callback ) && function_exists( $bp->{$component_name}->notification_callback ) ) {
    7979                                if ( 'object' == $format ) {
    8080                                        $content = call_user_func( $bp->{$component_name}->notification_callback, $component_action_name, $component_action_items[0]->item_id, $component_action_items[0]->secondary_item_id, $action_item_count, 'array' );
    81                                        
     81
    8282                                        $notification_object = new stdClass;
    83                                        
     83
    8484                                        // Minimal backpat with non-compatible notification
    8585                                        // callback functions
    8686                                        if ( is_string( $content ) ) {
     
    9090                                                $notification_object->content = $content['text'];
    9191                                                $notification_object->href    = $content['link'];
    9292                                        }
    93                                        
     93
    9494                                        $notification_object->id = $component_action_items[0]->id;
    95                                        
     95
    9696                                        $renderable[]     = $notification_object;
    9797                                } else {
    9898                                        $content = call_user_func( $bp->{$component_name}->notification_callback, $component_action_name, $component_action_items[0]->item_id, $component_action_items[0]->secondary_item_id, $action_item_count );
     
    128128        return true;
    129129}
    130130
    131 ?>
     131?>
     132 No newline at end of file
  • bp-members/bp-members-template.php

     
    895895}
    896896        function bp_get_displayed_user_username() {
    897897                global $bp;
    898                
     898
    899899                if ( !empty( $bp->displayed_user->id ) ) {
    900900                        $username = bp_core_get_username( $bp->displayed_user->id, $bp->displayed_user->userdata->user_nicename, $bp->displayed_user->userdata->user_login );
    901901                } else {
    902902                        $username = '';
    903903                }
    904                
     904
    905905                return apply_filters( 'bp_get_displayed_user_username', $username );
    906906        }
    907907
     
    910910}
    911911        function bp_get_loggedin_user_username() {
    912912                global $bp;
    913                
     913
    914914                if ( !empty( $bp->loggedin_user->id ) ) {
    915915                        $username = bp_core_get_username( $bp->loggedin_user->id, $bp->loggedin_user->userdata->user_nicename, $bp->loggedin_user->userdata->user_login );
    916916                } else {
    917917                        $username = '';
    918918                }
    919                
     919
    920920                return apply_filters( 'bp_get_loggedin_user_username', $username );
    921921        }
    922922
     
    11791179                        return $url;
    11801180        }
    11811181
    1182 ?>
     1182?>
     1183 No newline at end of file
  • bp-members/bp-members-buddybar.php

     
    9999                return false; ?>
    100100
    101101        <li id="bp-adminbar-adminoptions-menu">
    102                
     102
    103103                <a href=""><?php _e( 'Admin Options', 'buddypress' ) ?></a>
    104104
    105105                <ul>
     
    108108                                <li><a href="<?php bp_members_component_link( 'profile', 'edit' ); ?>"><?php printf( __( "Edit %s's Profile", 'buddypress' ), esc_attr( $bp->displayed_user->fullname ) ) ?></a></li>
    109109
    110110                        <?php endif ?>
    111                        
     111
    112112                        <li><a href="<?php bp_members_component_link( 'profile', 'change-avatar' ); ?>"><?php printf( __( "Edit %s's Avatar", 'buddypress' ), esc_attr( $bp->displayed_user->fullname ) ) ?></a></li>
    113                        
     113
    114114                        <?php if ( !bp_core_is_user_spammer( $bp->displayed_user->id ) ) : ?>
    115115
    116116                                <li><a href="<?php echo wp_nonce_url( $bp->displayed_user->domain . 'admin/mark-spammer/', 'mark-unmark-spammer' ) ?>" class="confirm"><?php printf( __( "Mark as Spammer", 'buddypress' ), esc_attr( $bp->displayed_user->fullname ) ); ?></a></li>
     
    119119
    120120                                <li><a href="<?php echo wp_nonce_url( $bp->displayed_user->domain . 'admin/unmark-spammer/', 'mark-unmark-spammer' ) ?>" class="confirm"><?php _e( "Not a Spammer", 'buddypress' ) ?></a></li>
    121121
    122                         <?php endif; ?>                 
    123        
     122                        <?php endif; ?>
     123
    124124                        <li><a href="<?php echo wp_nonce_url( $bp->displayed_user->domain . 'admin/delete-user/', 'delete-user' ) ?>" class="confirm"><?php printf( __( "Delete %s's Account", 'buddypress' ), esc_attr( $bp->displayed_user->fullname ) ); ?></a></li>
    125125
    126126                        <?php do_action( 'bp_members_adminbar_admin_menu' ) ?>
     
    132132}
    133133add_action( 'bp_adminbar_menus', 'bp_members_adminbar_admin_menu', 20 );
    134134
    135 ?>
     135?>
     136 No newline at end of file
  • bp-members/bp-members-adminbar.php

     
    110110                'title'  => __( "Edit Profile", 'buddypress' ),
    111111                'href'   => bp_get_members_component_link( 'profile', 'edit' )
    112112        ) );
    113        
     113
    114114        // User Admin > Edit this user's avatar
    115115        $wp_admin_bar->add_menu( array(
    116116                'parent' => $bp->user_admin_menu_id,
     
    118118                'title'  => __( "Edit Avatar", 'buddypress' ),
    119119                'href'   => bp_get_members_component_link( 'profile', 'change-avatar' )
    120120        ) );
    121        
     121
    122122        // User Admin > Spam/unspam
    123123        if ( !bp_core_is_user_spammer( bp_displayed_user_id() ) ) {
    124124                $wp_admin_bar->add_menu( array(
     
    126126                        'id'     => 'spam-user',
    127127                        'title'  => __( 'Mark as Spammer', 'buddypress' ),
    128128                        'href'   => wp_nonce_url( bp_displayed_user_domain() . 'admin/mark-spammer/', 'mark-unmark-spammer' ),
    129                         'meta'   => array( 'onclick' => 'confirm(" ' . __( 'Are you sure you want to mark this user as a spammer?', 'buddypress' ) . '");' ) 
    130                 ) );   
     129                        'meta'   => array( 'onclick' => 'confirm(" ' . __( 'Are you sure you want to mark this user as a spammer?', 'buddypress' ) . '");' )
     130                ) );
    131131        } else {
    132132                $wp_admin_bar->add_menu( array(
    133133                        'parent' => $bp->user_admin_menu_id,
    134134                        'id'     => 'unspam-user',
    135135                        'title'  => __( 'Not a Spammer', 'buddypress' ),
    136136                        'href'   => wp_nonce_url( bp_displayed_user_domain() . 'admin/unmark-spammer/', 'mark-unmark-spammer' ),
    137                         'meta'   => array( 'onclick' => 'confirm(" ' . __( 'Are you sure you want to mark this user as not a spammer?', 'buddypress' ) . '");' ) 
     137                        'meta'   => array( 'onclick' => 'confirm(" ' . __( 'Are you sure you want to mark this user as not a spammer?', 'buddypress' ) . '");' )
    138138                ) );
    139139        }
    140        
     140
    141141        // User Admin > Delete Account
    142142        $wp_admin_bar->add_menu( array(
    143143                'parent' => $bp->user_admin_menu_id,
    144144                'id'     => 'delete-user',
    145145                'title'  => __( 'Delete Account', 'buddypress' ),
    146146                'href'   => wp_nonce_url( bp_displayed_user_domain() . 'admin/delete-user/', 'delete-user' ),
    147                 'meta'   => array( 'onclick' => 'confirm(" ' . __( "Are you sure you want to delete this user's account?", 'buddypress' ) . '");' ) 
     147                'meta'   => array( 'onclick' => 'confirm(" ' . __( "Are you sure you want to delete this user's account?", 'buddypress' ) . '");' )
    148148        ) );
    149149}
    150150add_action( 'bp_setup_admin_bar', 'bp_members_admin_bar_user_admin_menu', 99 );
     
    160160
    161161        if ( !is_user_logged_in() )
    162162                return false;
    163                
     163
    164164        if ( $notifications = bp_core_get_notifications_for_user( bp_loggedin_user_id(), 'object' ) ) {
    165165                $menu_title = sprintf( __( 'Notifications <span id="ab-pending-notifications" class="pending-count">%s</span>', 'buddypress' ), count( $notifications ) );
    166166        } else {
    167167                $menu_title = __( 'Notifications', 'buddypress' );
    168168        }
    169        
     169
    170170        // Add the top-level Notifications button
    171171        $wp_admin_bar->add_menu( array(
    172172                'id'    => 'bp-notifications',
    173173                'title' => $menu_title,
    174174                'href'  => bp_loggedin_user_domain()
    175175        ) );
    176        
     176
    177177        if ( !empty( $notifications ) ) {
    178178                foreach ( (array)$notifications as $notification ) {
    179179                        $wp_admin_bar->add_menu( array(
     
    191191                        'href'   => bp_loggedin_user_domain()
    192192                ) );
    193193        }
    194        
     194
    195195        return;
    196196}
    197197add_action( 'bp_setup_admin_bar', 'bp_members_admin_bar_notifications_menu', 999 );
  • bp-members/bp-members-actions.php

     
    106106
    107107                // Allow plugins to do neat things
    108108                do_action( 'bp_core_action_set_spammer_status', bp_displayed_user_id(), $is_spam );
    109                
     109
    110110                // Redirect back to where we came from
    111111                bp_core_redirect( wp_get_referer() );
    112112        }
  • bp-loader.php

     
    3030
    3131// Define on which blog ID BuddyPress should run
    3232if ( !defined( 'BP_ROOT_BLOG' ) ) {
    33        
     33
    3434        // Root blog is the main site on this network
    3535        if ( is_multisite() && !defined( 'BP_ENABLE_MULTIBLOG' ) ) {
    3636                $current_site = get_current_site();
    3737                $root_blog_id = $current_site->blog_id;
    38                
     38
    3939        // Root blog is every site on this network
    4040        } elseif ( is_multisite() && defined( 'BP_ENABLE_MULTIBLOG' ) ) {
    4141                $root_blog_id = get_current_blog_id();
    42                
     42
    4343        // Root blog is the only blog on this network
    4444        } elseif( !is_multisite() ) {
    4545                $root_blog_id = 1;
     
    9797
    9898if ( !function_exists( 'bp_loader_activate' ) ) :
    9999/**
    100  * Defines BP's activation routine. 
    101  * 
    102  * Most of BP's crucial setup is handled by the setup wizard. This function takes care of some 
    103  * issues with incompatible legacy themes, and provides a hook for other functions to know that 
    104  * BP has been activated. 
    105  * 
    106  * @package BuddyPress Core 
    107 */ 
     100 * Defines BP's activation routine.
     101 *
     102 * Most of BP's crucial setup is handled by the setup wizard. This function takes care of some
     103 * issues with incompatible legacy themes, and provides a hook for other functions to know that
     104 * BP has been activated.
     105 *
     106 * @package BuddyPress Core
     107*/
    108108function bp_loader_activate() {
    109109        // Force refresh theme roots.
    110110        delete_site_transient( 'theme_roots' );
  • bp-activity/bp-activity-actions.php

     
    322322}
    323323add_action( 'bp_actions', 'bp_activity_action_favorites_feed' );
    324324
    325 ?>
     325?>
     326 No newline at end of file
  • bp-activity/bp-activity-screens.php

     
    7878 * @uses bp_activity_clear_new_mentions()
    7979 * @uses bp_is_my_profile()
    8080 */
    81 function bp_activity_reset_my_new_mentions() { 
     81function bp_activity_reset_my_new_mentions() {
    8282        if ( bp_is_my_profile() )
    8383                bp_activity_clear_new_mentions( bp_loggedin_user_id() );
    8484}
     
    9090        // No displayed user or not viewing activity component
    9191        if ( !bp_is_activity_component() )
    9292                return false;
    93        
    94         if ( empty( $bp->current_action ) || !is_numeric( $bp->current_action ) ) 
    95                 return false; 
    96        
     93
     94        if ( empty( $bp->current_action ) || !is_numeric( $bp->current_action ) )
     95                return false;
     96
    9797        // Get the activity details
    9898        $activity = bp_activity_get_specific( array( 'activity_ids' => bp_current_action(), 'show_hidden' => true ) );
    9999
     
    196196}
    197197add_action( 'bp_notification_settings', 'bp_activity_screen_notification_settings', 1 );
    198198
    199 ?>
     199?>
     200 No newline at end of file
  • bp-activity/bp-activity-loader.php

     
    282282// Create the activity component
    283283$bp->activity = new BP_Activity_Component();
    284284
    285 ?>
     285?>
     286 No newline at end of file
  • bp-activity/bp-activity-filters.php

     
    7373add_filter( 'bp_get_activity_latest_update_excerpt', 'bp_activity_make_nofollow_filter' );
    7474add_filter( 'bp_get_activity_feed_item_description', 'bp_activity_make_nofollow_filter' );
    7575
    76 add_filter( 'pre_comment_content',                   'bp_activity_at_name_filter' ); 
    77 add_filter( 'group_forum_topic_text_before_save',    'bp_activity_at_name_filter' ); 
    78 add_filter( 'group_forum_post_text_before_save',     'bp_activity_at_name_filter' ); 
     76add_filter( 'pre_comment_content',                   'bp_activity_at_name_filter' );
     77add_filter( 'group_forum_topic_text_before_save',    'bp_activity_at_name_filter' );
     78add_filter( 'group_forum_post_text_before_save',     'bp_activity_at_name_filter' );
    7979
    8080add_filter( 'bp_get_activity_parent_content',        'bp_create_excerpt' );
    8181
     
    112112 * @package BuddyPress Activity
    113113 *
    114114 * @param string $content The activity content
    115  * @param int $activity_id When $adjust_mention_count is true, you must provide an $activity_id, 
     115 * @param int $activity_id When $adjust_mention_count is true, you must provide an $activity_id,
    116116 *   which will be added to the list of the user's unread mentions
    117117 */
    118118function bp_activity_at_name_filter( $content, $activity_id = 0 ) {
     
    135135                $content = preg_replace( '/(@' . $username . '\b)/', "<a href='" . bp_core_get_user_domain( $user_id ) . "' rel='nofollow'>@$username</a>", $content );
    136136        }
    137137
    138         // Adjust the activity count for this item     
     138        // Adjust the activity count for this item
    139139        if ( $activity_id )
    140140                bp_activity_adjust_mention_count( $activity_id, 'add' );
    141141
    142142        return $content;
    143 } 
     143}
    144144
    145145/**
    146146 * Catch mentions in saved activity items
     
    153153function bp_activity_at_name_filter_updates( $activity ) {
    154154        // Only run this function once for a given activity item
    155155        remove_filter( 'bp_activity_after_save', 'bp_activity_at_name_filter_updates' );
    156        
     156
    157157        // Run the content through the linking filter, making sure to increment mention count
    158158        $activity->content = bp_activity_at_name_filter( $activity->content, $activity->id );
    159        
     159
    160160        // Resave the activity with the new content
    161161        $activity->save();
    162162}
  • bp-activity/bp-activity-functions.php

     
    10521052
    10531053        $bp->activity->read_more_id = $activity->id;
    10541054
    1055         add_filter( 'embed_post_id',            create_function( '', 'global $bp; return $bp->activity->read_more_id;' ) ); 
     1055        add_filter( 'embed_post_id',            create_function( '', 'global $bp; return $bp->activity->read_more_id;' ) );
    10561056        add_filter( 'bp_embed_get_cache',       'bp_embed_activity_cache',      10, 3 );
    10571057        add_action( 'bp_embed_update_cache',    'bp_embed_activity_save_cache', 10, 3 );
    10581058}
  • bp-activity/bp-activity-notifications.php

     
    66 * Sends an email notification and a BP notification when someone mentions you in an update
    77 *
    88 * @package BuddyPress Activity
    9  * @param str $content The content of the activity update 
     9 * @param str $content The content of the activity update
    1010 * @param int $poster_user_id The unique user_id of the user who sent the update
    1111 * @param int $activity_id The id of the activity update
    1212 */
     
    1717
    1818        $subject = '';
    1919        $message = '';
    20        
     20
    2121        // Add the BP notification
    2222        bp_core_add_notification( $activity_id, $receiver_user_id, 'activity', 'new_at_mention', $activity->user_id );
    23                        
     23
    2424        // Now email the user with the contents of the message (if they have enabled email notifications)
    2525        if ( 'no' != bp_get_user_meta( $receiver_user_id, 'notification_activity_new_mention', true ) ) {
    2626                $poster_name = bp_core_get_user_displayname( $activity->user_id );
     
    6868
    6969                wp_mail( $to, $subject, $message );
    7070        }
    71        
     71
    7272        do_action( 'bp_activity_sent_mention_email', $activity, $subject, $message, $content );
    7373}
    7474
     
    161161        }
    162162}
    163163
    164 ?>
     164?>
     165 No newline at end of file
  • bp-activity/bp-activity-template.php

     
    15871587}
    15881588add_action( 'bp_head', 'bp_activity_sitewide_feed' );
    15891589
    1590 ?>
     1590?>
     1591 No newline at end of file
  • bp-activity/bp-activity-classes.php

     
    467467
    468468                // array of prepared integers or quoted strings
    469469                $items_prepared = array();
    470                
     470
    471471                // clean up and format each item
    472472                foreach ( $items_dirty as $item ) {
    473473                        // clean up the string
     
    548548        }
    549549}
    550550
    551 ?>
     551?>
     552 No newline at end of file
  • bp-settings/bp-settings-actions.php

     
    164164        bp_core_load_template( apply_filters( 'bp_core_screen_delete_account', 'members/single/settings/delete-account' ) );
    165165}
    166166
    167 ?>
     167?>
     168 No newline at end of file
  • bp-settings/bp-settings-loader.php

     
    173173// Create the settingss component
    174174$bp->settings = new BP_Settings_Component();
    175175
    176 ?>
     176?>
     177 No newline at end of file
  • bp-settings/bp-settings-template.php

     
    5757                return apply_filters( 'bp_get_settings_root_slug', $bp->settings->root_slug );
    5858        }
    5959
    60 ?>
     60?>
     61 No newline at end of file
  • bp-blogs/bp-blogs-loader.php

     
    184184// Create the blogs component
    185185$bp->blogs = new BP_Blogs_Component();
    186186
    187 ?>
     187?>
     188 No newline at end of file
  • bp-blogs/bp-blogs-functions.php

     
    3434}
    3535
    3636/**
    37  * Populates the BP blogs table with existing blogs. 
     37 * Populates the BP blogs table with existing blogs.
    3838 *
    3939 * @package BuddyPress Blogs
    4040 *
     
    5555                foreach( (array)$blog_ids as $blog_id ) {
    5656                        $users          = get_users( array( 'blog_id' => $blog_id ) );
    5757                        $subscribers    = get_users( array( 'blog_id' => $blog_id, 'role' => 'subscriber' ) );
    58                        
     58
    5959                        if ( $users ) {
    6060                                foreach ( (array)$users as $user ) {
    6161                                        // Don't record blogs for subscribers
     
    102102        bp_blogs_update_blogmeta( $recorded_blog->blog_id, 'last_activity', bp_core_current_time() );
    103103
    104104        $is_private = !empty( $_POST['blog_public'] ) && (int)$_POST['blog_public'] ? false : true;
    105         $is_private = !apply_filters( 'bp_is_new_blog_public', !$is_private ); 
     105        $is_private = !apply_filters( 'bp_is_new_blog_public', !$is_private );
    106106
    107107        // Only record this activity if the blog is public
    108108        if ( !$is_private && !$no_activity ) {
     
    165165        if ( 'post' != $post->post_type )
    166166                return false;
    167167
    168         $is_blog_public = apply_filters( 'bp_is_blog_public', (int)get_blog_option( $blog_id, 'blog_public' ) ); 
     168        $is_blog_public = apply_filters( 'bp_is_blog_public', (int)get_blog_option( $blog_id, 'blog_public' ) );
    169169
    170170        if ( 'publish' == $post->post_status && empty( $post->post_password ) ) {
    171171                if ( $is_blog_public || !is_multisite() ) {
  • bp-blogs/bp-blogs-template.php

     
    636636                return bp_get_button( apply_filters( 'bp_get_blogs_visit_blog_button', $button ) );
    637637        }
    638638
    639 ?>
     639?>
     640 No newline at end of file
  • bp-blogs/bp-blogs-activity.php

     
    9191        }
    9292}
    9393
    94 ?>
     94?>
     95 No newline at end of file
  • bp-blogs/bp-blogs-buddybar.php

     
    6060}
    6161add_action( 'bp_adminbar_menus', 'bp_adminbar_blogs_menu', 6 );
    6262
    63 ?>
     63?>
     64 No newline at end of file
  • bp-blogs/bp-blogs-actions.php

     
    1313}
    1414add_action( 'bp_actions', 'bp_blogs_redirect_to_random_blog' );
    1515
    16 ?>
     16?>
     17 No newline at end of file
  • bp-blogs/bp-blogs-screens.php

     
    3535}
    3636add_action( 'bp_screens', 'bp_blogs_screen_index', 2 );
    3737
    38 ?>
     38?>
     39 No newline at end of file
  • bp-blogs/bp-blogs-cache.php

     
    3434add_action( 'bp_blogs_new_blog',             'bp_core_clear_cache' );
    3535add_action( 'bp_blogs_remove_data',          'bp_core_clear_cache' );
    3636
    37 ?>
     37?>
     38 No newline at end of file
  • bp-messages/bp-messages-loader.php

     
    6868                        'table_name_messages'   => $bp->table_prefix . 'bp_messages_messages',
    6969                        'table_name_recipients' => $bp->table_prefix . 'bp_messages_recipients'
    7070                );
    71                
     71
    7272                // All globals for messaging component.
    7373                // Note that global_tables is included in this array.
    7474                $globals = array(
  • bp-messages/bp-messages-functions.php

     
    5656                        $message->subject = __( 'No Subject', 'buddypress' );
    5757
    5858                $recipient_ids      = array();
    59                
     59
    6060                // Invalid recipients are added to an array, for future enhancements
    6161                $invalid_recipients = array();
    6262
     
    7171                                        $recipient_id = (int) $recipient;
    7272
    7373                        } else {
    74                                 if ( bp_is_username_compatibility_mode() ) 
    75                                         $recipient_id = bp_core_get_userid( $recipient ); 
     74                                if ( bp_is_username_compatibility_mode() )
     75                                        $recipient_id = bp_core_get_userid( $recipient );
    7676                                else
    7777                                        $recipient_id = bp_core_get_userid_from_nicename( $recipient );
    7878                        }
    79                        
     79
    8080                        if ( !$recipient_id )
    8181                                $invalid_recipients[] = $recipient;
    8282                        else
     
    235235        if ( 'new_message' == $action ) {
    236236                $link  = bp_loggedin_user_domain() . bp_get_messages_slug() . '/inbox';
    237237                $title = __( 'Inbox', 'buddypress' );
    238                
     238
    239239                if ( (int)$total_items > 1 ) {
    240240                        $text = sprintf( __('You have %d new messages', 'buddypress' ), (int)$total_items );
    241241                        $filter = 'bp_messages_multiple_new_message_notification';
  • bp-messages/bp-messages-classes.php

     
    9494                        $type_sql = $wpdb->prepare( " AND r.unread_count != 0 " );
    9595                elseif ( $type == 'read' )
    9696                        $type_sql = $wpdb->prepare( " AND r.unread_count = 0 " );
    97                
     97
    9898                if ( 'sentbox' == $box ) {
    9999                        $thread_ids = $wpdb->get_results( $wpdb->prepare( "SELECT m.thread_id, MAX(m.date_sent) AS date_sent FROM {$bp->messages->table_name_recipients} r, {$bp->messages->table_name_messages} m WHERE m.thread_id = r.thread_id AND m.sender_id = r.user_id AND m.sender_id = %d AND r.is_deleted = 0 GROUP BY m.thread_id ORDER BY date_sent DESC {$pag_sql}", $user_id ) );
    100100                        $total_threads = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT( DISTINCT m.thread_id ) FROM {$bp->messages->table_name_recipients} r, {$bp->messages->table_name_messages} m WHERE m.thread_id = r.thread_id AND m.sender_id = r.user_id AND m.sender_id = %d AND r.is_deleted = 0 ", $user_id ) );
     
    253253        function bp_messages_message( $id = null ) {
    254254                $this->__construct( $id );
    255255        }
    256        
     256
    257257        function __construct( $id = null ) {
    258258                global $bp;
    259259
     
    378378        function bp_messages_notice( $id = null ) {
    379379                $this->__construct($id);
    380380        }
    381        
     381
    382382        function __construct( $id = null ) {
    383383                if ( $id ) {
    384384                        $this->id = $id;
  • bp-messages/bp-messages-actions.php

     
    1515                return false;
    1616
    1717        $thread_id = (int)bp_action_variable( 0 );
    18        
     18
    1919        if ( !$thread_id || !messages_is_valid_thread( $thread_id ) || ( !messages_check_thread_access( $thread_id ) && !is_super_admin() ) )
    2020                bp_core_redirect( bp_displayed_user_domain() . bp_get_messages_slug() );
    2121
     
    3636
    3737        // Mark message read
    3838        messages_mark_thread_read( $thread_id );
    39        
     39
    4040        // Decrease the unread count in the nav before it's rendered
    4141        $name = sprintf( __( 'Messages <span>%s</span>', 'buddypress' ), bp_get_total_unread_messages_count() );
    42        
     42
    4343        $bp->bp_nav[$bp->messages->slug]['name'] = $name;
    4444
    4545        do_action( 'messages_action_view_message' );
     
    6666                return false;
    6767
    6868        $thread_id = bp_action_variable( 1 );
    69        
     69
    7070        if ( !$thread_id || !is_numeric( $thread_id ) || !messages_check_thread_access( $thread_id ) ) {
    7171                bp_core_redirect( bp_displayed_user_domain() . bp_get_messages_slug() . '/' . bp_current_action() );
    7272        } else {
  • bp-messages/bp-messages-screens.php

     
    9191                return false;
    9292
    9393        $notice_id = (int)bp_action_variable( 1 );
    94        
     94
    9595        if ( !empty( $notice_id ) && is_numeric( $notice_id ) ) {
    9696                $notice = new BP_Messages_Notice( $notice_id );
    9797
  • bp-messages/bp-messages-cache.php

     
    1717add_action( 'messages_screen_sentbox', 'bp_core_clear_cache' );
    1818add_action( 'messages_screen_inbox',   'bp_core_clear_cache' );
    1919
    20 ?>
     20?>
     21 No newline at end of file
  • bp-forums/bp-forums-loader.php

     
    105105                // Stop if there is no user displayed or logged in
    106106                if ( !is_user_logged_in() && !isset( $bp->displayed_user->id ) )
    107107                        return;
    108                
     108
    109109                // Add 'Forums' to the main navigation
    110110                $main_nav = array(
    111111                        'name'                => __( 'Forums', 'buddypress' ),
     
    247247// Create the forums component
    248248$bp->forums = new BP_Forums_Component();
    249249
    250 ?>
     250?>
     251 No newline at end of file
  • bp-forums/bp-forums-admin.php

     
    1515add_action( bp_core_admin_hook(), 'bp_forums_add_admin_menu' );
    1616
    1717function bp_forums_bbpress_admin() {
    18         global $bp; 
    19        
     18        global $bp;
     19
    2020        $action = bp_get_admin_url( 'admin.php?page=bb-forums-setup&reinstall=1' );
    2121        ?>
    2222
     
    9999                                        default:
    100100                                                // Just write the contents to screen
    101101                                                _e( '<p>A configuration file could not be created. No problem, but you will need to save the text shown below into a file named <code>bb-config.php</code> in the root directory of your WordPress installation before you can start using the forum functionality.</p>', 'buddypress' ); ?>
    102                                        
     102
    103103                                                <textarea style="display:block; margin-top: 30px; width: 80%;" rows="50"><?php echo htmlspecialchars( $result ); ?></textarea>
    104104
    105105                                        <?php
     
    294294        return 1;
    295295}
    296296
    297 ?>
     297?>
     298 No newline at end of file
  • bp-forums/bp-forums-filters.php

     
    156156 */
    157157function bp_forums_add_replied_distinct_sql( $sql ) {
    158158        global $wpdb;
    159        
     159
    160160        $sql = $wpdb->prepare( "DISTINCT t.topic_id, " );
    161        
     161
    162162        return $sql;
    163163}
    164164
     
    177177 */
    178178function bp_forums_add_replied_join_sql( $sql ) {
    179179        global $bbdb, $wpdb;
    180        
     180
    181181        $sql .= $wpdb->prepare( " LEFT JOIN $bbdb->posts p ON p.topic_id = t.topic_id " );
    182        
     182
    183183        return $sql;
    184184}
    185185
     
    197197 */
    198198function bp_forums_add_replied_where_sql( $sql ) {
    199199        global $wpdb;
    200        
     200
    201201        $sql .= $wpdb->prepare( " AND p.poster_id = %s ", bp_displayed_user_id() );
    202202
    203203        return $sql;
  • bp-forums/bp-forums-template.php

     
    13991399        function bp_get_forum_topic_count( $user_id = 0 ) {
    14001400                return apply_filters( 'bp_get_forum_topic_count', bp_forums_total_topic_count( $user_id ) );
    14011401        }
    1402 ?>
     1402?>
     1403 No newline at end of file
  • bp-forums/bp-forums-bbpress.php

     
    55
    66// Exit if accessed directly
    77if ( !defined( 'ABSPATH' ) ) exit;
    8 ?>
     8?>
     9 No newline at end of file
  • bp-groups/bp-groups-adminbar.php

     
    4949                'title' => $avatar . bp_get_current_group_name(),
    5050                'href'  => bp_get_group_permalink( $bp->groups->current_group )
    5151        ) );
    52        
     52
    5353        // Group Admin > Edit details
    5454        $wp_admin_bar->add_menu( array(
    5555                'parent' => $bp->group_admin_menu_id,
     
    5757                'title'  => __( 'Edit Details', 'buddypress' ),
    5858                'href'   =>  bp_get_groups_action_link( 'admin/edit-details' )
    5959        ) );
    60        
     60
    6161        // Group Admin > Group settings
    6262        $wp_admin_bar->add_menu( array(
    6363                'parent' => $bp->group_admin_menu_id,
     
    6565                'title'  => __( 'Edit Settings', 'buddypress' ),
    6666                'href'   =>  bp_get_groups_action_link( 'admin/group-settings' )
    6767        ) );
    68        
     68
    6969        // Group Admin > Group avatar
    7070        $wp_admin_bar->add_menu( array(
    7171                'parent' => $bp->group_admin_menu_id,
     
    7373                'title'  => __( 'Edit Avatar', 'buddypress' ),
    7474                'href'   =>  bp_get_groups_action_link( 'admin/group-avatar' )
    7575        ) );
    76        
     76
    7777        // Group Admin > Manage invitations
    7878        if ( bp_is_active( 'friends' ) ) {
    7979                $wp_admin_bar->add_menu( array(
     
    8383                        'href'   =>  bp_get_groups_action_link( 'send-invites' )
    8484                ) );
    8585        }
    86        
     86
    8787        // Group Admin > Manage members
    8888        $wp_admin_bar->add_menu( array(
    8989                'parent' => $bp->group_admin_menu_id,
     
    9191                'title'  => __( 'Manage Members', 'buddypress' ),
    9292                'href'   =>  bp_get_groups_action_link( 'admin/manage-members' )
    9393        ) );
    94        
     94
    9595        // Group Admin > Membership Requests
    9696        if ( bp_get_group_status( $bp->groups->current_group ) == 'private' ) {
    9797                $wp_admin_bar->add_menu( array(
     
    100100                        'title'  => __( 'Membership Requests', 'buddypress' ),
    101101                        'href'   =>  bp_get_groups_action_link( 'admin/membership-requests' )
    102102                ) );
    103         }       
    104        
     103        }
     104
    105105        // Delete Group
    106106        $wp_admin_bar->add_menu( array(
    107107                'parent' => $bp->group_admin_menu_id,
  • bp-groups/bp-groups-buddybar.php

     
    1717
    1818                <ul>
    1919                        <li><a href="<?php bp_groups_action_link( 'admin/edit-details' ); ?>"><?php _e( 'Edit Details', 'buddypress' ); ?></a></li>
    20                        
     20
    2121                        <li><a href="<?php bp_groups_action_link( 'admin/group-settings' );  ?>"><?php _e( 'Group Settings', 'buddypress' ); ?></a></li>
    22                        
     22
    2323                        <li><a href="<?php bp_groups_action_link( 'admin/group-avatar' ); ?>"><?php _e( 'Group Avatar', 'buddypress' ); ?></a></li>
    2424
    2525                        <?php if ( bp_is_active( 'friends' ) ) : ?>
     
    4747}
    4848add_action( 'bp_adminbar_menus', 'bp_groups_adminbar_admin_menu', 20 );
    4949
    50 ?>
     50?>
     51 No newline at end of file
  • bp-groups/bp-groups-activity.php

     
    9393                                $text = sprintf( __( '%1$d new membership requests for the group "%2$s"', 'buddypress' ), (int)$total_items, $group->name );
    9494                                $filter = 'bp_groups_multiple_new_membership_requests_notification';
    9595                                $notification_link = $group_link . 'admin/membership-requests/?n=1';
    96                                
     96
    9797                                if ( 'string' == $format ) {
    9898                                        return apply_filters( $filter, '<a href="' . $notification_link . '" title="' . __( 'Group Membership Requests', 'buddypress' ) . '">' . $text . '</a>', $group_link, $total_items, $group->name, $text, $notification_link );
    9999                                } else {
     
    107107                                $text = sprintf( __( '%s requests group membership', 'buddypress' ), $user_fullname );
    108108                                $filter = 'bp_groups_single_new_membership_request_notification';
    109109                                $notification_link = $group_link . 'admin/membership-requests/?n=1';
    110                                
     110
    111111                                if ( 'string' == $format ) {
    112112                                        return apply_filters( $filter, '<a href="' . $notification_link . '" title="' . sprintf( __( '%s requests group membership', 'buddypress' ), $user_fullname ) . '">' . $text . '</a>', $group_link, $user_fullname, $group->name, $text, $notification_link );
    113113                                } else {
     
    117117                                        ), $group_link, $user_fullname, $group->name, $text, $notification_link );
    118118                                }
    119119                        }
    120                        
     120
    121121                        break;
    122122
    123123                case 'membership_request_accepted':
     
    128128
    129129                        if ( (int)$total_items > 1 ) {
    130130                                $text = sprintf( __( '%d accepted group membership requests', 'buddypress' ), (int)$total_items, $group->name );
    131                                 $filter = 'bp_groups_multiple_membership_request_accepted_notification';                               
     131                                $filter = 'bp_groups_multiple_membership_request_accepted_notification';
    132132                                $notification_link = bp_loggedin_user_domain() . bp_get_groups_slug() . '/?n=1';
    133                                
     133
    134134                                if ( 'string' == $format ) {
    135135                                        return apply_filters( $filter, '<a href="' . $notification_link . '" title="' . __( 'Groups', 'buddypress' ) . '">' . $text . '</a>', $total_items, $group->name, $text, $notification_link );
    136136                                } else {
     
    143143                                $text = sprintf( __( 'Membership for group "%s" accepted', 'buddypress' ), $group->name );
    144144                                $filter = 'bp_groups_single_membership_request_accepted_notification';
    145145                                $notification_link = $group_link . '?n=1';
    146                                
     146
    147147                                if ( 'string' == $format ) {
    148148                                        return apply_filters( $filter, '<a href="' . $notification_link . '">' . $text . '</a>', $group_link, $group->name, $text, $notification_link );
    149149                                } else {
     
    161161
    162162                        $group = new BP_Groups_Group( $group_id );
    163163                        $group_link = bp_get_group_permalink( $group );
    164                        
     164
    165165                        if ( (int)$total_items > 1 ) {
    166166                                $text = sprintf( __( '%d rejected group membership requests', 'buddypress' ), (int)$total_items, $group->name );
    167167                                $filter = 'bp_groups_multiple_membership_request_rejected_notification';
    168168                                $notification_link = bp_loggedin_user_domain() . bp_get_groups_slug() . '/?n=1';
    169                                
     169
    170170                                if ( 'string' == $format ) {
    171171                                        return apply_filters( $filter, '<a href="' . $notification_link . '" title="' . __( 'Groups', 'buddypress' ) . '">' . $text . '</a>', $total_items, $group->name );
    172172                                } else {
     
    179179                                $text = sprintf( __( 'Membership for group "%s" rejected', 'buddypress' ), $group->name );
    180180                                $filter = 'bp_groups_single_membership_request_rejected_notification';
    181181                                $notification_link = $group_link . '?n=1';
    182                                
     182
    183183                                if ( 'string' == $format ) {
    184184                                        return apply_filters( $filter, '<a href="' . $notification_link . '">' . $text . '</a>', $group_link, $group->name, $text, $notification_link );
    185185                                } else {
     
    202202                                $text = sprintf( __( 'You were promoted to an admin in %d groups', 'buddypress' ), (int)$total_items );
    203203                                $filter = 'bp_groups_multiple_member_promoted_to_admin_notification';
    204204                                $notification_link = bp_loggedin_user_domain() . bp_get_groups_slug() . '?n=1';
    205                                
     205
    206206                                if ( 'string' == $format ) {
    207207                                        return apply_filters( $filter, '<a href="' . $notification_link . '" title="' . __( 'Groups', 'buddypress' ) . '">' . $text . '</a>', $total_items, $text, $notification_link );
    208208                                } else {
     
    215215                                $text = sprintf( __( 'You were promoted to an admin in the group "%s"', 'buddypress' ), $group->name );
    216216                                $filter = 'bp_groups_single_member_promoted_to_admin_notification';
    217217                                $notification_link = $group_link . '?n=1';
    218                                
     218
    219219                                if ( 'string' == $format ) {
    220220                                        return apply_filters( $filter, '<a href="' . $notification_link . '">' . $text . '</a>', $group_link, $group->name, $text, $notification_link );
    221221                                } else {
     
    238238                                $text = sprintf( __( 'You were promoted to a mod in %d groups', 'buddypress' ), (int)$total_items );
    239239                                $filter = 'bp_groups_multiple_member_promoted_to_mod_notification';
    240240                                $notification_link = bp_loggedin_user_domain() . bp_get_groups_slug() . '?n=1';
    241                                
     241
    242242                                if ( 'string' == $format ) {
    243243                                        return apply_filters( $filter, '<a href="' . $notification_link . '" title="' . __( 'Groups', 'buddypress' ) . '">' . $text . '</a>', $total_items, $text, $notification_link );
    244244                                } else {
     
    251251                                $text = sprintf( __( 'You were promoted to a mod in the group "%s"', 'buddypress' ), $group->name );
    252252                                $filter = 'bp_groups_single_member_promoted_to_mod_notification';
    253253                                $notification_link = $group_link . '?n=1';
    254                                
     254
    255255                                if ( 'string' == $format ) {
    256256                                        return apply_filters( $filter, '<a href="' . $notification_link . '">' . $text . '</a>', $group_link, $group->name, $text, $notification_link );
    257257                                } else {
     
    266266
    267267                case 'group_invite':
    268268                        $group_id = $item_id;
    269                         $group = new BP_Groups_Group( $group_id );     
     269                        $group = new BP_Groups_Group( $group_id );
    270270                        $group_link = bp_get_group_permalink( $group );
    271                        
     271
    272272                        $notification_link = bp_loggedin_user_domain() . bp_get_groups_slug() . '/invites/?n=1';
    273273
    274274                        if ( (int)$total_items > 1 ) {
    275275                                $text = sprintf( __( 'You have %d new group invitations', 'buddypress' ), (int)$total_items );
    276276                                $filter = 'bp_groups_multiple_group_invite_notification';
    277                                
     277
    278278                                if ( 'string' == $format ) {
    279279                                        return apply_filters( $filter, '<a href="' . $notification_link . '" title="' . __( 'Group Invites', 'buddypress' ) . '">' . $text . '</a>', $total_items, $text, $notification_link );
    280280                                } else {
     
    286286                        } else {
    287287                                $text = sprintf( __( 'You have an invitation to the group: %s', 'buddypress' ), $group->name );
    288288                                $filter = 'bp_groups_single_group_invite_notification';
    289                                
     289
    290290                                if ( 'string' == $format ) {
    291291                                        return apply_filters( $filter, '<a href="' . $notification_link . '">' . $text . '</a>', $group_link, $group->name, $text, $notification_link );
    292292                                } else {
  • bp-groups/bp-groups-classes.php

     
    293293                if ( !empty( $include ) ) {
    294294                        if ( is_array( $include ) )
    295295                                $include = implode( ',', $include );
    296                                
     296
    297297                        $include = $wpdb->escape( $include );
    298298                        $sql['include'] = " AND g.id IN ({$include})";
    299299                }
     
    301301                if ( !empty( $exclude ) ) {
    302302                        if ( is_array( $exclude ) )
    303303                                $exclude = implode( ',', $exclude );
    304                                
     304
    305305                        $exclude = $wpdb->escape( $exclude );
    306306                        $sql['exclude'] = " AND g.id NOT IN ({$exclude})";
    307307                }
     
    597597
    598598                return $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(id) FROM {$bp->groups->table_name_members} WHERE group_id = %d AND is_confirmed = 1 AND is_banned = 0", $group_id ) );
    599599        }
    600        
    601        
     600
     601
    602602        /**
    603603         * Get a total count of all topics of a given status, across groups/forums
    604604         *
     
    610610         */
    611611        function get_global_topic_count( $status = 'public', $search_terms = false ) {
    612612                global $bbdb, $wpdb, $bp;
    613                
     613
    614614                switch ( $status ) {
    615615                        case 'all' :
    616616                                $status_sql = '';
    617617                                break;
    618                                
     618
    619619                        case 'hidden' :
    620620                                $status_sql = $wpdb->prepare( "AND g.status = 'hidden'" );
    621621                                break;
    622                                
     622
    623623                        case 'private' :
    624624                                $status_sql = $wpdb->prepare( "AND g.status = 'private'" );
    625625                                break;
    626                                
     626
    627627                        case 'public' :
    628628                        default :
    629629                                $status_sql = $wpdb->prepare( "AND g.status = 'public'" );
    630630                                break;
    631631                }
    632                
     632
    633633                $sql = array();
    634                
     634
    635635                $sql['select'] = "SELECT COUNT(t.topic_id)";
    636                
     636
    637637                $sql['from'] = "FROM {$bbdb->topics} AS t INNER JOIN {$bp->groups->table_name_groupmeta} AS gm ON t.forum_id = gm.meta_value INNER JOIN {$bp->groups->table_name} AS g ON gm.group_id = g.id";
    638                
     638
    639639                $sql['where'] = "WHERE gm.meta_key = 'forum_id' {$status_sql} AND t.topic_status = '0' AND t.topic_sticky != '2'";
    640                
     640
    641641                if ( $search_terms ) {
    642642                        $st = like_escape( $search_terms );
    643643                        $sql['where'] .= " AND (  t.topic_title LIKE '%{$st}%' )";
    644644                }
    645                
     645
    646646                return $wpdb->get_var( implode( ' ', $sql ) );
    647647        }
    648648}
     
    666666        function bp_groups_member( $user_id = 0, $group_id = 0, $id = false, $populate = true ) {
    667667                $this->__construct($user_id,$group_id,$id,$populate);
    668668        }
    669        
     669
    670670        function __construct( $user_id = 0, $group_id = 0, $id = false, $populate = true ) {
    671671                if ( $user_id && $group_id && !$id ) {
    672672                        $this->user_id = $user_id;
     
    771771
    772772        function ban() {
    773773                global $bp;
    774                
     774
    775775                if ( $this->is_admin )
    776776                        return false;
    777777
     
    789789
    790790        function unban() {
    791791                global $bp;
    792                
     792
    793793                if ( $this->is_admin )
    794794                        return false;
    795795
     
    803803
    804804        function accept_invite() {
    805805                global $bp;
    806                
     806
    807807                $this->inviter_id    = 0;
    808808                $this->is_confirmed  = 1;
    809809                $this->date_modified = bp_core_current_time();
     
    813813
    814814        function accept_request() {
    815815                global $bp;
    816                
     816
    817817                $this->is_confirmed = 1;
    818818                $this->date_modified = bp_core_current_time();
    819819
     
    957957
    958958                if ( !$user_id )
    959959                        return false;
    960                
     960
    961961                $sql = "SELECT id FROM {$bp->groups->table_name_members} WHERE user_id = %d AND group_id = %d AND is_confirmed = 0 AND inviter_id != 0";
    962                
     962
    963963                if ( 'sent' == $type )
    964964                        $sql .= " AND invite_sent = 1";
    965965
     
    12141214
    12151215        function _register() {
    12161216                global $bp;
    1217                
     1217
    12181218                if ( !empty( $this->enable_create_step ) ) {
    12191219                        // Insert the group creation step for the new group extension
    12201220                        $bp->groups->group_creation_steps[$this->slug] = array( 'name' => $this->name, 'slug' => $this->slug, 'position' => $this->create_step_position );
     
    12441244                        if ( bp_is_groups_component() && $bp->is_single_item && ( !$bp->current_action || 'home' == $bp->current_action ) )
    12451245                                add_action( $this->display_hook, array( &$this, 'widget_display' ) );
    12461246                }
    1247                
     1247
    12481248                // Construct the admin edit tab for the new group extension
    12491249                if ( !empty( $this->enable_edit_item ) && !empty( $bp->is_item_admin ) ) {
    12501250                        add_action( 'groups_admin_tabs', create_function( '$current, $group_slug', '$selected = ""; if ( "' . esc_attr( $this->slug ) . '" == $current ) $selected = " class=\"current\""; echo "<li{$selected}><a href=\"' . bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/{$group_slug}/admin/' . esc_attr( $this->slug ) . '\">' . esc_attr( $this->name ) . '</a></li>";' ), 10, 2 );
     
    12831283        add_action( 'bp_init', create_function( '', '$extension = new ' . $group_extension_class . '; add_action( "bp_actions", array( &$extension, "_register" ), 8 );' ), 11 );
    12841284}
    12851285
    1286 ?>
     1286?>
     1287 No newline at end of file
  • bp-groups/bp-groups-actions.php

     
    102102                                bp_core_add_message( __( 'There was an error saving group details, please try again.', 'buddypress' ), 'error' );
    103103                                bp_core_redirect( bp_get_root_domain() . '/' . bp_get_groups_root_slug() . '/create/step/' . $bp->groups->current_create_step . '/' );
    104104                        }
    105                        
    106                         // Set the invite status                       
     105
     106                        // Set the invite status
    107107                        // Checked against a whitelist for security
    108108                        $allowed_invite_status = apply_filters( 'groups_allowed_invite_status', array( 'members', 'mods', 'admins' ) );
    109109                        $invite_status         = in_array( $_POST['group-invite-status'], (array)$allowed_invite_status ) ? $_POST['group-invite-status'] : 'members';
    110                        
     110
    111111                        groups_update_groupmeta( $bp->groups->new_group_id, 'invite_status', $invite_status );
    112112                }
    113113
  • bp-groups/bp-groups-screens.php

     
    508508                // If the edit form has been submitted, save the edited details
    509509                if ( isset( $_POST['save'] ) ) {
    510510                        $enable_forum   = ( isset($_POST['group-show-forum'] ) ) ? 1 : 0;
    511                        
     511
    512512                        // Checked against a whitelist for security
    513513                        $allowed_status = apply_filters( 'groups_allowed_status', array( 'public', 'private', 'hidden' ) );
    514514                        $status         = ( in_array( $_POST['group-status'], (array)$allowed_status ) ) ? $_POST['group-status'] : 'public';
    515                        
     515
    516516                        // Checked against a whitelist for security
    517517                        $allowed_invite_status = apply_filters( 'groups_allowed_invite_status', array( 'members', 'mods', 'admins' ) );
    518518                        $invite_status         = in_array( $_POST['group-invite-status'], (array)$allowed_invite_status ) ? $_POST['group-invite-status'] : 'members';
     
    614614                        if ( bp_is_action_variable( 'promote', 1 ) && ( bp_is_action_variable( 'mod', 2 ) || bp_is_action_variable( 'admin', 2 ) ) && is_numeric( bp_action_variable( 3 ) ) ) {
    615615                                $user_id = bp_action_variable( 3 );
    616616                                $status  = bp_action_variable( 2 );
    617                                
     617
    618618                                // Check the nonce first.
    619619                                if ( !check_admin_referer( 'groups_promote_member' ) )
    620620                                        return false;
     
    652652
    653653                        if ( bp_is_action_variable( 'ban', 1 ) && is_numeric( bp_action_variable( 2 ) ) ) {
    654654                                $user_id = bp_action_variable( 2 );
    655                                
     655
    656656                                // Check the nonce first.
    657657                                if ( !check_admin_referer( 'groups_ban_member' ) )
    658658                                        return false;
     
    670670
    671671                        if ( bp_is_action_variable( 'unban', 1 ) && is_numeric( bp_action_variable( 2 ) ) ) {
    672672                                $user_id = bp_action_variable( 2 );
    673                                
     673
    674674                                // Check the nonce first.
    675675                                if ( !check_admin_referer( 'groups_unban_member' ) )
    676676                                        return false;
     
    688688
    689689                        if ( bp_is_action_variable( 'remove', 1 ) && is_numeric( bp_action_variable( 2 ) ) ) {
    690690                                $user_id = bp_action_variable( 2 );
    691                                
     691
    692692                                // Check the nonce first.
    693693                                if ( !check_admin_referer( 'groups_remove_member' ) )
    694694                                        return false;
  • bp-groups/bp-groups-cache.php

     
    4949add_action( 'groups_created_group',              'bp_core_clear_cache' );
    5050add_action( 'groups_group_avatar_updated',       'bp_core_clear_cache' );
    5151
    52 ?>
     52?>
     53 No newline at end of file
  • bp-groups/bp-groups-loader.php

     
    9393                if ( bp_is_groups_component() && $group_id = BP_Groups_Group::group_exists( bp_current_action() ) ) {
    9494
    9595                        $bp->is_single_item  = true;
    96                         $current_group_class = apply_filters( 'bp_groups_current_group_class', 'BP_Groups_Group' ); 
     96                        $current_group_class = apply_filters( 'bp_groups_current_group_class', 'BP_Groups_Group' );
    9797                        $this->current_group = apply_filters( 'bp_groups_current_group_object', new $current_group_class( $group_id ) );
    9898
    9999                        // When in a single group, the first action is bumped down one because of the
     
    162162                        bp_do_404();
    163163                        return;
    164164                }
    165                
     165
    166166                // Group access control
    167167                if ( bp_is_groups_component() && !empty( $this->current_group ) && !empty( $bp->current_action ) && !$this->current_group->user_has_access ) {
    168168                        if ( is_user_logged_in() ) {
    169169                                // Off-limits to this user. Throw an error and redirect to the
    170                                 // group's home page                   
     170                                // group's home page
    171171                                bp_core_no_access( array(
    172172                                        'message'  => __( 'You do not have access to this group.', 'buddypress' ),
    173173                                        'root'     => bp_get_group_permalink( $bp->groups->current_group ),
     
    461461// Create the groups component
    462462$bp->groups = new BP_Groups_Component();
    463463
    464 ?>
     464?>
     465 No newline at end of file
  • bp-groups/bp-groups-widgets.php

     
    190190
    191191}
    192192add_action( 'wp_ajax_widget_groups_list', 'groups_ajax_widget_groups_list' );
    193 ?>
     193?>
     194 No newline at end of file
  • bp-groups/bp-groups-functions.php

     
    426426 */
    427427function groups_get_current_group() {
    428428        global $bp;
    429        
     429
    430430        $current_group = isset( $bp->groups->current_group ) ? $bp->groups->current_group : false;
    431        
     431
    432432        return apply_filters( 'groups_get_current_group', $current_group );
    433433}
    434434
     
    966966add_action( 'delete_user',       'groups_remove_data_for_user' );
    967967add_action( 'bp_make_spam_user', 'groups_remove_data_for_user' );
    968968
    969 ?>
     969?>
     970 No newline at end of file
  • bp-groups/bp-groups-filters.php

     
    7979
    8080function groups_add_forum_tables_sql( $sql = '' ) {
    8181        global $bp;
    82        
     82
    8383        $sql .= 'JOIN ' . $bp->groups->table_name . ' AS g LEFT JOIN ' . $bp->groups->table_name_groupmeta . ' AS gm ON g.id = gm.group_id ';
    84        
     84
    8585        return $sql;
    8686}
    8787
  • bp-groups/bp-groups-notifications.php

     
    246246                $message = apply_filters_ref_array( 'groups_notification_group_invites_message', array( $message, &$group, $inviter_name, $inviter_link, $invites_link, $group_link, $settings_link ) );
    247247
    248248                wp_mail( $to, $subject, $message );
    249                                
     249
    250250                do_action( 'bp_groups_sent_invited_email', $invited_user_id, $subject, $message, $group );
    251251        }
    252252}
    253253
    254 ?>
     254?>
     255 No newline at end of file
  • bp-groups/bp-groups-template.php

     
    28532853                if ( !empty( $url ) )
    28542854                        return $url;
    28552855        }
    2856 ?>
     2856?>
     2857 No newline at end of file
  • bp-groups/bp-groups-forums.php

     
    213213                if ( bp_is_active( 'activity' ) ) {
    214214                        // The activity item for the initial topic
    215215                        bp_activity_delete( array( 'item_id' => $bp->groups->current_group->id, 'secondary_item_id' => $topic_id, 'component' => $bp->groups->id, 'type' => 'new_forum_topic' ) );
    216                        
     216
    217217                        // The activity item for each post
    218218                        foreach ( (array)$posts as $post ) {
    219219                                bp_activity_delete( array( 'item_id' => $bp->groups->current_group->id, 'secondary_item_id' => $post->post_id, 'component' => $bp->groups->id, 'type' => 'new_forum_post' ) );
     
    273273        return apply_filters( 'groups_total_forum_topic_count', BP_Groups_Group::get_global_topic_count( $status, $search_terms ) );
    274274}
    275275
    276 ?>
     276?>
     277 No newline at end of file