Skip to:
Content

BuddyPress.org

Ticket #7318: 7318.patch

File 7318.patch, 10.0 KB (added by ketuchetan, 4 years ago)

Modified the patch.

  • src/bp-activity/bp-activity-admin.php

     
    393393                                         * Remove moderation and blacklist checks in case we want to ham an activity
    394394                                         * which contains one of these listed keys.
    395395                                         */
    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 );
    398398
    399399                                        bp_activity_mark_as_ham( $activity );
    400400                                        $result = $activity->save();
  • src/bp-activity/bp-activity-filters.php

     
    603603        ob_end_clean();
    604604
    605605        // 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 );
    607607
    608608        if ( ! empty( $newest_activities['last_recorded'] ) ) {
    609609                $response['bp_activity_newest_activities'] = $newest_activities;
  • src/bp-activity/bp-activity-functions.php

     
    14451445        $action = apply_filters( 'bp_activity_generate_action_string', $activity->action, $activity );
    14461446
    14471447        // 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 );
    14491449
    14501450        return $action;
    14511451}
     
    33213321
    33223322        // If Akismet is active, and this was a manual spam/ham request, stop Akismet checking the activity.
    33233323        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 );
    33253325
    33263326                // Build data package for Akismet.
    33273327                $activity_data = BP_Akismet::build_akismet_data_package( $activity );
     
    33683368
    33693369        // If Akismet is active, and this was a manual spam/ham request, stop Akismet checking the activity.
    33703370        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 );
    33723372
    33733373                // Build data package for Akismet.
    33743374                $activity_data = BP_Akismet::build_akismet_data_package( $activity );
  • src/bp-blogs/bp-blogs-activity.php

     
    547547                switch_to_blog( $blog_id );
    548548
    549549                // Use comments_open().
    550                 remove_filter( 'comments_open', 'bp_comments_open', 10, 2 );
     550                remove_filter( 'comments_open', 'bp_comments_open', 10 );
    551551                $open = comments_open( $activity->secondary_item_id );
    552552                add_filter( 'comments_open', 'bp_comments_open', 10, 2 );
    553553
     
    806806        );
    807807
    808808        // 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 );
    810810
    811811        // Handle multisite.
    812812        switch_to_blog( $parent_activity->item_id );
     
    970970        $old_comment_status  = $post_comment_status;
    971971
    972972        // 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 );
    975975
    976976        if ( 1 === $activity->is_spam && 'spam' !== $post_comment_status ) {
    977977                wp_spam_comment( $post_comment_id );
  • src/bp-core/admin/bp-core-admin-functions.php

     
    11411141
    11421142        $loader = basename( constant( 'BP_PLUGIN_DIR' ) ) . '/bp-loader.php';
    11431143
    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 );
    11451145        add_action( "after_plugin_row_{$loader}", 'bp_core_admin_php52_plugin_row', 10, 2 );
    11461146}
    11471147add_action( 'load-plugins.php', 'bp_core_admin_maybe_disable_update_row_for_php53_requirement', 100 );
  • src/bp-core/bp-core-functions.php

     
    23722372                return;
    23732373        }
    23742374
    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 );
    23762376}
    23772377add_action( 'bp_init', 'bp_remove_adjacent_posts_rel_link' );
    23782378
  • src/bp-core/classes/class-bp-attachment.php

     
    273273
    274274                // Restore WordPress Uploads data.
    275275                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 );
    277277                }
    278278
    279279                // 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 );
    281281
    282282                // Finally return the uploaded file or the error.
    283283                return $this->attachment;
  • src/bp-core/deprecated/2.5.php

     
    6262                'settings-verify-email-change',
    6363        );
    6464
    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 );
    6666        $email_type = $email->get( 'type' );
    6767        $tokens     = $email->get( 'tokens' );
    6868        add_filter( 'bp_email_get_property', 'bp_core_deprecated_email_filters', 20, 4 );
  • src/bp-members/bp-members-functions.php

     
    11621162        // As of BuddyPress 2.0, last_activity is no longer stored in usermeta.
    11631163        // However, we mirror it there for backward compatibility. Do not use!
    11641164        // 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 );
    11671167        bp_update_user_meta( $user_id, 'last_activity', $time );
    11681168        add_filter( 'update_user_metadata', '_bp_update_user_meta_last_activity_warning', 10, 4 );
    11691169        add_filter( 'get_user_metadata', '_bp_get_user_meta_last_activity_warning', 10, 3 );
  • src/bp-members/classes/class-bp-members-admin.php

     
    13061306         * @since 2.1.0
    13071307         */
    13081308        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 );
    13101310        }
    13111311
    13121312        /** Signups Management ****************************************************/
  • src/bp-templates/bp-legacy/buddypress-functions.php

     
    969969        }
    970970
    971971        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 );
    973973        }
    974974
    975975        exit;
  • src/bp-xprofile/bp-xprofile-filters.php

     
    328328 * - URL's are made clickable.
    329329 *
    330330 * 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 );
    332332 *
    333333 * To disable for a single field, use the 'Autolink' settings in Dashboard > Users > Profile Fields.
    334334 *