Ticket #7318: 7318.patch
| File 7318.patch, 10.0 KB (added by , 9 years ago) |
|---|
-
src/bp-activity/bp-activity-admin.php
393 393 * Remove moderation and blacklist checks in case we want to ham an activity 394 394 * which contains one of these listed keys. 395 395 */ 396 remove_action( 'bp_activity_before_save', 'bp_activity_check_moderation_keys', 2 , 1);397 remove_action( 'bp_activity_before_save', 'bp_activity_check_blacklist_keys', 2 , 1);396 remove_action( 'bp_activity_before_save', 'bp_activity_check_moderation_keys', 2 ); 397 remove_action( 'bp_activity_before_save', 'bp_activity_check_blacklist_keys', 2 ); 398 398 399 399 bp_activity_mark_as_ham( $activity ); 400 400 $result = $activity->save(); -
src/bp-activity/bp-activity-filters.php
603 603 ob_end_clean(); 604 604 605 605 // Remove the temporary filter. 606 remove_filter( 'bp_get_activity_css_class', 'bp_activity_newest_class', 10 , 1);606 remove_filter( 'bp_get_activity_css_class', 'bp_activity_newest_class', 10 ); 607 607 608 608 if ( ! empty( $newest_activities['last_recorded'] ) ) { 609 609 $response['bp_activity_newest_activities'] = $newest_activities; -
src/bp-activity/bp-activity-functions.php
1445 1445 $action = apply_filters( 'bp_activity_generate_action_string', $activity->action, $activity ); 1446 1446 1447 1447 // Remove the filter for future activity items. 1448 remove_filter( 'bp_activity_generate_action_string', $actions->{$activity->component}->{$activity->type}['format_callback'], 10 , 2);1448 remove_filter( 'bp_activity_generate_action_string', $actions->{$activity->component}->{$activity->type}['format_callback'], 10 ); 1449 1449 1450 1450 return $action; 1451 1451 } … … 3321 3321 3322 3322 // If Akismet is active, and this was a manual spam/ham request, stop Akismet checking the activity. 3323 3323 if ( 'by_a_person' == $source && !empty( $bp->activity->akismet ) ) { 3324 remove_action( 'bp_activity_before_save', array( $bp->activity->akismet, 'check_activity' ), 4 , 1);3324 remove_action( 'bp_activity_before_save', array( $bp->activity->akismet, 'check_activity' ), 4 ); 3325 3325 3326 3326 // Build data package for Akismet. 3327 3327 $activity_data = BP_Akismet::build_akismet_data_package( $activity ); … … 3368 3368 3369 3369 // If Akismet is active, and this was a manual spam/ham request, stop Akismet checking the activity. 3370 3370 if ( 'by_a_person' == $source && !empty( $bp->activity->akismet ) ) { 3371 remove_action( 'bp_activity_before_save', array( $bp->activity->akismet, 'check_activity' ), 4 , 1);3371 remove_action( 'bp_activity_before_save', array( $bp->activity->akismet, 'check_activity' ), 4 ); 3372 3372 3373 3373 // Build data package for Akismet. 3374 3374 $activity_data = BP_Akismet::build_akismet_data_package( $activity ); -
src/bp-blogs/bp-blogs-activity.php
547 547 switch_to_blog( $blog_id ); 548 548 549 549 // Use comments_open(). 550 remove_filter( 'comments_open', 'bp_comments_open', 10 , 2);550 remove_filter( 'comments_open', 'bp_comments_open', 10 ); 551 551 $open = comments_open( $activity->secondary_item_id ); 552 552 add_filter( 'comments_open', 'bp_comments_open', 10, 2 ); 553 553 … … 806 806 ); 807 807 808 808 // Prevent separate activity entry being made. 809 remove_action( 'comment_post', 'bp_activity_post_type_comment', 10 , 2);809 remove_action( 'comment_post', 'bp_activity_post_type_comment', 10 ); 810 810 811 811 // Handle multisite. 812 812 switch_to_blog( $parent_activity->item_id ); … … 970 970 $old_comment_status = $post_comment_status; 971 971 972 972 // No need to edit the activity, as it's the activity who's updating the comment 973 remove_action( 'transition_comment_status', 'bp_activity_transition_post_type_comment_status', 10 , 3);974 remove_action( 'bp_activity_post_type_comment', 'bp_blogs_comment_sync_activity_comment', 10 , 4);973 remove_action( 'transition_comment_status', 'bp_activity_transition_post_type_comment_status', 10 ); 974 remove_action( 'bp_activity_post_type_comment', 'bp_blogs_comment_sync_activity_comment', 10 ); 975 975 976 976 if ( 1 === $activity->is_spam && 'spam' !== $post_comment_status ) { 977 977 wp_spam_comment( $post_comment_id ); -
src/bp-core/admin/bp-core-admin-functions.php
1141 1141 1142 1142 $loader = basename( constant( 'BP_PLUGIN_DIR' ) ) . '/bp-loader.php'; 1143 1143 1144 remove_action( "after_plugin_row_{$loader}", 'wp_plugin_update_row', 10 , 2);1144 remove_action( "after_plugin_row_{$loader}", 'wp_plugin_update_row', 10 ); 1145 1145 add_action( "after_plugin_row_{$loader}", 'bp_core_admin_php52_plugin_row', 10, 2 ); 1146 1146 } 1147 1147 add_action( 'load-plugins.php', 'bp_core_admin_maybe_disable_update_row_for_php53_requirement', 100 ); -
src/bp-core/bp-core-functions.php
2372 2372 return; 2373 2373 } 2374 2374 2375 remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10 , 0);2375 remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10 ); 2376 2376 } 2377 2377 add_action( 'bp_init', 'bp_remove_adjacent_posts_rel_link' ); 2378 2378 -
src/bp-core/classes/class-bp-attachment.php
273 273 274 274 // Restore WordPress Uploads data. 275 275 if ( ! empty( $upload_dir_filter ) ) { 276 remove_filter( 'upload_dir', $upload_dir_filter, 10 , $this->upload_dir_filter_args);276 remove_filter( 'upload_dir', $upload_dir_filter, 10 ); 277 277 } 278 278 279 279 // Remove the pre WordPress 4.0 static filter. 280 remove_filter( 'wp_handle_upload_prefilter', array( $this, 'validate_upload' ), 10 , 1);280 remove_filter( 'wp_handle_upload_prefilter', array( $this, 'validate_upload' ), 10 ); 281 281 282 282 // Finally return the uploaded file or the error. 283 283 return $this->attachment; -
src/bp-core/deprecated/2.5.php
62 62 'settings-verify-email-change', 63 63 ); 64 64 65 remove_filter( 'bp_email_get_property', 'bp_core_deprecated_email_filters', 20 , 4);65 remove_filter( 'bp_email_get_property', 'bp_core_deprecated_email_filters', 20 ); 66 66 $email_type = $email->get( 'type' ); 67 67 $tokens = $email->get( 'tokens' ); 68 68 add_filter( 'bp_email_get_property', 'bp_core_deprecated_email_filters', 20, 4 ); -
src/bp-members/bp-members-functions.php
1162 1162 // As of BuddyPress 2.0, last_activity is no longer stored in usermeta. 1163 1163 // However, we mirror it there for backward compatibility. Do not use! 1164 1164 // Remove our warning and re-add. 1165 remove_filter( 'update_user_metadata', '_bp_update_user_meta_last_activity_warning', 10 , 4);1166 remove_filter( 'get_user_metadata', '_bp_get_user_meta_last_activity_warning', 10 , 3);1165 remove_filter( 'update_user_metadata', '_bp_update_user_meta_last_activity_warning', 10 ); 1166 remove_filter( 'get_user_metadata', '_bp_get_user_meta_last_activity_warning', 10 ); 1167 1167 bp_update_user_meta( $user_id, 'last_activity', $time ); 1168 1168 add_filter( 'update_user_metadata', '_bp_update_user_meta_last_activity_warning', 10, 4 ); 1169 1169 add_filter( 'get_user_metadata', '_bp_get_user_meta_last_activity_warning', 10, 3 ); -
src/bp-members/classes/class-bp-members-admin.php
1306 1306 * @since 2.1.0 1307 1307 */ 1308 1308 public function remove_edit_profile_url_filter() { 1309 remove_filter( 'bp_members_edit_profile_url', array( $this, 'filter_adminbar_profile_link' ), 10 , 3);1309 remove_filter( 'bp_members_edit_profile_url', array( $this, 'filter_adminbar_profile_link' ), 10 ); 1310 1310 } 1311 1311 1312 1312 /** Signups Management ****************************************************/ -
src/bp-templates/bp-legacy/buddypress-functions.php
969 969 } 970 970 971 971 if ( ! empty( $last_recorded ) ) { 972 remove_filter( 'bp_get_activity_css_class', 'bp_activity_newest_class', 10 , 1);972 remove_filter( 'bp_get_activity_css_class', 'bp_activity_newest_class', 10 ); 973 973 } 974 974 975 975 exit; -
src/bp-xprofile/bp-xprofile-filters.php
328 328 * - URL's are made clickable. 329 329 * 330 330 * To disable globally: 331 * remove_filter( 'bp_get_the_profile_field_value', 'xprofile_filter_link_profile_data', 9 , 3);331 * remove_filter( 'bp_get_the_profile_field_value', 'xprofile_filter_link_profile_data', 9 ); 332 332 * 333 333 * To disable for a single field, use the 'Autolink' settings in Dashboard > Users > Profile Fields. 334 334 *