Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/02/2017 08:13:14 PM (7 years ago)
Author:
tw2113
Message:

Removes usage of create_function across various BuddyPress components.

See #7325.

File:
1 edited

Legend:

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

    r11102 r11366  
    833833    // Add "new_post_type_comment" to the whitelisted activity types, so that the activity's Akismet history is generated
    834834    $post_type_comment_action = $activity_comment_object->action_id;
    835     $comment_akismet_history = create_function( '$t', '$t[] = $post_type_comment_action; return $t;' );
     835    $comment_akismet_history = function ( $activity_types ) use ( $post_type_comment_action ) {
     836        $activity_types[] = $post_type_comment_action;
     837
     838        return $activity_types;
     839    };
    836840    add_filter( 'bp_akismet_get_activity_types', $comment_akismet_history );
    837841
Note: See TracChangeset for help on using the changeset viewer.