diff --git src/bp-activity/bp-activity-actions.php src/bp-activity/bp-activity-actions.php
index 4448088..7e57216 100644
|
|
|
function bp_activity_transition_post_type_comment_status( $new_status, $old_stat |
| 832 | 832 | |
| 833 | 833 | // Add "new_post_type_comment" to the whitelisted activity types, so that the activity's Akismet history is generated |
| 834 | 834 | $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 | }; |
| 836 | 840 | add_filter( 'bp_akismet_get_activity_types', $comment_akismet_history ); |
| 837 | 841 | |
| 838 | 842 | // Make sure the activity change won't edit the comment if sync is on |
diff --git src/bp-activity/bp-activity-functions.php src/bp-activity/bp-activity-functions.php
index b9b8a09..545c1db 100644
|
|
|
add_action( 'bp_before_activity_comment', 'bp_activity_comment_embed' ); |
| 3675 | 3675 | function bp_dtheme_embed_read_more( $activity ) { |
| 3676 | 3676 | buddypress()->activity->read_more_id = $activity->id; |
| 3677 | 3677 | |
| 3678 | | add_filter( 'embed_post_id', create_function( '', 'return buddypress()->activity->read_more_id;' ) ); |
| | 3678 | add_filter( 'embed_post_id', function() { return buddypress()->activity->read_more_id; } ); |
| 3679 | 3679 | add_filter( 'bp_embed_get_cache', 'bp_embed_activity_cache', 10, 3 ); |
| 3680 | 3680 | add_action( 'bp_embed_update_cache', 'bp_embed_activity_save_cache', 10, 3 ); |
| 3681 | 3681 | } |
diff --git src/bp-activity/classes/class-bp-activity-list-table.php src/bp-activity/classes/class-bp-activity-list-table.php
index 0e3a488..72c056a 100644
|
|
|
class BP_Activity_List_Table extends WP_List_Table { |
| 171 | 171 | $activities['total'] = count( $activities['activities'] ); |
| 172 | 172 | |
| 173 | 173 | // Sort the array by the activity object's date_recorded value. |
| 174 | | usort( $activities['activities'], create_function( '$a, $b', 'return $a->date_recorded > $b->date_recorded;' ) ); |
| | 174 | usort( $activities['activities'], function( $a, $b ) { return $a->date_recorded > $b->date_recorded; } ); |
| 175 | 175 | } |
| 176 | 176 | |
| 177 | 177 | // The bp_activity_get function returns an array of objects; cast these to arrays for WP_List_Table. |