Changeset 6342
- Timestamp:
- 09/18/2012 06:03:00 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 106 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-actions.php
r6326 r6342 598 598 $bp->activity->akismet = new BP_Akismet(); 599 599 } 600 601 ?> -
trunk/bp-activity/bp-activity-admin.php
r6309 r6342 1398 1398 } 1399 1399 } 1400 ?> -
trunk/bp-activity/bp-activity-akismet.php
r6310 r6342 118 118 */ 119 119 public function add_activity_stream_nonce() { 120 $form_id = '_bp_as_nonce'; 120 $form_id = '_bp_as_nonce'; 121 121 $value = '_bp_as_nonce_' . bp_loggedin_user_id(); 122 122 … … 249 249 250 250 do_action( 'bp_activity_akismet_mark_as_ham', $activity, $source ); 251 } 251 } 252 252 253 253 /** … … 576 576 $interval = max( 1, absint( $interval ) ); 577 577 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 579 579 $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 ) ); 580 580 $activity_ids = $wpdb->get_col( $sql ); … … 585 585 } 586 586 } 587 ?> -
trunk/bp-activity/bp-activity-cache.php
r6259 r6342 36 36 bp_update_meta_cache( $cache_args ); 37 37 } 38 39 ?> -
trunk/bp-activity/bp-activity-classes.php
r6331 r6342 51 51 $this->mptt_right = $row->mptt_right; 52 52 $this->is_spam = $row->is_spam; 53 53 54 54 bp_activity_update_meta_cache( $this->id ); 55 55 } … … 208 208 // Define the preferred order for indexes 209 209 $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 211 211 foreach( $indexes as $key => $index ) { 212 212 if ( false !== strpos( $where_sql, $index ) ) { … … 217 217 218 218 if ( !empty( $the_index ) ) { 219 $index_hint_sql = $wpdb->prepare( "USE INDEX ({$the_index})" ); 219 $index_hint_sql = $wpdb->prepare( "USE INDEX ({$the_index})" ); 220 220 } else { 221 221 $index_hint_sql = ''; … … 262 262 } 263 263 } 264 264 265 265 // Get activity meta 266 266 $activity_ids = array(); … … 268 268 $activity_ids[] = $activity->id; 269 269 } 270 270 271 271 if ( !empty( $activity_ids ) ) { 272 272 bp_activity_update_meta_cache( $activity_ids ); … … 670 670 } 671 671 } 672 673 ?> -
trunk/bp-activity/bp-activity-filters.php
r6167 r6342 214 214 if ( $activity_id & bp_is_active( 'activity' ) ) { 215 215 $activity = new BP_Activity_Activity( $activity_id ); 216 216 217 217 // If this activity has been marked as spam, don't do anything. This prevents @notifications being sent. 218 218 if ( !empty( $activity ) && $activity->is_spam ) … … 337 337 return apply_filters( 'bp_activity_truncate_entry', $excerpt, $text, $append_text ); 338 338 } 339 340 ?> -
trunk/bp-activity/bp-activity-functions.php
r6259 r6342 533 533 } else { 534 534 $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 536 536 if ( !empty( $metas ) ) { 537 537 $metas = array_map( 'maybe_unserialize', (array) $metas ); 538 538 539 539 foreach( $metas as $mkey => $mvalue ) { 540 540 wp_cache_set( 'bp_activity_meta_' . $activity_id . '_' . $mkey, $mvalue, 'bp' ); … … 542 542 } 543 543 } 544 544 545 545 // No result so return false 546 546 if ( empty( $metas ) ) … … 731 731 $activity_obj->$k = $v; 732 732 733 // Mark as not spam 733 // Mark as not spam 734 734 bp_activity_mark_as_ham( $activity_obj ); 735 735 … … 1028 1028 ) ); 1029 1029 1030 $activity_content = apply_filters( 'bp_activity_latest_update_content', $content ); 1030 $activity_content = apply_filters( 'bp_activity_latest_update_content', $content ); 1031 1031 1032 1032 // Add this update to the "latest update" usermeta so it can be fetched anywhere. … … 1433 1433 preg_match_all( '/<img[^>]*>/Ui', $content, $matches ); 1434 1434 $content = preg_replace('|(\[caption(.*?)\])?<img[^>]*>(\[/caption\])?|', '', $content ); 1435 1435 1436 1436 if ( !empty( $matches ) && !empty( $matches[0] ) ) { 1437 1437 // Get the SRC value … … 1550 1550 1551 1551 do_action( 'bp_activity_mark_as_ham', $activity, $source ); 1552 } 1552 } 1553 1553 1554 1554 … … 1667 1667 bp_activity_update_meta( $id, $cachekey, $cache ); 1668 1668 } 1669 1670 ?> -
trunk/bp-activity/bp-activity-loader.php
r6259 r6342 340 340 } 341 341 add_action( 'bp_setup_components', 'bp_setup_activity', 6 ); 342 343 ?> -
trunk/bp-activity/bp-activity-notifications.php
r6326 r6342 39 39 */ 40 40 function bp_activity_at_message_notification( $activity_id, $receiver_user_id ) { 41 41 42 42 // Don't leave multiple notifications for the same activity item 43 43 $notifications = BP_Core_Notification::get_all_for_user( $receiver_user_id, 'all' ); 44 44 45 45 foreach( $notifications as $notification ) { 46 46 if ( $activity_id == $notification->item_id ) { … … 231 231 } 232 232 } 233 234 ?> -
trunk/bp-activity/bp-activity-template.php
r6175 r6342 108 108 * Constructor method 109 109 * 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 111 111 * description of $args array 112 112 * … … 139 139 $args = bp_core_parse_args_array( $old_args_keys, $func_args ); 140 140 } 141 141 142 142 $defaults = array( 143 143 'page' => 1, … … 157 157 $r = wp_parse_args( $args, $defaults ); 158 158 extract( $r ); 159 159 160 160 $this->pag_page = isset( $_REQUEST[$page_arg] ) ? intval( $_REQUEST[$page_arg] ) : $page; 161 161 $this->pag_num = isset( $_REQUEST['num'] ) ? intval( $_REQUEST['num'] ) : $per_page; … … 2740 2740 } 2741 2741 add_action( 'bp_head', 'bp_activity_sitewide_feed' ); 2742 2743 ?> -
trunk/bp-blogs/bp-blogs-actions.php
r6093 r6342 35 35 } 36 36 add_action( 'bp_actions', 'bp_blogs_redirect_to_random_blog' ); 37 38 ?> -
trunk/bp-blogs/bp-blogs-activity.php
r6093 r6342 18 18 * @subpackage BlogsActivity 19 19 * @global type $bp 20 * @return boolean 20 * @return boolean 21 21 */ 22 22 function bp_blogs_register_activity_actions() { … … 43 43 * @global BuddyPress $bp 44 44 * @param array $args 45 * @return boolean 45 * @return boolean 46 46 */ 47 47 function bp_blogs_record_activity( $args = '' ) { … … 126 126 ) ); 127 127 } 128 129 ?> -
trunk/bp-blogs/bp-blogs-buddybar.php
r6093 r6342 18 18 * @subpackage BlogsBuddyBar 19 19 * @global BuddyPress $bp 20 * @return boolean 20 * @return boolean 21 21 */ 22 22 23 23 function bp_adminbar_blogs_menu() { 24 24 global $bp; … … 78 78 } 79 79 add_action( 'bp_adminbar_menus', 'bp_adminbar_blogs_menu', 6 ); 80 81 ?> -
trunk/bp-blogs/bp-blogs-cache.php
r6260 r6342 21 21 * @subpackage BlogsCache 22 22 * @param int $blog_id 23 * @param int $user_id 23 * @param int $user_id 24 24 */ 25 25 function bp_blogs_clear_blog_object_cache( $blog_id, $user_id ) { … … 34 34 * @package BuddyPress 35 35 * @subpackage BlogsCache 36 * @param Blog $recorded_blog_obj 36 * @param Blog $recorded_blog_obj 37 37 */ 38 38 function bp_blogs_format_clear_blog_cache( $recorded_blog_obj ) { … … 55 55 add_action( 'bp_blogs_new_blog', 'bp_core_clear_cache' ); 56 56 add_action( 'bp_blogs_remove_data', 'bp_core_clear_cache' ); 57 58 ?> -
trunk/bp-blogs/bp-blogs-classes.php
r5930 r6342 287 287 } 288 288 } 289 290 ?> -
trunk/bp-blogs/bp-blogs-filters.php
r6259 r6342 22 22 } 23 23 add_filter( 'wp_signup_location', 'bp_blogs_creation_location' ); 24 25 26 ?> -
trunk/bp-blogs/bp-blogs-functions.php
r6299 r6342 176 176 if ( 'publish' == $post->post_status && empty( $post->post_password ) ) { 177 177 if ( $is_blog_public || !is_multisite() ) { 178 178 179 179 // Record this in activity streams 180 180 $post_permalink = get_permalink( $post_id ); … … 195 195 ) 196 196 ) ); 197 197 198 198 if ( !empty( $existing['activities'] ) ) { 199 199 return; … … 314 314 function bp_blogs_add_user_to_blog( $user_id, $role = false, $blog_id = 0 ) { 315 315 global $wpdb; 316 316 317 317 if ( empty( $blog_id ) ) { 318 318 $blog_id = isset( $wpdb->blogid ) ? $wpdb->blogid : bp_get_root_blog_id(); … … 671 671 add_action( 'delete_user', 'bp_blogs_remove_data' ); 672 672 add_action( 'bp_make_spam_user', 'bp_blogs_remove_data' ); 673 674 ?> -
trunk/bp-blogs/bp-blogs-loader.php
r6093 r6342 116 116 'item_css_id' => $this->id 117 117 ); 118 118 119 119 $parent_url = trailingslashit( bp_displayed_user_domain() . bp_get_blogs_slug() ); 120 120 121 121 $sub_nav[] = array( 122 122 'name' => __( 'My Sites', 'buddypress' ), … … 213 213 } 214 214 add_action( 'bp_setup_components', 'bp_setup_blogs', 6 ); 215 216 ?> -
trunk/bp-blogs/bp-blogs-template.php
r6259 r6342 657 657 return bp_get_button( apply_filters( 'bp_get_blogs_visit_blog_button', $button ) ); 658 658 } 659 660 ?> -
trunk/bp-blogs/bp-blogs-widgets.php
r6260 r6342 89 89 } 90 90 } 91 ?> -
trunk/bp-core/admin/bp-core-components.php
r6155 r6342 154 154 $page = bp_core_do_network_admin() ? 'settings.php' : 'options-general.php'; 155 155 $action = !empty( $_GET['action'] ) ? $_GET['action'] : 'all'; 156 156 157 157 switch( $action ) { 158 158 case 'all' : … … 173 173 break; 174 174 } 175 175 176 176 // The setup wizard uses different, more descriptive text 177 177 if ( bp_get_maintenance_mode() ) : ?> … … 182 182 183 183 <?php endif ?> 184 184 185 185 <ul class="subsubsub"> 186 186 <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> … … 208 208 209 209 <tbody id="the-list"> 210 210 211 211 <?php if ( !empty( $current_components ) ) : ?> 212 212 … … 234 234 <strong><?php echo esc_html( $labels['title'] ); ?></strong> 235 235 <div class="row-actions-visible"> 236 236 237 237 </div> 238 238 </td> … … 243 243 </div> 244 244 <div class="active second plugin-version-author-uri"> 245 245 246 246 </div> 247 247 </td> … … 251 251 252 252 <?php else : ?> 253 253 254 254 <tr class="no-items"> 255 255 <td class="colspanchange" colspan="3"><?php _e( 'No components found.', 'buddypress' ); ?></td> … … 297 297 } 298 298 add_action( 'admin_init', 'bp_core_admin_components_settings_handler' ); 299 300 ?> -
trunk/bp-core/admin/bp-core-functions.php
r6310 r6342 376 376 do_action( 'bp_admin_tabs' ); 377 377 } 378 379 ?> -
trunk/bp-core/admin/bp-core-schema.php
r5966 r6342 243 243 $bp_prefix = bp_core_get_table_prefix(); 244 244 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 } 253 253 254 254 $sql[] = "CREATE TABLE {$bp_prefix}bp_xprofile_groups ( … … 347 347 * 348 348 * @global WPDB $wpdb 349 * @global BuddyPress $bp 349 * @global BuddyPress $bp 350 350 */ 351 351 function bp_update_db_stuff() { … … 387 387 388 388 } 389 390 ?> -
trunk/bp-core/admin/bp-core-settings.php
r6310 r6342 366 366 return apply_filters( 'bp_get_form_option', $value, $option ); 367 367 } 368 ?> -
trunk/bp-core/admin/bp-core-slugs.php
r6310 r6342 138 138 'activate' => __( 'Activate', 'buddypress' ), 139 139 ); 140 140 141 141 $static_pages = apply_filters( 'bp_static_pages', $static_pages ); 142 142 143 143 if ( !empty( $static_pages ) ) : ?> 144 144 … … 158 158 159 159 <td> 160 160 161 161 <?php if ( ! bp_is_root_blog() ) switch_to_blog( bp_get_root_blog_id() ); ?> 162 162 … … 225 225 } 226 226 add_action( 'admin_init', 'bp_core_admin_slugs_setup_handler' ); 227 228 ?> -
trunk/bp-core/admin/bp-core-update.php
r6259 r6342 1055 1055 return false; 1056 1056 } 1057 1058 ?> -
trunk/bp-core/bp-core-admin.php
r6310 r6342 505 505 $bp->admin = new BP_Admin(); 506 506 } 507 508 ?> -
trunk/bp-core/bp-core-adminbar.php
r6264 r6342 66 66 } 67 67 add_action( 'bp_init', 'bp_core_load_admin_bar_css' ); 68 69 ?> -
trunk/bp-core/bp-core-avatars.php
r6247 r6342 960 960 return apply_filters( 'bp_core_avatar_thumb', $bp->avatar->thumb->default ); 961 961 } 962 963 964 ?> -
trunk/bp-core/bp-core-buddybar.php
r6264 r6342 684 684 } 685 685 add_action( 'bp_init', 'bp_core_load_buddybar_css' ); 686 687 ?> -
trunk/bp-core/bp-core-cache.php
r6259 r6342 133 133 return $cache; 134 134 } 135 136 ?> -
trunk/bp-core/bp-core-classes.php
r6314 r6342 1774 1774 } 1775 1775 } 1776 1777 ?> -
trunk/bp-core/bp-core-component.php
r6093 r6342 386 386 } 387 387 endif; // BP_Component 388 389 ?> -
trunk/bp-core/bp-core-cssjs.php
r6310 r6342 139 139 } 140 140 add_action( 'wp_head', 'bp_core_add_ajax_url_js' ); 141 142 ?> -
trunk/bp-core/bp-core-dependency.php
r6285 r6342 232 232 return apply_filters( 'bp_allowed_themes', $themes ); 233 233 } 234 -
trunk/bp-core/bp-core-functions.php
r6338 r6342 1282 1282 return $result; 1283 1283 } 1284 1285 ?> -
trunk/bp-core/bp-core-loader.php
r6278 r6342 247 247 } 248 248 add_action( 'bp_setup_components', 'bp_setup_core', 2 ); 249 250 ?> -
trunk/bp-core/bp-core-moderation.php
r6259 r6342 266 266 return apply_filters( 'bp_core_current_user_ua', $retval ); 267 267 } 268 ?> -
trunk/bp-core/bp-core-template.php
r6285 r6342 1753 1753 } 1754 1754 add_filter( 'body_class', 'bp_get_the_body_class', 10, 2 ); 1755 1756 ?> -
trunk/bp-core/bp-core-widgets.php
r6314 r6342 323 323 add_action( 'wp_ajax_widget_members', 'bp_core_ajax_widget_members' ); 324 324 add_action( 'wp_ajax_nopriv_widget_members', 'bp_core_ajax_widget_members' ); 325 326 ?> -
trunk/bp-core/bp-core-wpabstraction.php
r5978 r6342 171 171 } 172 172 } 173 174 ?> -
trunk/bp-core/deprecated/1.5.php
r6259 r6342 664 664 _deprecated_function( __FUNCTION__, '1.5', 'Moved into theme template' ); 665 665 } 666 ?> -
trunk/bp-core/deprecated/1.6.php
r6093 r6342 262 262 add_action( 'after_setup_theme', 'bp_die_legacy_ajax_callbacks', 20 ); 263 263 endif; 264 ?> 264 -
trunk/bp-forums/bb-config.php
r2209 r6342 9 9 10 10 header("HTTP/1.0 403 Forbidden"); die; 11 ?> -
trunk/bp-forums/bp-forums-actions.php
r6093 r6342 2 2 // Exit if accessed directly 3 3 if ( !defined( 'ABSPATH' ) ) exit; 4 5 ?> -
trunk/bp-forums/bp-forums-admin.php
r6310 r6342 416 416 return 1; 417 417 } 418 419 ?> -
trunk/bp-forums/bp-forums-bbpress-sa.php
r5930 r6342 421 421 return $for_update; 422 422 } 423 424 ?> -
trunk/bp-forums/bp-forums-bbpress.php
r6093 r6342 6 6 // Exit if accessed directly 7 7 if ( !defined( 'ABSPATH' ) ) exit; 8 ?> -
trunk/bp-forums/bp-forums-filters.php
r5927 r6342 206 206 return $sql; 207 207 } 208 209 ?> -
trunk/bp-forums/bp-forums-functions.php
r6259 r6342 243 243 extract( $r, EXTR_SKIP ); 244 244 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() ) ) 247 247 return false; 248 248 … … 354 354 function bp_forums_reply_exists( $text = '', $topic_id = 0, $user_id = 0 ) { 355 355 $reply_exists = false; 356 356 357 357 if ( $text && $topic_id && $user_id ) { 358 358 do_action( 'bbpress_init' ); 359 359 360 360 $args = array( 361 361 'post_author_id' => $user_id, 362 362 'topic_id' => $topic_id 363 363 ); 364 364 365 365 // BB_Query's post_text parameter does a MATCH, while we need exact matches 366 366 add_filter( 'get_posts_where', create_function( '$q', 'return $q . " AND p.post_text = \'' . $text . '\'";' ) ); 367 367 368 368 $query = new BB_Query( 'post', $args ); 369 369 370 370 $reply_exists = !empty( $query->results ); 371 371 } 372 372 373 373 return apply_filters( 'bp_forums_reply_exists', $reply_exists, $text, $topic_id, $user_id ); 374 374 } … … 747 747 bb_update_postmeta( $id, $cachekey, $cache ); 748 748 } 749 ?> -
trunk/bp-forums/bp-forums-loader.php
r6108 r6342 252 252 } 253 253 add_action( 'bp_setup_components', 'bp_setup_forums', 6 ); 254 255 ?> -
trunk/bp-forums/bp-forums-screens.php
r6093 r6342 125 125 } 126 126 add_action( 'bp_screens', 'bp_forums_screen_single_topic' ); 127 ?> -
trunk/bp-forums/bp-forums-template.php
r6220 r6342 1466 1466 return apply_filters( 'bp_get_forum_topic_count', bp_forums_total_topic_count( $user_id ) ); 1467 1467 } 1468 ?> -
trunk/bp-forums/deprecated/1.6.php
r6310 r6342 200 200 } 201 201 } 202 203 ?> -
trunk/bp-friends/bp-friends-actions.php
r6093 r6342 84 84 } 85 85 add_action( 'bp_init', 'friends_action_remove_friend' ); 86 87 ?> -
trunk/bp-friends/bp-friends-activity.php
r6093 r6342 4 4 * BuddyPress Friends Activity Functions 5 5 * 6 * These functions handle the recording, deleting and formatting of activity 6 * These functions handle the recording, deleting and formatting of activity 7 7 * for the user and for this specific component. 8 8 * … … 122 122 return $return; 123 123 } 124 125 ?> -
trunk/bp-friends/bp-friends-cache.php
r6101 r6342 40 40 add_action( 'friends_friendship_deleted', 'bp_core_clear_cache' ); 41 41 add_action( 'friends_friendship_requested', 'bp_core_clear_cache' ); 42 43 ?> -
trunk/bp-friends/bp-friends-classes.php
r6120 r6342 347 347 } 348 348 } 349 350 ?> -
trunk/bp-friends/bp-friends-functions.php
r6259 r6342 145 145 $friendship_id = BP_Friends_Friendship::get_friendship_id( $initiator_userid, $friend_userid ); 146 146 $friendship = new BP_Friends_Friendship( $friendship_id, true, false ); 147 147 148 148 if ( !$friendship->is_confirmed && BP_Friends_Friendship::withdraw( $friendship_id ) ) { 149 149 // Remove the friend request notice … … 227 227 /** 228 228 * Get a list of friends that a user can invite into this group. 229 * 229 * 230 230 * Excludes friends that are already in the group, and banned friends if the 231 231 * user is not a group admin. … … 355 355 add_action( 'delete_user', 'friends_remove_data' ); 356 356 add_action( 'bp_make_spam_user', 'friends_remove_data' ); 357 358 ?> -
trunk/bp-friends/bp-friends-loader.php
r6093 r6342 216 216 } 217 217 add_action( 'bp_setup_components', 'bp_setup_friends', 6 ); 218 219 ?> -
trunk/bp-friends/bp-friends-notifications.php
r5729 r6342 90 90 do_action( 'bp_friends_sent_accepted_email', $initiator_id, $subject, $message, $friendship_id, $friend_id ); 91 91 } 92 93 ?> -
trunk/bp-friends/bp-friends-screens.php
r6093 r6342 48 48 49 49 bp_core_redirect( trailingslashit( bp_loggedin_user_domain() . bp_current_component() . '/' . bp_current_action() ) ); 50 50 51 51 } elseif ( bp_is_action_variable( 'cancel', 0 ) && is_numeric( bp_action_variable( 1 ) ) ) { 52 52 // Check the nonce … … 109 109 } 110 110 add_action( 'bp_notification_settings', 'friends_screen_notification_settings' ); 111 112 ?> -
trunk/bp-friends/bp-friends-template.php
r6047 r6342 356 356 $user_id = bp_displayed_user_id(); 357 357 } 358 358 359 359 if ( !$user_id ) { 360 return 0; 361 } 362 360 return 0; 361 } 362 363 363 $requests = friends_get_friendship_request_user_ids( $user_id ); 364 364 365 365 if ( !empty( $requests ) ) { 366 366 $requests = implode( ',', (array) $requests ); … … 368 368 $requests = 0; 369 369 } 370 370 371 371 return apply_filters( 'bp_get_friendship_requests', $requests ); 372 372 } … … 431 431 return apply_filters( 'bp_friend_get_total_requests_count', count( BP_Friends_Friendship::get_friend_user_ids( $user_id, true ) ) ); 432 432 } 433 434 ?> -
trunk/bp-groups/bp-groups-actions.php
r6291 r6342 322 322 } 323 323 add_action( 'bp_actions', 'groups_action_group_feed' ); 324 325 ?> -
trunk/bp-groups/bp-groups-activity.php
r6097 r6342 313 313 return false; 314 314 } 315 316 ?> -
trunk/bp-groups/bp-groups-admin.php
r6309 r6342 1294 1294 } 1295 1295 } 1296 1297 ?> -
trunk/bp-groups/bp-groups-adminbar.php
r6093 r6342 117 117 } 118 118 add_action( 'bp_init', 'bp_groups_remove_edit_page_menu', 99 ); 119 120 ?> -
trunk/bp-groups/bp-groups-buddybar.php
r6093 r6342 66 66 } 67 67 add_action( 'bp_adminbar_menus', 'bp_groups_adminbar_admin_menu', 20 ); 68 69 ?> -
trunk/bp-groups/bp-groups-cache.php
r6150 r6342 29 29 function bp_groups_update_meta_cache( $group_ids = false ) { 30 30 global $bp; 31 31 32 32 $cache_args = array( 33 33 'object_ids' => $group_ids, … … 37 37 'cache_key_prefix' => 'bp_groups_groupmeta' 38 38 ); 39 39 40 40 bp_update_meta_cache( $cache_args ); 41 41 } … … 104 104 add_action( 'groups_created_group', 'bp_core_clear_cache' ); 105 105 add_action( 'groups_group_avatar_updated', 'bp_core_clear_cache' ); 106 107 ?> -
trunk/bp-groups/bp-groups-classes.php
r6321 r6342 59 59 global $wpdb, $bp; 60 60 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 ) ) ) { 62 62 bp_groups_update_meta_cache( $this->id ); 63 63 64 64 $this->id = $group->id; 65 65 $this->creator_id = $group->creator_id; … … 73 73 $this->total_member_count = groups_get_groupmeta( $this->id, 'total_member_count' ); 74 74 $this->is_member = BP_Groups_Member::check_is_member( bp_loggedin_user_id(), $this->id ); 75 75 76 76 // If this is a private or hidden group, does the current user have access? 77 77 if ( 'private' == $this->status || 'hidden' == $this->status ) { … … 160 160 161 161 do_action_ref_array( 'groups_group_after_save', array( &$this ) ); 162 162 163 163 wp_cache_delete( 'bp_groups_group_' . $this->id, 'bp' ); 164 164 … … 451 451 $group_ids[] = $group->id; 452 452 } 453 453 454 454 // Populate some extra information instead of querying each time in the loop 455 455 if ( !empty( $populate_extras ) ) { … … 457 457 $paged_groups = BP_Groups_Group::get_group_extras( $paged_groups, $group_ids, $type ); 458 458 } 459 459 460 460 // Grab all groupmeta 461 461 bp_groups_update_meta_cache( $group_ids ); … … 858 858 return false; 859 859 } 860 860 861 861 $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 ); 862 862 } … … 1312 1312 var $name = false; 1313 1313 var $slug = false; 1314 1314 1315 1315 // The name/slug of the Group Admin tab for this extension 1316 1316 var $admin_name = ''; … … 1359 1359 function _register() { 1360 1360 global $bp; 1361 1361 1362 1362 // If admin/create names and slugs are not provided, they fall back on the main 1363 1363 // name and slug for the extension … … 1365 1365 $this->admin_name = $this->name; 1366 1366 } 1367 1367 1368 1368 if ( !$this->admin_slug ) { 1369 1369 $this->admin_slug = $this->slug; 1370 1370 } 1371 1371 1372 1372 if ( !$this->create_name ) { 1373 1373 $this->create_name = $this->name; 1374 1374 } 1375 1375 1376 1376 if ( !$this->create_slug ) { 1377 1377 $this->create_slug = $this->slug; … … 1479 1479 ' ), 11 ); 1480 1480 } 1481 1482 ?> -
trunk/bp-groups/bp-groups-filters.php
r6285 r6342 78 78 79 79 /** 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 81 81 */ 82 82 function groups_add_forum_privacy_sql() { … … 148 148 if ( bp_current_user_can( 'bp_moderate' ) ) 149 149 return true; 150 150 151 151 if ( 'add_tag_to' == $cap ) 152 152 if ( $bp->groups->current_group->user_has_access ) return true; … … 170 170 } 171 171 add_filter( 'get_latest_topics_fields', 'groups_filter_forums_root_page_sql' ); 172 173 ?> -
trunk/bp-groups/bp-groups-forums.php
r6259 r6342 405 405 return apply_filters( 'groups_total_forum_topic_count', BP_Groups_Group::get_global_topic_count( $status, $search_terms ) ); 406 406 } 407 408 ?> -
trunk/bp-groups/bp-groups-functions.php
r6321 r6342 1024 1024 add_action( 'delete_user', 'groups_remove_data_for_user' ); 1025 1025 add_action( 'bp_make_spam_user', 'groups_remove_data_for_user' ); 1026 1027 ?> -
trunk/bp-groups/bp-groups-loader.php
r6307 r6342 591 591 } 592 592 add_action( 'bp_setup_components', 'bp_setup_groups', 6 ); 593 594 ?> -
trunk/bp-groups/bp-groups-notifications.php
r6147 r6342 259 259 } 260 260 } 261 262 ?> -
trunk/bp-groups/bp-groups-template.php
r6321 r6342 2264 2264 function bp_get_groups_current_create_step() { 2265 2265 global $bp; 2266 2266 2267 2267 if ( !empty( $bp->groups->current_create_step ) ) { 2268 2268 $current_create_step = $bp->groups->current_create_step; … … 2270 2270 $current_create_step = ''; 2271 2271 } 2272 2272 2273 2273 return apply_filters( 'bp_get_groups_current_create_step', $current_create_step ); 2274 2274 } … … 2434 2434 $tab = ''; 2435 2435 } 2436 2436 2437 2437 return apply_filters( 'bp_get_current_group_admin_tab', $tab ); 2438 2438 } … … 2951 2951 return $url; 2952 2952 } 2953 ?> -
trunk/bp-groups/bp-groups-widgets.php
r6264 r6342 202 202 203 203 } 204 add_action( 'wp_ajax_widget_groups_list', 'groups_ajax_widget_groups_list' );204 add_action( 'wp_ajax_widget_groups_list', 'groups_ajax_widget_groups_list' ); 205 205 add_action( 'wp_ajax_nopriv_widget_groups_list', 'groups_ajax_widget_groups_list' ); 206 207 ?> -
trunk/bp-members/bp-members-actions.php
r6093 r6342 111 111 } 112 112 add_action( 'bp_actions', 'bp_core_get_random_member' ); 113 114 ?> -
trunk/bp-members/bp-members-adminbar.php
r6080 r6342 185 185 } 186 186 add_action( 'bp_init', 'bp_members_remove_edit_page_menu', 99 ); 187 188 ?> -
trunk/bp-members/bp-members-buddybar.php
r6093 r6342 83 83 echo '<li>'; 84 84 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, 90 90 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), $author->display_name ) 91 91 ) ); … … 149 149 } 150 150 add_action( 'bp_adminbar_menus', 'bp_members_adminbar_admin_menu', 20 ); 151 152 ?> -
trunk/bp-members/bp-members-filters.php
r6199 r6342 75 75 $profile_link = trailingslashit( $user_domain . $bp->profile->slug . '/edit' ); 76 76 } 77 77 78 78 return apply_filters( 'bp_members_edit_profile_url', $profile_link, $url, $user_id, $scheme ); 79 79 } 80 80 add_filter( 'edit_profile_url', 'bp_members_edit_profile_url', 10, 3 ); 81 82 ?> -
trunk/bp-members/bp-members-functions.php
r6336 r6342 101 101 102 102 // Default behavior as of BuddyPress 1.7 103 } else { 103 } else { 104 104 105 105 // Get users like we were asked to do... … … 1401 1401 } 1402 1402 add_action( 'bp_init', 'bp_core_wpsignup_redirect' ); 1403 1404 ?> -
trunk/bp-members/bp-members-loader.php
r6278 r6342 114 114 $bp->default_component = BP_DEFAULT_COMPONENT; 115 115 } 116 116 117 117 if ( bp_displayed_user_id() ) { 118 118 $bp->canonical_stack['base_url'] = bp_displayed_user_domain(); 119 119 120 120 if ( bp_current_component() ) { 121 121 $bp->canonical_stack['component'] = bp_current_component(); 122 122 } 123 123 124 124 if ( bp_current_action() ) { 125 125 $bp->canonical_stack['action'] = bp_current_action(); 126 126 } 127 127 128 128 if ( !empty( $bp->action_variables ) ) { 129 129 $bp->canonical_stack['action_variables'] = bp_action_variables(); … … 132 132 if ( !bp_current_component() ) { 133 133 $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() ) { 135 135 // The canonical URL will not contain the default component 136 136 unset( $bp->canonical_stack['component'] ); … … 210 210 } 211 211 add_action( 'bp_setup_components', 'bp_setup_members', 1 ); 212 213 ?> -
trunk/bp-members/bp-members-notifications.php
r6093 r6342 63 63 /** 64 64 * Get a specific notification by its ID 65 * 65 * 66 66 * @since BuddyPress (1.0) 67 67 * @param int $id 68 * @return BP_Core_Notification 68 * @return BP_Core_Notification 69 69 */ 70 70 function bp_core_get_notification( $id ) { … … 74 74 /** 75 75 * Get notifications for a specific user 76 * 76 * 77 77 * @since BuddyPress (1.0) 78 78 * @global BuddyPress $bp … … 174 174 /** 175 175 * Delete notifications for a user by type 176 * 176 * 177 177 * Used when clearing out notifications for a specific component when the user 178 178 * has visited that component. … … 190 190 /** 191 191 * Delete notifications for an item ID 192 * 192 * 193 193 * Used when clearing out notifications for a specific component when the user 194 194 * has visited that component. … … 250 250 return true; 251 251 } 252 253 ?> -
trunk/bp-members/bp-members-template.php
r6249 r6342 1184 1184 return $url; 1185 1185 } 1186 1187 ?> -
trunk/bp-messages/bp-messages-actions.php
r6093 r6342 114 114 } 115 115 add_action( 'bp_actions', 'messages_action_bulk_delete' ); 116 117 ?> -
trunk/bp-messages/bp-messages-cache.php
r6093 r6342 23 23 add_action( 'messages_screen_sentbox', 'bp_core_clear_cache' ); 24 24 add_action( 'messages_screen_inbox', 'bp_core_clear_cache' ); 25 26 ?> -
trunk/bp-messages/bp-messages-classes.php
r6057 r6342 559 559 } 560 560 } 561 562 ?> -
trunk/bp-messages/bp-messages-cssjs.php
r6264 r6342 55 55 <?php 56 56 } 57 58 ?> -
trunk/bp-messages/bp-messages-filters.php
r5696 r6342 67 67 add_filter( 'bp_get_the_thread_message_content', 'stripslashes_deep' ); 68 68 add_filter( 'bp_get_the_thread_subject', 'stripslashes_deep' ); 69 70 ?> -
trunk/bp-messages/bp-messages-functions.php
r6340 r6342 268 268 return $return; 269 269 } 270 271 ?> -
trunk/bp-messages/bp-messages-loader.php
r6093 r6342 268 268 } 269 269 add_action( 'bp_setup_components', 'bp_setup_messages', 6 ); 270 271 ?> -
trunk/bp-messages/bp-messages-notifications.php
r5696 r6342 71 71 do_action( 'bp_messages_sent_notification_email', $recipients, $email_subject, $email_content, $args ); 72 72 } 73 74 ?> -
trunk/bp-messages/bp-messages-screens.php
r6093 r6342 173 173 } 174 174 add_action( 'bp_notification_settings', 'messages_screen_notification_settings', 2 ); 175 176 ?> -
trunk/bp-messages/bp-messages-template.php
r6259 r6342 947 947 } 948 948 add_action( 'messages_box_loop_start', 'bp_messages_embed' ); 949 950 ?> -
trunk/bp-themes/index.php
r6234 r6342 4 4 * @todo move bp-default to WordPress.org theme repo 5 5 */ 6 7 ?> -
trunk/bp-xprofile/bp-xprofile-activity.php
r5926 r6342 133 133 } 134 134 add_action( 'xprofile_avatar_uploaded', 'bp_xprofile_new_avatar_activity' ); 135 136 ?> -
trunk/bp-xprofile/bp-xprofile-admin.php
r6117 r6342 78 78 79 79 <?php 80 80 81 81 wp_nonce_field( 'bp_reorder_fields', '_wpnonce_reorder_fields' ); 82 82 wp_nonce_field( 'bp_reorder_groups', '_wpnonce_reorder_groups', false ); … … 267 267 268 268 unset( $_GET['mode'] ); 269 269 270 270 xprofile_admin( $message, $type ); 271 271 } else { … … 279 279 bp_xprofile_update_field_meta( $field_id, 'default_visibility', $_POST['default-visibility'] ); 280 280 } 281 281 282 282 if ( !empty( $_POST['allow-custom-visibility'] ) ) { 283 283 bp_xprofile_update_field_meta( $field_id, 'allow_custom_visibility', $_POST['allow-custom-visibility'] ); … … 467 467 <?php 468 468 } 469 470 ?> -
trunk/bp-xprofile/bp-xprofile-buddybar.php
r6093 r6342 3 3 // Exit if accessed directly 4 4 if ( !defined( 'ABSPATH' ) ) exit; 5 6 ?> -
trunk/bp-xprofile/bp-xprofile-cache.php
r6093 r6342 30 30 // List actions to clear super cached pages on, if super cache is installed 31 31 add_action( 'xprofile_updated_profile', 'bp_core_clear_cache' ); 32 33 ?> -
trunk/bp-xprofile/bp-xprofile-caps.php
r6259 r6342 49 49 // Friends don't let friends edit each other's visibility 50 50 if ( $profile_user_id != bp_displayed_user_id() && !bp_current_user_can( 'bp_moderate' ) ) { 51 $caps[] = 'do_not_allow'; 51 $caps[] = 'do_not_allow'; 52 52 break; 53 53 } … … 59 59 } 60 60 add_filter( 'bp_map_meta_caps', 'bp_xprofile_map_meta_caps', 10, 4 ); 61 ?> -
trunk/bp-xprofile/bp-xprofile-cssjs.php
r6264 r6342 43 43 } 44 44 add_action( 'admin_enqueue_scripts', 'xprofile_add_admin_js', 1 ); 45 46 ?> -
trunk/bp-xprofile/bp-xprofile-filters.php
r6314 r6342 246 246 } 247 247 add_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 743 743 return $field_ids; 744 744 } 745 746 747 ?> -
trunk/bp-xprofile/bp-xprofile-loader.php
r6259 r6342 99 99 'datebox' 100 100 ) ); 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 103 103 $this->visibility_levels = array( 104 104 'public' => array( … … 111 111 ) 112 112 ); 113 113 114 114 if ( bp_is_active( 'friends' ) ) { 115 115 $this->visibility_levels['friends'] = array( … … 277 277 } 278 278 add_action( 'bp_setup_components', 'bp_setup_xprofile', 6 ); 279 280 ?> -
trunk/bp-xprofile/bp-xprofile-template.php
r6259 r6342 924 924 return apply_filters( 'bp_profile_get_visibility_radio_buttons', $html ); 925 925 } 926 ?>
Note: See TracChangeset
for help on using the changeset viewer.