Skip to:
Content

BuddyPress.org

Changeset 6342


Ignore:
Timestamp:
09/18/2012 06:03:00 PM (14 years ago)
Author:
r-a-y
Message:

EOF:

  • Fall in line with WordPress 3.4 coding practices by removing all EOF closing PHP tags.
Location:
trunk
Files:
106 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity/bp-activity-actions.php

    r6326 r6342  
    598598        $bp->activity->akismet = new BP_Akismet();
    599599}
    600 
    601 ?>
  • trunk/bp-activity/bp-activity-admin.php

    r6309 r6342  
    13981398        }
    13991399}
    1400 ?>
  • trunk/bp-activity/bp-activity-akismet.php

    r6310 r6342  
    118118         */
    119119        public function add_activity_stream_nonce() {
    120                 $form_id = '_bp_as_nonce'; 
     120                $form_id = '_bp_as_nonce';
    121121                $value   = '_bp_as_nonce_' . bp_loggedin_user_id();
    122122
     
    249249
    250250                do_action( 'bp_activity_akismet_mark_as_ham', $activity, $source );
    251         } 
     251        }
    252252
    253253        /**
     
    576576        $interval = max( 1, absint( $interval ) );
    577577
    578         // _bp_akismet_submission meta values are large, so expire them after $interval days regardless of the activity status 
     578        // _bp_akismet_submission meta values are large, so expire them after $interval days regardless of the activity status
    579579        $sql          = $wpdb->prepare( "SELECT a.id FROM {$bp->activity->table_name} a LEFT JOIN {$bp->activity->table_name_meta} m ON a.id = m.activity_id WHERE m.meta_key = %s AND DATE_SUB(%s, INTERVAL {$interval} DAY) > a.date_recorded LIMIT 10000", '_bp_akismet_submission', current_time( 'mysql', 1 ) );
    580580        $activity_ids = $wpdb->get_col( $sql );
     
    585585        }
    586586}
    587 ?>
  • trunk/bp-activity/bp-activity-cache.php

    r6259 r6342  
    3636        bp_update_meta_cache( $cache_args );
    3737}
    38 
    39 ?>
  • trunk/bp-activity/bp-activity-classes.php

    r6331 r6342  
    5151                        $this->mptt_right        = $row->mptt_right;
    5252                        $this->is_spam           = $row->is_spam;
    53                        
     53
    5454                        bp_activity_update_meta_cache( $this->id );
    5555                }
     
    208208                // Define the preferred order for indexes
    209209                $indexes = apply_filters( 'bp_activity_preferred_index_order', array( 'user_id', 'item_id', 'secondary_item_id', 'date_recorded', 'component', 'type', 'hide_sitewide', 'is_spam' ) );
    210                
     210
    211211                foreach( $indexes as $key => $index ) {
    212212                        if ( false !== strpos( $where_sql, $index ) ) {
     
    217217
    218218                if ( !empty( $the_index ) ) {
    219                         $index_hint_sql = $wpdb->prepare( "USE INDEX ({$the_index})" ); 
     219                        $index_hint_sql = $wpdb->prepare( "USE INDEX ({$the_index})" );
    220220                } else {
    221221                        $index_hint_sql = '';
     
    262262                        }
    263263                }
    264                
     264
    265265                // Get activity meta
    266266                $activity_ids = array();
     
    268268                        $activity_ids[] = $activity->id;
    269269                }
    270                
     270
    271271                if ( !empty( $activity_ids ) ) {
    272272                        bp_activity_update_meta_cache( $activity_ids );
     
    670670        }
    671671}
    672 
    673 ?>
  • trunk/bp-activity/bp-activity-filters.php

    r6167 r6342  
    214214        if ( $activity_id & bp_is_active( 'activity' ) ) {
    215215                $activity = new BP_Activity_Activity( $activity_id );
    216                
     216
    217217                // If this activity has been marked as spam, don't do anything. This prevents @notifications being sent.
    218218                if ( !empty( $activity ) && $activity->is_spam )
     
    337337        return apply_filters( 'bp_activity_truncate_entry', $excerpt, $text, $append_text );
    338338}
    339 
    340 ?>
  • trunk/bp-activity/bp-activity-functions.php

    r6259 r6342  
    533533        } else {
    534534                $metas = $wpdb->get_results( $wpdb->prepare( "SELECT meta_key, meta_value FROM {$bp->activity->table_name_meta} WHERE activity_id = %d", $activity_id ) );
    535                                
     535
    536536                if ( !empty( $metas ) ) {
    537537                        $metas = array_map( 'maybe_unserialize', (array) $metas );
    538                        
     538
    539539                        foreach( $metas as $mkey => $mvalue ) {
    540540                                wp_cache_set( 'bp_activity_meta_' . $activity_id . '_' . $mkey, $mvalue, 'bp' );
     
    542542                }
    543543        }
    544        
     544
    545545        // No result so return false
    546546        if ( empty( $metas ) )
     
    731731                        $activity_obj->$k = $v;
    732732
    733                 // Mark as not spam     
     733                // Mark as not spam
    734734                bp_activity_mark_as_ham( $activity_obj );
    735735
     
    10281028        ) );
    10291029
    1030         $activity_content = apply_filters( 'bp_activity_latest_update_content', $content ); 
     1030        $activity_content = apply_filters( 'bp_activity_latest_update_content', $content );
    10311031
    10321032        // Add this update to the "latest update" usermeta so it can be fetched anywhere.
     
    14331433        preg_match_all( '/<img[^>]*>/Ui', $content, $matches );
    14341434        $content = preg_replace('|(\[caption(.*?)\])?<img[^>]*>(\[/caption\])?|', '', $content );
    1435        
     1435
    14361436        if ( !empty( $matches ) && !empty( $matches[0] ) ) {
    14371437                // Get the SRC value
     
    15501550
    15511551        do_action( 'bp_activity_mark_as_ham', $activity, $source );
    1552 } 
     1552}
    15531553
    15541554
     
    16671667        bp_activity_update_meta( $id, $cachekey, $cache );
    16681668}
    1669 
    1670 ?>
  • trunk/bp-activity/bp-activity-loader.php

    r6259 r6342  
    340340}
    341341add_action( 'bp_setup_components', 'bp_setup_activity', 6 );
    342 
    343 ?>
  • trunk/bp-activity/bp-activity-notifications.php

    r6326 r6342  
    3939 */
    4040function bp_activity_at_message_notification( $activity_id, $receiver_user_id ) {
    41        
     41
    4242        // Don't leave multiple notifications for the same activity item
    4343        $notifications = BP_Core_Notification::get_all_for_user( $receiver_user_id, 'all' );
    44        
     44
    4545        foreach( $notifications as $notification ) {
    4646                if ( $activity_id == $notification->item_id ) {
     
    231231        }
    232232}
    233 
    234 ?>
  • trunk/bp-activity/bp-activity-template.php

    r6175 r6342  
    108108         * Constructor method
    109109         *
    110          * See definition of $defaults below, as well as $defaults in bp_has_activities(), for 
     110         * See definition of $defaults below, as well as $defaults in bp_has_activities(), for
    111111         * description of $args array
    112112         *
     
    139139                        $args = bp_core_parse_args_array( $old_args_keys, $func_args );
    140140                }
    141                
     141
    142142                $defaults = array(
    143143                        'page'             => 1,
     
    157157                $r = wp_parse_args( $args, $defaults );
    158158                extract( $r );
    159                
     159
    160160                $this->pag_page = isset( $_REQUEST[$page_arg] ) ? intval( $_REQUEST[$page_arg] ) : $page;
    161161                $this->pag_num  = isset( $_REQUEST['num'] ) ? intval( $_REQUEST['num'] ) : $per_page;
     
    27402740}
    27412741add_action( 'bp_head', 'bp_activity_sitewide_feed' );
    2742 
    2743 ?>
  • trunk/bp-blogs/bp-blogs-actions.php

    r6093 r6342  
    3535}
    3636add_action( 'bp_actions', 'bp_blogs_redirect_to_random_blog' );
    37 
    38 ?>
  • trunk/bp-blogs/bp-blogs-activity.php

    r6093 r6342  
    1818 * @subpackage BlogsActivity
    1919 * @global type $bp
    20  * @return boolean 
     20 * @return boolean
    2121 */
    2222function bp_blogs_register_activity_actions() {
     
    4343 * @global BuddyPress $bp
    4444 * @param array $args
    45  * @return boolean 
     45 * @return boolean
    4646 */
    4747function bp_blogs_record_activity( $args = '' ) {
     
    126126        ) );
    127127}
    128 
    129 ?>
  • trunk/bp-blogs/bp-blogs-buddybar.php

    r6093 r6342  
    1818 * @subpackage BlogsBuddyBar
    1919 * @global BuddyPress $bp
    20  * @return boolean 
     20 * @return boolean
    2121 */
    22        
     22
    2323function bp_adminbar_blogs_menu() {
    2424        global $bp;
     
    7878}
    7979add_action( 'bp_adminbar_menus', 'bp_adminbar_blogs_menu', 6 );
    80 
    81 ?>
  • trunk/bp-blogs/bp-blogs-cache.php

    r6260 r6342  
    2121 * @subpackage BlogsCache
    2222 * @param int $blog_id
    23  * @param int $user_id 
     23 * @param int $user_id
    2424 */
    2525function bp_blogs_clear_blog_object_cache( $blog_id, $user_id ) {
     
    3434 * @package BuddyPress
    3535 * @subpackage BlogsCache
    36  * @param Blog $recorded_blog_obj 
     36 * @param Blog $recorded_blog_obj
    3737 */
    3838function bp_blogs_format_clear_blog_cache( $recorded_blog_obj ) {
     
    5555add_action( 'bp_blogs_new_blog',             'bp_core_clear_cache' );
    5656add_action( 'bp_blogs_remove_data',          'bp_core_clear_cache' );
    57 
    58 ?>
  • trunk/bp-blogs/bp-blogs-classes.php

    r5930 r6342  
    287287        }
    288288}
    289 
    290 ?>
  • trunk/bp-blogs/bp-blogs-filters.php

    r6259 r6342  
    2222}
    2323add_filter( 'wp_signup_location', 'bp_blogs_creation_location' );
    24 
    25 
    26 ?>
  • trunk/bp-blogs/bp-blogs-functions.php

    r6299 r6342  
    176176        if ( 'publish' == $post->post_status && empty( $post->post_password ) ) {
    177177                if ( $is_blog_public || !is_multisite() ) {
    178                        
     178
    179179                        // Record this in activity streams
    180180                        $post_permalink   = get_permalink( $post_id );
     
    195195                                        )
    196196                                ) );
    197                                
     197
    198198                                if ( !empty( $existing['activities'] ) ) {
    199199                                        return;
     
    314314function bp_blogs_add_user_to_blog( $user_id, $role = false, $blog_id = 0 ) {
    315315        global $wpdb;
    316        
     316
    317317        if ( empty( $blog_id ) ) {
    318318                $blog_id = isset( $wpdb->blogid ) ? $wpdb->blogid : bp_get_root_blog_id();
     
    671671add_action( 'delete_user',       'bp_blogs_remove_data' );
    672672add_action( 'bp_make_spam_user', 'bp_blogs_remove_data' );
    673 
    674 ?>
  • trunk/bp-blogs/bp-blogs-loader.php

    r6093 r6342  
    116116                        'item_css_id'         => $this->id
    117117                );
    118                
     118
    119119                $parent_url = trailingslashit( bp_displayed_user_domain() . bp_get_blogs_slug() );
    120                
     120
    121121                $sub_nav[] = array(
    122122                        'name'            => __( 'My Sites', 'buddypress' ),
     
    213213}
    214214add_action( 'bp_setup_components', 'bp_setup_blogs', 6 );
    215 
    216 ?>
  • trunk/bp-blogs/bp-blogs-template.php

    r6259 r6342  
    657657                return bp_get_button( apply_filters( 'bp_get_blogs_visit_blog_button', $button ) );
    658658        }
    659 
    660 ?>
  • trunk/bp-blogs/bp-blogs-widgets.php

    r6260 r6342  
    8989        }
    9090}
    91 ?>
  • trunk/bp-core/admin/bp-core-components.php

    r6155 r6342  
    154154        $page      = bp_core_do_network_admin()  ? 'settings.php' : 'options-general.php';
    155155        $action    = !empty( $_GET['action'] ) ? $_GET['action'] : 'all';
    156        
     156
    157157        switch( $action ) {
    158158                case 'all' :
     
    173173                        break;
    174174        }
    175        
     175
    176176        // The setup wizard uses different, more descriptive text
    177177        if ( bp_get_maintenance_mode() ) : ?>
     
    182182
    183183        <?php endif ?>
    184                
     184
    185185                <ul class="subsubsub">
    186186                        <li><a href="<?php echo add_query_arg( array( 'page' => 'bp-components', 'action' => 'all'      ), bp_get_admin_url( $page ) ); ?>" <?php if ( $action === 'all'      ) : ?>class="current"<?php endif; ?>><?php printf( _nx( 'All <span class="count">(%s)</span>',      'All <span class="count">(%s)</span>',      $all_count,         'plugins', 'buddypress' ), number_format_i18n( $all_count                    ) ); ?></a> | </li>
     
    208208
    209209                        <tbody id="the-list">
    210                                
     210
    211211                                <?php if ( !empty( $current_components ) ) : ?>
    212212
     
    234234                                                                <strong><?php echo esc_html( $labels['title'] ); ?></strong>
    235235                                                                <div class="row-actions-visible">
    236                                                                        
     236
    237237                                                                </div>
    238238                                                        </td>
     
    243243                                                                </div>
    244244                                                                <div class="active second plugin-version-author-uri">
    245                                                                        
     245
    246246                                                                </div>
    247247                                                        </td>
     
    251251
    252252                                <?php else : ?>
    253                                                
     253
    254254                                        <tr class="no-items">
    255255                                                <td class="colspanchange" colspan="3"><?php _e( 'No components found.', 'buddypress' ); ?></td>
     
    297297}
    298298add_action( 'admin_init', 'bp_core_admin_components_settings_handler' );
    299 
    300 ?>
  • trunk/bp-core/admin/bp-core-functions.php

    r6310 r6342  
    376376        do_action( 'bp_admin_tabs' );
    377377}
    378 
    379 ?>
  • trunk/bp-core/admin/bp-core-schema.php

    r5966 r6342  
    243243        $bp_prefix       = bp_core_get_table_prefix();
    244244
    245         // These values should only be updated if they are not already present 
    246         if ( !$base_group_name = bp_get_option( 'bp-xprofile-base-group-name' ) ) { 
    247                 bp_update_option( 'bp-xprofile-base-group-name', _x( 'Base', 'First XProfile group name', 'buddypress' ) ); 
    248         } 
    249 
    250         if ( !$fullname_field_name = bp_get_option( 'bp-xprofile-fullname-field-name' ) ) { 
    251                 bp_update_option( 'bp-xprofile-fullname-field-name', _x( 'Name', 'XProfile fullname field name', 'buddypress' ) ); 
    252         } 
     245        // These values should only be updated if they are not already present
     246        if ( !$base_group_name = bp_get_option( 'bp-xprofile-base-group-name' ) ) {
     247                bp_update_option( 'bp-xprofile-base-group-name', _x( 'Base', 'First XProfile group name', 'buddypress' ) );
     248        }
     249
     250        if ( !$fullname_field_name = bp_get_option( 'bp-xprofile-fullname-field-name' ) ) {
     251                bp_update_option( 'bp-xprofile-fullname-field-name', _x( 'Name', 'XProfile fullname field name', 'buddypress' ) );
     252        }
    253253
    254254        $sql[] = "CREATE TABLE {$bp_prefix}bp_xprofile_groups (
     
    347347 *
    348348 * @global WPDB $wpdb
    349  * @global BuddyPress $bp 
     349 * @global BuddyPress $bp
    350350 */
    351351function bp_update_db_stuff() {
     
    387387
    388388}
    389 
    390 ?>
  • trunk/bp-core/admin/bp-core-settings.php

    r6310 r6342  
    366366                return apply_filters( 'bp_get_form_option', $value, $option );
    367367        }
    368 ?>
  • trunk/bp-core/admin/bp-core-slugs.php

    r6310 r6342  
    138138                'activate' => __( 'Activate', 'buddypress' ),
    139139        );
    140        
     140
    141141        $static_pages = apply_filters( 'bp_static_pages', $static_pages );
    142        
     142
    143143        if ( !empty( $static_pages ) ) : ?>
    144144
     
    158158
    159159                                                <td>
    160                                                        
     160
    161161                                                        <?php if ( ! bp_is_root_blog() ) switch_to_blog( bp_get_root_blog_id() ); ?>
    162162
     
    225225}
    226226add_action( 'admin_init', 'bp_core_admin_slugs_setup_handler' );
    227 
    228 ?>
  • trunk/bp-core/admin/bp-core-update.php

    r6259 r6342  
    10551055        return false;
    10561056}
    1057 
    1058 ?>
  • trunk/bp-core/bp-core-admin.php

    r6310 r6342  
    505505        $bp->admin = new BP_Admin();
    506506}
    507 
    508 ?>
  • trunk/bp-core/bp-core-adminbar.php

    r6264 r6342  
    6666}
    6767add_action( 'bp_init', 'bp_core_load_admin_bar_css' );
    68 
    69 ?>
  • trunk/bp-core/bp-core-avatars.php

    r6247 r6342  
    960960        return apply_filters( 'bp_core_avatar_thumb', $bp->avatar->thumb->default );
    961961}
    962 
    963 
    964 ?>
  • trunk/bp-core/bp-core-buddybar.php

    r6264 r6342  
    684684}
    685685add_action( 'bp_init', 'bp_core_load_buddybar_css' );
    686 
    687 ?>
  • trunk/bp-core/bp-core-cache.php

    r6259 r6342  
    133133        return $cache;
    134134}
    135 
    136 ?>
  • trunk/bp-core/bp-core-classes.php

    r6314 r6342  
    17741774        }
    17751775}
    1776 
    1777 ?>
  • trunk/bp-core/bp-core-component.php

    r6093 r6342  
    386386}
    387387endif; // BP_Component
    388 
    389 ?>
  • trunk/bp-core/bp-core-cssjs.php

    r6310 r6342  
    139139}
    140140add_action( 'wp_head', 'bp_core_add_ajax_url_js' );
    141 
    142 ?>
  • trunk/bp-core/bp-core-dependency.php

    r6285 r6342  
    232232        return apply_filters( 'bp_allowed_themes', $themes );
    233233}
    234 
  • trunk/bp-core/bp-core-functions.php

    r6338 r6342  
    12821282        return $result;
    12831283}
    1284 
    1285 ?>
  • trunk/bp-core/bp-core-loader.php

    r6278 r6342  
    247247}
    248248add_action( 'bp_setup_components', 'bp_setup_core', 2 );
    249 
    250 ?>
  • trunk/bp-core/bp-core-moderation.php

    r6259 r6342  
    266266        return apply_filters( 'bp_core_current_user_ua', $retval );
    267267}
    268 ?>
  • trunk/bp-core/bp-core-template.php

    r6285 r6342  
    17531753        }
    17541754        add_filter( 'body_class', 'bp_get_the_body_class', 10, 2 );
    1755 
    1756 ?>
  • trunk/bp-core/bp-core-widgets.php

    r6314 r6342  
    323323add_action( 'wp_ajax_widget_members', 'bp_core_ajax_widget_members' );
    324324add_action( 'wp_ajax_nopriv_widget_members', 'bp_core_ajax_widget_members' );
    325 
    326 ?>
  • trunk/bp-core/bp-core-wpabstraction.php

    r5978 r6342  
    171171        }
    172172}
    173 
    174 ?>
  • trunk/bp-core/deprecated/1.5.php

    r6259 r6342  
    664664        _deprecated_function( __FUNCTION__, '1.5', 'Moved into theme template' );
    665665}
    666 ?>
  • trunk/bp-core/deprecated/1.6.php

    r6093 r6342  
    262262        add_action( 'after_setup_theme', 'bp_die_legacy_ajax_callbacks', 20 );
    263263endif;
    264 ?>
     264
  • trunk/bp-forums/bb-config.php

    r2209 r6342  
    99
    1010header("HTTP/1.0 403 Forbidden"); die;
    11 ?>
  • trunk/bp-forums/bp-forums-actions.php

    r6093 r6342  
    22// Exit if accessed directly
    33if ( !defined( 'ABSPATH' ) ) exit;
    4 
    5 ?>
  • trunk/bp-forums/bp-forums-admin.php

    r6310 r6342  
    416416        return 1;
    417417}
    418 
    419 ?>
  • trunk/bp-forums/bp-forums-bbpress-sa.php

    r5930 r6342  
    421421        return $for_update;
    422422}
    423 
    424 ?>
  • trunk/bp-forums/bp-forums-bbpress.php

    r6093 r6342  
    66// Exit if accessed directly
    77if ( !defined( 'ABSPATH' ) ) exit;
    8 ?>
  • trunk/bp-forums/bp-forums-filters.php

    r5927 r6342  
    206206        return $sql;
    207207}
    208 
    209 ?>
  • trunk/bp-forums/bp-forums-functions.php

    r6259 r6342  
    243243        extract( $r, EXTR_SKIP );
    244244
    245         // Check if the user is a spammer 
    246         if ( bp_is_user_inactive( bp_loggedin_user_id() ) ) 
     245        // Check if the user is a spammer
     246        if ( bp_is_user_inactive( bp_loggedin_user_id() ) )
    247247                return false;
    248248
     
    354354function bp_forums_reply_exists( $text = '', $topic_id = 0, $user_id = 0 ) {
    355355        $reply_exists = false;
    356        
     356
    357357        if ( $text && $topic_id && $user_id ) {
    358358                do_action( 'bbpress_init' );
    359                
     359
    360360                $args = array(
    361361                        'post_author_id' => $user_id,
    362362                        'topic_id'       => $topic_id
    363363                );
    364                
     364
    365365                // BB_Query's post_text parameter does a MATCH, while we need exact matches
    366366                add_filter( 'get_posts_where', create_function( '$q', 'return $q . " AND p.post_text = \'' . $text . '\'";' ) );
    367                
     367
    368368                $query = new BB_Query( 'post', $args );
    369                
     369
    370370                $reply_exists = !empty( $query->results );
    371371        }
    372        
     372
    373373        return apply_filters( 'bp_forums_reply_exists', $reply_exists, $text, $topic_id, $user_id );
    374374}
     
    747747        bb_update_postmeta( $id, $cachekey, $cache );
    748748}
    749 ?>
  • trunk/bp-forums/bp-forums-loader.php

    r6108 r6342  
    252252}
    253253add_action( 'bp_setup_components', 'bp_setup_forums', 6 );
    254 
    255 ?>
  • trunk/bp-forums/bp-forums-screens.php

    r6093 r6342  
    125125}
    126126add_action( 'bp_screens', 'bp_forums_screen_single_topic' );
    127 ?>
  • trunk/bp-forums/bp-forums-template.php

    r6220 r6342  
    14661466                return apply_filters( 'bp_get_forum_topic_count', bp_forums_total_topic_count( $user_id ) );
    14671467        }
    1468 ?>
  • trunk/bp-forums/deprecated/1.6.php

    r6310 r6342  
    200200        }
    201201}
    202 
    203 ?>
  • trunk/bp-friends/bp-friends-actions.php

    r6093 r6342  
    8484}
    8585add_action( 'bp_init', 'friends_action_remove_friend' );
    86 
    87 ?>
  • trunk/bp-friends/bp-friends-activity.php

    r6093 r6342  
    44 * BuddyPress Friends Activity Functions
    55 *
    6  * These functions handle the recording, deleting and formatting of activity 
     6 * These functions handle the recording, deleting and formatting of activity
    77 * for the user and for this specific component.
    88 *
     
    122122        return $return;
    123123}
    124 
    125 ?>
  • trunk/bp-friends/bp-friends-cache.php

    r6101 r6342  
    4040add_action( 'friends_friendship_deleted',   'bp_core_clear_cache' );
    4141add_action( 'friends_friendship_requested', 'bp_core_clear_cache' );
    42 
    43 ?>
  • trunk/bp-friends/bp-friends-classes.php

    r6120 r6342  
    347347        }
    348348}
    349 
    350 ?>
  • trunk/bp-friends/bp-friends-functions.php

    r6259 r6342  
    145145        $friendship_id = BP_Friends_Friendship::get_friendship_id( $initiator_userid, $friend_userid );
    146146        $friendship    = new BP_Friends_Friendship( $friendship_id, true, false );
    147        
     147
    148148        if ( !$friendship->is_confirmed && BP_Friends_Friendship::withdraw( $friendship_id ) ) {
    149149                // Remove the friend request notice
     
    227227/**
    228228 * Get a list of friends that a user can invite into this group.
    229  * 
     229 *
    230230 * Excludes friends that are already in the group, and banned friends if the
    231231 * user is not a group admin.
     
    355355add_action( 'delete_user',       'friends_remove_data' );
    356356add_action( 'bp_make_spam_user', 'friends_remove_data' );
    357 
    358 ?>
  • trunk/bp-friends/bp-friends-loader.php

    r6093 r6342  
    216216}
    217217add_action( 'bp_setup_components', 'bp_setup_friends', 6 );
    218 
    219 ?>
  • trunk/bp-friends/bp-friends-notifications.php

    r5729 r6342  
    9090        do_action( 'bp_friends_sent_accepted_email', $initiator_id, $subject, $message, $friendship_id, $friend_id );
    9191}
    92 
    93 ?>
  • trunk/bp-friends/bp-friends-screens.php

    r6093 r6342  
    4848
    4949                bp_core_redirect( trailingslashit( bp_loggedin_user_domain() . bp_current_component() . '/' . bp_current_action() ) );
    50                
     50
    5151        } elseif ( bp_is_action_variable( 'cancel', 0 ) && is_numeric( bp_action_variable( 1 ) ) ) {
    5252                // Check the nonce
     
    109109}
    110110add_action( 'bp_notification_settings', 'friends_screen_notification_settings' );
    111 
    112 ?>
  • trunk/bp-friends/bp-friends-template.php

    r6047 r6342  
    356356                $user_id = bp_displayed_user_id();
    357357        }
    358        
     358
    359359        if ( !$user_id ) {
    360                 return 0;       
    361         }
    362        
     360                return 0;
     361        }
     362
    363363        $requests = friends_get_friendship_request_user_ids( $user_id );
    364        
     364
    365365        if ( !empty( $requests ) ) {
    366366                $requests = implode( ',', (array) $requests );
     
    368368                $requests = 0;
    369369        }
    370        
     370
    371371        return apply_filters( 'bp_get_friendship_requests', $requests );
    372372}
     
    431431                return apply_filters( 'bp_friend_get_total_requests_count', count( BP_Friends_Friendship::get_friend_user_ids( $user_id, true ) ) );
    432432        }
    433 
    434 ?>
  • trunk/bp-groups/bp-groups-actions.php

    r6291 r6342  
    322322}
    323323add_action( 'bp_actions', 'groups_action_group_feed' );
    324 
    325 ?>
  • trunk/bp-groups/bp-groups-activity.php

    r6097 r6342  
    313313        return false;
    314314}
    315 
    316 ?>
  • trunk/bp-groups/bp-groups-admin.php

    r6309 r6342  
    12941294        }
    12951295}
    1296 
    1297 ?>
  • trunk/bp-groups/bp-groups-adminbar.php

    r6093 r6342  
    117117}
    118118add_action( 'bp_init', 'bp_groups_remove_edit_page_menu', 99 );
    119 
    120 ?>
  • trunk/bp-groups/bp-groups-buddybar.php

    r6093 r6342  
    6666}
    6767add_action( 'bp_adminbar_menus', 'bp_groups_adminbar_admin_menu', 20 );
    68 
    69 ?>
  • trunk/bp-groups/bp-groups-cache.php

    r6150 r6342  
    2929function bp_groups_update_meta_cache( $group_ids = false ) {
    3030        global $bp;
    31        
     31
    3232        $cache_args = array(
    3333                'object_ids'       => $group_ids,
     
    3737                'cache_key_prefix' => 'bp_groups_groupmeta'
    3838        );
    39        
     39
    4040        bp_update_meta_cache( $cache_args );
    4141}
     
    104104add_action( 'groups_created_group',              'bp_core_clear_cache' );
    105105add_action( 'groups_group_avatar_updated',       'bp_core_clear_cache' );
    106 
    107 ?>
  • trunk/bp-groups/bp-groups-classes.php

    r6321 r6342  
    5959                global $wpdb, $bp;
    6060
    61                 if ( $group = $wpdb->get_row( $wpdb->prepare( "SELECT g.* FROM {$bp->groups->table_name} g WHERE g.id = %d", $this->id ) ) ) {                 
     61                if ( $group = $wpdb->get_row( $wpdb->prepare( "SELECT g.* FROM {$bp->groups->table_name} g WHERE g.id = %d", $this->id ) ) ) {
    6262                        bp_groups_update_meta_cache( $this->id );
    63                                                
     63
    6464                        $this->id                 = $group->id;
    6565                        $this->creator_id         = $group->creator_id;
     
    7373                        $this->total_member_count = groups_get_groupmeta( $this->id, 'total_member_count' );
    7474                        $this->is_member          = BP_Groups_Member::check_is_member( bp_loggedin_user_id(), $this->id );
    75                        
     75
    7676                        // If this is a private or hidden group, does the current user have access?
    7777                        if ( 'private' == $this->status || 'hidden' == $this->status ) {
     
    160160
    161161                do_action_ref_array( 'groups_group_after_save', array( &$this ) );
    162                
     162
    163163                wp_cache_delete( 'bp_groups_group_' . $this->id, 'bp' );
    164164
     
    451451                        $group_ids[] = $group->id;
    452452                }
    453                
     453
    454454                // Populate some extra information instead of querying each time in the loop
    455455                if ( !empty( $populate_extras ) ) {
     
    457457                        $paged_groups = BP_Groups_Group::get_group_extras( $paged_groups, $group_ids, $type );
    458458                }
    459                
     459
    460460                // Grab all groupmeta
    461461                bp_groups_update_meta_cache( $group_ids );
     
    858858                                return false;
    859859                        }
    860                        
     860
    861861                        $sql = $wpdb->prepare( "INSERT INTO {$bp->groups->table_name_members} ( user_id, group_id, inviter_id, is_admin, is_mod, is_banned, user_title, date_modified, is_confirmed, comments, invite_sent ) VALUES ( %d, %d, %d, %d, %d, %d, %s, %s, %d, %s, %d )", $this->user_id, $this->group_id, $this->inviter_id, $this->is_admin, $this->is_mod, $this->is_banned, $this->user_title, $this->date_modified, $this->is_confirmed, $this->comments, $this->invite_sent );
    862862                }
     
    13121312        var $name = false;
    13131313        var $slug = false;
    1314        
     1314
    13151315        // The name/slug of the Group Admin tab for this extension
    13161316        var $admin_name = '';
     
    13591359        function _register() {
    13601360                global $bp;
    1361                
     1361
    13621362                // If admin/create names and slugs are not provided, they fall back on the main
    13631363                // name and slug for the extension
     
    13651365                        $this->admin_name = $this->name;
    13661366                }
    1367                
     1367
    13681368                if ( !$this->admin_slug ) {
    13691369                        $this->admin_slug = $this->slug;
    13701370                }
    1371                
     1371
    13721372                if ( !$this->create_name ) {
    13731373                        $this->create_name = $this->name;
    13741374                }
    1375                
     1375
    13761376                if ( !$this->create_slug ) {
    13771377                        $this->create_slug = $this->slug;
     
    14791479        ' ), 11 );
    14801480}
    1481 
    1482 ?>
  • trunk/bp-groups/bp-groups-filters.php

    r6285 r6342  
    7878
    7979/**
    80  * Only filter the forum SQL on group pages or on the forums directory 
     80 * Only filter the forum SQL on group pages or on the forums directory
    8181 */
    8282function groups_add_forum_privacy_sql() {
     
    148148        if ( bp_current_user_can( 'bp_moderate' ) )
    149149                return true;
    150        
     150
    151151        if ( 'add_tag_to' == $cap )
    152152                if ( $bp->groups->current_group->user_has_access ) return true;
     
    170170}
    171171add_filter( 'get_latest_topics_fields', 'groups_filter_forums_root_page_sql' );
    172 
    173 ?>
  • trunk/bp-groups/bp-groups-forums.php

    r6259 r6342  
    405405        return apply_filters( 'groups_total_forum_topic_count', BP_Groups_Group::get_global_topic_count( $status, $search_terms ) );
    406406}
    407 
    408 ?>
  • trunk/bp-groups/bp-groups-functions.php

    r6321 r6342  
    10241024add_action( 'delete_user',       'groups_remove_data_for_user' );
    10251025add_action( 'bp_make_spam_user', 'groups_remove_data_for_user' );
    1026 
    1027 ?>
  • trunk/bp-groups/bp-groups-loader.php

    r6307 r6342  
    591591}
    592592add_action( 'bp_setup_components', 'bp_setup_groups', 6 );
    593 
    594 ?>
  • trunk/bp-groups/bp-groups-notifications.php

    r6147 r6342  
    259259        }
    260260}
    261 
    262 ?>
  • trunk/bp-groups/bp-groups-template.php

    r6321 r6342  
    22642264        function bp_get_groups_current_create_step() {
    22652265                global $bp;
    2266                
     2266
    22672267                if ( !empty( $bp->groups->current_create_step ) ) {
    22682268                        $current_create_step = $bp->groups->current_create_step;
     
    22702270                        $current_create_step = '';
    22712271                }
    2272                
     2272
    22732273                return apply_filters( 'bp_get_groups_current_create_step', $current_create_step );
    22742274        }
     
    24342434                        $tab = '';
    24352435                }
    2436                
     2436
    24372437                return apply_filters( 'bp_get_current_group_admin_tab', $tab );
    24382438        }
     
    29512951                        return $url;
    29522952        }
    2953 ?>
  • trunk/bp-groups/bp-groups-widgets.php

    r6264 r6342  
    202202
    203203}
    204 add_action( 'wp_ajax_widget_groups_list', 'groups_ajax_widget_groups_list' );
     204add_action( 'wp_ajax_widget_groups_list',        'groups_ajax_widget_groups_list' );
    205205add_action( 'wp_ajax_nopriv_widget_groups_list', 'groups_ajax_widget_groups_list' );
    206 
    207 ?>
  • trunk/bp-members/bp-members-actions.php

    r6093 r6342  
    111111}
    112112add_action( 'bp_actions', 'bp_core_get_random_member' );
    113 
    114 ?>
  • trunk/bp-members/bp-members-adminbar.php

    r6080 r6342  
    185185}
    186186add_action( 'bp_init', 'bp_members_remove_edit_page_menu', 99 );
    187 
    188 ?>
  • trunk/bp-members/bp-members-buddybar.php

    r6093 r6342  
    8383                        echo '<li>';
    8484                        echo '<a href="' . bp_core_get_user_domain( $author->user_id, $author->user_nicename, $author->user_login ) . '">';
    85                         echo bp_core_fetch_avatar( array( 
    86                                 'item_id' => $author->user_id, 
    87                                 'email'   => $author->user_email, 
    88                                 'width'   => 15, 
    89                                 'height'  => 15, 
     85                        echo bp_core_fetch_avatar( array(
     86                                'item_id' => $author->user_id,
     87                                'email'   => $author->user_email,
     88                                'width'   => 15,
     89                                'height'  => 15,
    9090                                'alt'     => sprintf( __( 'Profile picture of %s', 'buddypress' ), $author->display_name )
    9191                        ) );
     
    149149}
    150150add_action( 'bp_adminbar_menus', 'bp_members_adminbar_admin_menu', 20 );
    151 
    152 ?>
  • trunk/bp-members/bp-members-filters.php

    r6199 r6342  
    7575                $profile_link = trailingslashit( $user_domain . $bp->profile->slug . '/edit' );
    7676        }
    77        
     77
    7878        return apply_filters( 'bp_members_edit_profile_url', $profile_link, $url, $user_id, $scheme );
    7979}
    8080add_filter( 'edit_profile_url', 'bp_members_edit_profile_url', 10, 3 );
    81 
    82 ?>
  • trunk/bp-members/bp-members-functions.php

    r6336 r6342  
    101101
    102102        // Default behavior as of BuddyPress 1.7
    103         } else {               
     103        } else {
    104104
    105105                // Get users like we were asked to do...
     
    14011401}
    14021402add_action( 'bp_init', 'bp_core_wpsignup_redirect' );
    1403 
    1404 ?>
  • trunk/bp-members/bp-members-loader.php

    r6278 r6342  
    114114                        $bp->default_component = BP_DEFAULT_COMPONENT;
    115115                }
    116                
     116
    117117                if ( bp_displayed_user_id() ) {
    118118                        $bp->canonical_stack['base_url'] = bp_displayed_user_domain();
    119                
     119
    120120                        if ( bp_current_component() ) {
    121121                                $bp->canonical_stack['component'] = bp_current_component();
    122122                        }
    123                        
     123
    124124                        if ( bp_current_action() ) {
    125125                                $bp->canonical_stack['action'] = bp_current_action();
    126126                        }
    127                        
     127
    128128                        if ( !empty( $bp->action_variables ) ) {
    129129                                $bp->canonical_stack['action_variables'] = bp_action_variables();
     
    132132                        if ( !bp_current_component() ) {
    133133                                $bp->current_component = $bp->default_component;
    134                         } else if ( bp_is_current_component( $bp->default_component ) && !bp_current_action() ) {                       
     134                        } else if ( bp_is_current_component( $bp->default_component ) && !bp_current_action() ) {
    135135                                // The canonical URL will not contain the default component
    136136                                unset( $bp->canonical_stack['component'] );
     
    210210}
    211211add_action( 'bp_setup_components', 'bp_setup_members', 1 );
    212 
    213 ?>
  • trunk/bp-members/bp-members-notifications.php

    r6093 r6342  
    6363/**
    6464 * Get a specific notification by its ID
    65  * 
     65 *
    6666 * @since BuddyPress (1.0)
    6767 * @param int $id
    68  * @return BP_Core_Notification 
     68 * @return BP_Core_Notification
    6969 */
    7070function bp_core_get_notification( $id ) {
     
    7474/**
    7575 * Get notifications for a specific user
    76  * 
     76 *
    7777 * @since BuddyPress (1.0)
    7878 * @global BuddyPress $bp
     
    174174/**
    175175 * Delete notifications for a user by type
    176  * 
     176 *
    177177 * Used when clearing out notifications for a specific component when the user
    178178 * has visited that component.
     
    190190/**
    191191 * Delete notifications for an item ID
    192  * 
     192 *
    193193 * Used when clearing out notifications for a specific component when the user
    194194 * has visited that component.
     
    250250        return true;
    251251}
    252 
    253 ?>
  • trunk/bp-members/bp-members-template.php

    r6249 r6342  
    11841184                        return $url;
    11851185        }
    1186 
    1187 ?>
  • trunk/bp-messages/bp-messages-actions.php

    r6093 r6342  
    114114}
    115115add_action( 'bp_actions', 'messages_action_bulk_delete' );
    116 
    117 ?>
  • trunk/bp-messages/bp-messages-cache.php

    r6093 r6342  
    2323add_action( 'messages_screen_sentbox', 'bp_core_clear_cache' );
    2424add_action( 'messages_screen_inbox',   'bp_core_clear_cache' );
    25 
    26 ?>
  • trunk/bp-messages/bp-messages-classes.php

    r6057 r6342  
    559559        }
    560560}
    561 
    562 ?>
  • trunk/bp-messages/bp-messages-cssjs.php

    r6264 r6342  
    5555<?php
    5656}
    57 
    58 ?>
  • trunk/bp-messages/bp-messages-filters.php

    r5696 r6342  
    6767add_filter( 'bp_get_the_thread_message_content', 'stripslashes_deep' );
    6868add_filter( 'bp_get_the_thread_subject',         'stripslashes_deep' );
    69 
    70 ?>
  • trunk/bp-messages/bp-messages-functions.php

    r6340 r6342  
    268268        return $return;
    269269}
    270 
    271 ?>
  • trunk/bp-messages/bp-messages-loader.php

    r6093 r6342  
    268268}
    269269add_action( 'bp_setup_components', 'bp_setup_messages', 6 );
    270 
    271 ?>
  • trunk/bp-messages/bp-messages-notifications.php

    r5696 r6342  
    7171        do_action( 'bp_messages_sent_notification_email', $recipients, $email_subject, $email_content, $args );
    7272}
    73 
    74 ?>
  • trunk/bp-messages/bp-messages-screens.php

    r6093 r6342  
    173173}
    174174add_action( 'bp_notification_settings', 'messages_screen_notification_settings', 2 );
    175 
    176 ?>
  • trunk/bp-messages/bp-messages-template.php

    r6259 r6342  
    947947}
    948948add_action( 'messages_box_loop_start', 'bp_messages_embed' );
    949 
    950 ?>
  • trunk/bp-themes/index.php

    r6234 r6342  
    44 * @todo move bp-default to WordPress.org theme repo
    55 */
    6 
    7 ?>
  • trunk/bp-xprofile/bp-xprofile-activity.php

    r5926 r6342  
    133133}
    134134add_action( 'xprofile_avatar_uploaded', 'bp_xprofile_new_avatar_activity' );
    135 
    136 ?>
  • trunk/bp-xprofile/bp-xprofile-admin.php

    r6117 r6342  
    7878
    7979                        <?php
    80                        
     80
    8181                        wp_nonce_field( 'bp_reorder_fields', '_wpnonce_reorder_fields'        );
    8282                        wp_nonce_field( 'bp_reorder_groups', '_wpnonce_reorder_groups', false );
     
    267267
    268268                                unset( $_GET['mode'] );
    269                                
     269
    270270                                xprofile_admin( $message, $type );
    271271                        } else {
     
    279279                                        bp_xprofile_update_field_meta( $field_id, 'default_visibility', $_POST['default-visibility'] );
    280280                                }
    281                                
     281
    282282                                if ( !empty( $_POST['allow-custom-visibility'] ) ) {
    283283                                        bp_xprofile_update_field_meta( $field_id, 'allow_custom_visibility', $_POST['allow-custom-visibility'] );
     
    467467<?php
    468468}
    469 
    470 ?>
  • trunk/bp-xprofile/bp-xprofile-buddybar.php

    r6093 r6342  
    33// Exit if accessed directly
    44if ( !defined( 'ABSPATH' ) ) exit;
    5 
    6 ?>
  • trunk/bp-xprofile/bp-xprofile-cache.php

    r6093 r6342  
    3030// List actions to clear super cached pages on, if super cache is installed
    3131add_action( 'xprofile_updated_profile', 'bp_core_clear_cache' );
    32 
    33 ?>
  • trunk/bp-xprofile/bp-xprofile-caps.php

    r6259 r6342  
    4949                        // Friends don't let friends edit each other's visibility
    5050                        if ( $profile_user_id != bp_displayed_user_id() && !bp_current_user_can( 'bp_moderate' ) ) {
    51                                 $caps[] = 'do_not_allow'; 
     51                                $caps[] = 'do_not_allow';
    5252                                break;
    5353                        }
     
    5959}
    6060add_filter( 'bp_map_meta_caps', 'bp_xprofile_map_meta_caps', 10, 4 );
    61 ?>
  • trunk/bp-xprofile/bp-xprofile-cssjs.php

    r6264 r6342  
    4343}
    4444add_action( 'admin_enqueue_scripts', 'xprofile_add_admin_js', 1 );
    45 
    46 ?>
  • trunk/bp-xprofile/bp-xprofile-filters.php

    r6314 r6342  
    246246}
    247247add_filter( 'bp_user_query_populate_extras', 'bp_xprofile_filter_user_query_populate_extras', 2, 2 );
    248 
    249 ?>
  • trunk/bp-xprofile/bp-xprofile-functions.php

    r6259 r6342  
    743743        return $field_ids;
    744744}
    745 
    746 
    747 ?>
  • trunk/bp-xprofile/bp-xprofile-loader.php

    r6259 r6342  
    9999                        'datebox'
    100100                ) );
    101                
    102                 // Register the visibility levels. See bp_xprofile_get_visibility_levels() to filter           
     101
     102                // Register the visibility levels. See bp_xprofile_get_visibility_levels() to filter
    103103                $this->visibility_levels = array(
    104104                        'public'  => array(
     
    111111                        )
    112112                );
    113                
     113
    114114                if ( bp_is_active( 'friends' ) ) {
    115115                        $this->visibility_levels['friends'] = array(
     
    277277}
    278278add_action( 'bp_setup_components', 'bp_setup_xprofile', 6 );
    279 
    280 ?>
  • trunk/bp-xprofile/bp-xprofile-template.php

    r6259 r6342  
    924924                return apply_filters( 'bp_profile_get_visibility_radio_buttons', $html );
    925925        }
    926 ?>
Note: See TracChangeset for help on using the changeset viewer.