Commit 8eeb6fdf authored by lechuck's avatar lechuck Committed by lechuck
Browse files

Ugrade buddypress to 1.7.1

parent 3b0f5f95
.akismet-status{float:right}.akismet-status a{color:#AAA;font-style:italic}.akismet-history{margin:13px}.akismet-history div{margin-bottom:13px}.akismet-history span{color:#999}#wp-bp-activities-wrap{padding:5px 0}#bp-activities{height:120px}#bp-replyhead{font-size:1em;line-height:1.4em;margin:0}#bp-replysubmit{margin:0;padding:0 0 3px;text-align:center}#bp-replysubmit .error{color:red;line-height:21px;text-align:center;vertical-align:center}#bp-replysubmit img.waiting{float:right;padding:4px 10px 0;vertical-align:top}#bp-activities-form .column-response img{float:left;margin-right:10px;margin-top:1px}.activity-errors{list-style-type:disc;margin-left:2em}#bp_activity_action div.inside,#bp_activity_content div.inside{line-height:0}#bp_activity_action h3,#bp_activity_content h3{cursor:auto}#bp_activity_action td.mceIframeContainer,#bp_activity_content td.mceIframeContainer{background-color:white}#post-body #bp-activities-action_resize,#post-body #bp-activities-content_resize{position:inherit;margin-top:-2px}#bp_activity_link input{width:99%}#bp-activities-primaryid{margin-bottom:1em}
\ No newline at end of file
.akismet-status {
float: right;
}
.akismet-status a {
color: #AAA;
font-style: italic;
}
.akismet-history {
margin: 13px;
}
.akismet-history div {
margin-bottom: 13px;
}
.akismet-history span {
color: #999;
}
#wp-bp-activities-wrap {
padding: 5px 0;
}
#bp-activities {
height: 120px;
}
#bp-replyhead {
font-size: 1em;
line-height: 1.4em;
margin: 0;
}
#bp-replysubmit {
margin: 0;
padding: 0 0 3px;
text-align: center;
}
#bp-replysubmit .error {
color: red;
line-height: 21px;
text-align: center;
vertical-align: center;
}
#bp-replysubmit img.waiting {
float: right;
padding: 4px 10px 0;
vertical-align: top;
}
#bp-activities-form .column-response img {
float: left;
margin-right: 10px;
margin-top: 1px;
}
.activity-errors {
list-style-type: disc;
margin-left: 2em;
}
#bp_activity_action div.inside,
#bp_activity_content div.inside {
line-height: 0;
}
#bp_activity_action h3,
#bp_activity_content h3 {
cursor: auto;
}
#bp_activity_action td.mceIframeContainer,
#bp_activity_content td.mceIframeContainer {
background-color: white;
}
#post-body #bp-activities-action_resize,
#post-body #bp-activities-content_resize {
position: inherit;
margin-top: -2px;
}
#bp_activity_link input {
width: 99%;
}
#bp-activities-primaryid {
margin-bottom: 1em;
}
\ No newline at end of file
.akismet-status{float:right}.akismet-status a{color:#AAA;font-style:italic}.akismet-history{margin:13px}.akismet-history div{margin-bottom:13px}.akismet-history span{color:#999}#wp-bp-activities-wrap{padding:5px 0}#bp-activities{height:120px}#bp-replyhead{font-size:1em;line-height:1.4em;margin:0}#bp-replysubmit{margin:0;padding:0 0 3px;text-align:center}#bp-replysubmit .error{color:red;line-height:21px;text-align:center;vertical-align:center}#bp-replysubmit img.waiting{float:right;padding:4px 10px 0;vertical-align:top}#bp-activities-form .column-response img{float:left;margin-right:10px;margin-top:1px}.activity-errors{list-style-type:disc;margin-left:2em}#bp_activity_action div.inside,#bp_activity_content div.inside{line-height:0}#bp_activity_action h3,#bp_activity_content h3{cursor:auto}#bp_activity_action td.mceIframeContainer,#bp_activity_content td.mceIframeContainer{background-color:white}#post-body #bp-activities-action_resize,#post-body #bp-activities-content_resize{position:inherit;margin-top:-2px}#bp_activity_link input{width:99%}#bp-activities-primaryid{margin-bottom:1em}
\ No newline at end of file
(function(b){var a={init:function(){b(document).on("click",".row-actions a.reply",a.open);b(document).on("click","#bp-activities-container a.cancel",a.close);b(document).on("click","#bp-activities-container a.save",a.send);b(document).on("keyup","#bp-activities:visible",function(c){if(27==c.which){a.close()}})},open:function(d){var c=b("#bp-activities-container").hide();b(this).parents("tr").after(c);c.fadeIn("300");b("#bp-activities").focus();return false},close:function(c){b("#bp-activities-container").fadeOut("200",function(){b("#bp-activities").val("").blur();b("#bp-replysubmit .error").html("").hide();b("#bp-replysubmit .waiting").hide()});return false},send:function(d){b("#bp-replysubmit .error").hide();b("#bp-replysubmit .waiting").show();var c={};c["_ajax_nonce-bp-activity-admin-reply"]=b('#bp-activities-container input[name="_ajax_nonce-bp-activity-admin-reply"]').val();c.action="bp-activity-admin-reply";c.content=b("#bp-activities").val();c.parent_id=b("#bp-activities-container").prev().data("parent_id");c.root_id=b("#bp-activities-container").prev().data("root_id");b.ajax({data:c,type:"POST",url:ajaxurl,error:function(e){a.error(e)},success:function(e){a.show(e)}});return false},error:function(c){var d=c.statusText;b("#bp-replysubmit .waiting").hide();if(c.responseText){d=c.responseText.replace(/<.[^<>]*?>/g,"")}if(d){b("#bp-replysubmit .error").html(d).show()}},show:function(d){var e,f,c;if(typeof(d)=="string"){a.error({responseText:d});return false}c=wpAjax.parseAjaxResponse(d);if(c.errors){a.error({responseText:wpAjax.broken});return false}c=c.responses[0];b("#bp-activities-container").fadeOut("200",function(){b("#bp-activities").val("").blur();b("#bp-replysubmit .error").html("").hide();b("#bp-replysubmit .waiting").hide();b("#bp-activities-container").before(c.data);f=b("#activity-"+c.id);e=f.closest(".widefat").css("backgroundColor");f.animate({backgroundColor:"#CEB"},300).animate({backgroundColor:e},300)})}};b(document).ready(function(){a.init();b("#bp_activity_action h3, #bp_activity_content h3").unbind("click")})})(jQuery);
\ No newline at end of file
(function( $ ) {
/**
* Activity reply object for the activity index screen
*
* @since BuddyPress (1.6)
*/
var activityReply = {
/**
* Attach event handler functions to the relevant elements.
*
* @since BuddyPress (1.6)
*/
init : function() {
$(document).on( 'click', '.row-actions a.reply', activityReply.open );
$(document).on( 'click', '#bp-activities-container a.cancel', activityReply.close );
$(document).on( 'click', '#bp-activities-container a.save', activityReply.send );
// Close textarea on escape
$(document).on( 'keyup', '#bp-activities:visible', function( e ) {
if ( 27 == e.which ) {
activityReply.close();
}
});
},
/**
* Reveals the entire row when "reply" is pressed.
*
* @since BuddyPress (1.6)
*/
open : function( e ) {
// Hide the container row, and move it to the new location
var box = $( '#bp-activities-container' ).hide();
$( this ).parents( 'tr' ).after( box );
// Fade the whole row in, and set focus on the text area.
box.fadeIn( '300' );
$( '#bp-activities' ).focus();
return false;
},
/**
* Hide and reset the entire row when "cancel", or escape, are pressed.
*
* @since BuddyPress (1.6)
*/
close : function( e ) {
// Hide the container row
$('#bp-activities-container').fadeOut( '200', function () {
// Empty and unfocus the text area
$( '#bp-activities' ).val( '' ).blur();
// Remove any error message and disable the spinner
$( '#bp-replysubmit .error' ).html( '' ).hide();
$( '#bp-replysubmit .waiting' ).hide();
});
return false;
},
/**
* Submits "form" via AJAX back to WordPress.
*
* @since BuddyPress (1.6)
*/
send : function( e ) {
// Hide any existing error message, and show the loading spinner
$( '#bp-replysubmit .error' ).hide();
$( '#bp-replysubmit .waiting' ).show();
// Grab the nonce
var reply = {};
reply['_ajax_nonce-bp-activity-admin-reply'] = $( '#bp-activities-container input[name="_ajax_nonce-bp-activity-admin-reply"]' ).val();
// Get the rest of the data
reply.action = 'bp-activity-admin-reply';
reply.content = $( '#bp-activities' ).val();
reply.parent_id = $( '#bp-activities-container' ).prev().data( 'parent_id' );
reply.root_id = $( '#bp-activities-container' ).prev().data( 'root_id' );
// Make the AJAX call
$.ajax({
data : reply,
type : 'POST',
url : ajaxurl,
// Callbacks
error : function( r ) { activityReply.error( r ); },
success : function( r ) { activityReply.show( r ); }
});
return false;
},
/**
* send() error message handler
*
* @since BuddyPress (1.6)
*/
error : function( r ) {
var er = r.statusText;
$('#bp-replysubmit .waiting').hide();
if ( r.responseText ) {
er = r.responseText.replace( /<.[^<>]*?>/g, '' );
}
if ( er ) {
$('#bp-replysubmit .error').html( er ).show();
}
},
/**
* send() success handler
*
* @since BuddyPress (1.6)
*/
show : function ( xml ) {
var bg, id, response;
// Handle any errors in the response
if ( typeof( xml ) == 'string' ) {
activityReply.error( { 'responseText': xml } );
return false;
}
response = wpAjax.parseAjaxResponse( xml );
if ( response.errors ) {
activityReply.error( { 'responseText': wpAjax.broken } );
return false;
}
response = response.responses[0];
// Close and reset the reply row, and add the new Activity item into the list.
$('#bp-activities-container').fadeOut( '200', function () {
// Empty and unfocus the text area
$( '#bp-activities' ).val( '' ).blur();
// Remove any error message and disable the spinner
$( '#bp-replysubmit .error' ).html( '' ).hide();
$( '#bp-replysubmit .waiting' ).hide();
// Insert new activity item
$( '#bp-activities-container' ).before( response.data );
// Get background colour and animate the flash
id = $( '#activity-' + response.id );
bg = id.closest( '.widefat' ).css( 'backgroundColor' );
id.animate( { 'backgroundColor': '#CEB' }, 300 ).animate( { 'backgroundColor': bg }, 300 );
});
}
};
$(document).ready( function () {
// Create the Activity reply object after domready event
activityReply.init();
// On the edit screen, unload the close/open toggle js for the action & content metaboxes
$( '#bp_activity_action h3, #bp_activity_content h3' ).unbind( 'click' );
});
})(jQuery);
\ No newline at end of file
(function(b){var a={init:function(){b(document).on("click",".row-actions a.reply",a.open);b(document).on("click","#bp-activities-container a.cancel",a.close);b(document).on("click","#bp-activities-container a.save",a.send);b(document).on("keyup","#bp-activities:visible",function(c){if(27==c.which){a.close()}})},open:function(d){var c=b("#bp-activities-container").hide();b(this).parents("tr").after(c);c.fadeIn("300");b("#bp-activities").focus();return false},close:function(c){b("#bp-activities-container").fadeOut("200",function(){b("#bp-activities").val("").blur();b("#bp-replysubmit .error").html("").hide();b("#bp-replysubmit .waiting").hide()});return false},send:function(d){b("#bp-replysubmit .error").hide();b("#bp-replysubmit .waiting").show();var c={};c["_ajax_nonce-bp-activity-admin-reply"]=b('#bp-activities-container input[name="_ajax_nonce-bp-activity-admin-reply"]').val();c.action="bp-activity-admin-reply";c.content=b("#bp-activities").val();c.parent_id=b("#bp-activities-container").prev().data("parent_id");c.root_id=b("#bp-activities-container").prev().data("root_id");b.ajax({data:c,type:"POST",url:ajaxurl,error:function(e){a.error(e)},success:function(e){a.show(e)}});return false},error:function(c){var d=c.statusText;b("#bp-replysubmit .waiting").hide();if(c.responseText){d=c.responseText.replace(/<.[^<>]*?>/g,"")}if(d){b("#bp-replysubmit .error").html(d).show()}},show:function(d){var e,f,c;if(typeof(d)=="string"){a.error({responseText:d});return false}c=wpAjax.parseAjaxResponse(d);if(c.errors){a.error({responseText:wpAjax.broken});return false}c=c.responses[0];b("#bp-activities-container").fadeOut("200",function(){b("#bp-activities").val("").blur();b("#bp-replysubmit .error").html("").hide();b("#bp-replysubmit .waiting").hide();b("#bp-activities-container").before(c.data);f=b("#activity-"+c.id);e=f.closest(".widefat").css("backgroundColor");f.animate({backgroundColor:"#CEB"},300).animate({backgroundColor:e},300)})}};b(document).ready(function(){a.init();b("#bp_activity_action h3, #bp_activity_content h3").unbind("click")})})(jQuery);
\ No newline at end of file
......@@ -147,7 +147,7 @@ function bp_activity_action_delete_activity( $activity_id = 0 ) {
$activity = new BP_Activity_Activity( $activity_id );
// Check access
if ( empty( $activity->user_id ) || !bp_activity_user_can_delete( $activity ) )
if ( ! bp_activity_user_can_delete( $activity ) )
return false;
// Call the action before the delete so plugins can still fetch information about it
......@@ -175,7 +175,7 @@ add_action( 'bp_actions', 'bp_activity_action_delete_activity' );
* @global object $bp BuddyPress global settings
* @param int $activity_id Activity id to be deleted. Defaults to 0.
* @return bool False on failure
* @since 1.6
* @since BuddyPress (1.6)
*/
function bp_activity_action_spam_activity( $activity_id = 0 ) {
global $bp;
......@@ -325,9 +325,9 @@ function bp_activity_action_post_comment() {
}
$comment_id = bp_activity_new_comment( array(
'content' => $content,
'content' => $content,
'activity_id' => $activity_id,
'parent_id' => $parent_id
'parent_id' => false
));
if ( !empty( $comment_id ) )
......@@ -577,7 +577,7 @@ add_action( 'bp_actions', 'bp_activity_action_favorites_feed' );
* Loads Akismet
*
* @global object $bp BuddyPress global settings
* @since 1.6
* @since BuddyPress (1.6)
*/
function bp_activity_setup_akismet() {
global $bp;
......@@ -591,11 +591,9 @@ function bp_activity_setup_akismet() {
return;
// Bail if BuddyPress Activity Akismet support has been disabled by another plugin
if ( ! apply_filters( 'bp_activity_use_akismet', true ) )
if ( ! apply_filters( 'bp_activity_use_akismet', bp_is_akismet_active() ) )
return;
// Instantiate Akismet for BuddyPress
$bp->activity->akismet = new BP_Akismet();
}
?>
......@@ -3,7 +3,7 @@
* Akismet support for BuddyPress' Activity Stream
*
* @package BuddyPress
* @since 1.6
* @since BuddyPress (1.6)
* @subpackage Activity
*/
......@@ -16,14 +16,14 @@ class BP_Akismet {
*
* @access protected
* @var BP_Activity_Activity
* @since 1.6
* @since BuddyPress (1.6)
*/
protected $last_activity = null;
/**
* Constructor
*
* @since 1.6
* @since BuddyPress (1.6)
*/
public function __construct() {
$this->setup_actions();
......@@ -32,7 +32,7 @@ class BP_Akismet {
/**
* Hook Akismet into the activity stream
*
* @since 1.6
* @since BuddyPress (1.6)
*/
protected function setup_actions() {
// Add nonces to activity stream lists
......@@ -67,7 +67,7 @@ class BP_Akismet {
* @param array $actions The hover links
* @param array $activity The activity for the current row being processed
* @return array The hover links
* @since 1.6
* @since BuddyPress (1.6)
*/
function comment_row_action( $actions, $activity ) {
$akismet_result = bp_activity_get_meta( $activity['id'], '_bp_akismet_result' );
......@@ -97,14 +97,14 @@ class BP_Akismet {
foreach ( $actions as $k => $item ) {
$b[ $k ] = $item;
if ( $k == 'edit' )
$b['history'] = '<a href="' . network_admin_url( 'admin.php?page=bp-activity&amp;action=edit&aid=' . $activity['id'] ) . '#bp_activity_history"> '. __( 'History', 'buddypress' ) . '</a>';
$b['history'] = '<a href="' . esc_url( bp_get_admin_url( 'admin.php?page=bp-activity&amp;action=edit&aid=' . $activity['id'] ) ) . '#bp_activity_history"> '. __( 'History', 'buddypress' ) . '</a>';
}
$actions = $b;
}
if ( $desc )
echo '<span class="akismet-status"><a href="' . network_admin_url( 'admin.php?page=bp-activity&amp;action=edit&aid=' . $activity['id'] ) . '#bp_activity_history">' . htmlspecialchars( $desc ) . '</a></span>';
echo '<span class="akismet-status"><a href="' . esc_url( bp_get_admin_url( 'admin.php?page=bp-activity&amp;action=edit&aid=' . $activity['id'] ) ) . '#bp_activity_history">' . htmlspecialchars( $desc ) . '</a></span>';
return apply_filters( 'bp_akismet_comment_row_action', $actions );
}
......@@ -114,10 +114,10 @@ class BP_Akismet {
* This is used by Akismet to help detect spam activity.
*
* @see http://plugins.trac.wordpress.org/ticket/1232
* @since 1.6
* @since BuddyPress (1.6)
*/
public function add_activity_stream_nonce() {
$form_id = '_bp_as_nonce';
$form_id = '_bp_as_nonce';
$value = '_bp_as_nonce_' . bp_loggedin_user_id();
// If we're in the activity stream loop, we can use the current item's ID to make the nonce unique
......@@ -138,7 +138,7 @@ class BP_Akismet {
* @param int $user_id User ID
* @param int $activity_id Activity ID
* @see bp_dtheme_post_update()
* @since 1.6
* @since BuddyPress (1.6)
*/
public function check_member_activity_update( $content, $user_id, $activity_id ) {
// By default, only handle activity updates and activity comments.
......@@ -158,7 +158,7 @@ class BP_Akismet {
*
* This function is intended to be used inside the activity stream loop.
*
* @since 1.6
* @since BuddyPress (1.6)
*/
public function add_activity_spam_button() {
if ( !bp_activity_user_can_mark_spam() )
......@@ -186,7 +186,7 @@ class BP_Akismet {
*
* This function is intended to be used inside the activity stream loop.
*
* @since 1.6
* @since BuddyPress (1.6)
*/
public function add_activity_comment_spam_button() {
if ( !bp_activity_user_can_mark_spam() )
......@@ -214,7 +214,7 @@ class BP_Akismet {
* Get a list of filterable types of activity item that we want Akismet to automatically check for spam.
*
* @return array List of activity types
* @since 1.6
* @since BuddyPress (1.6)
* @static
*/
public static function get_activity_types() {
......@@ -226,7 +226,7 @@ class BP_Akismet {
*
* @param BP_Activity_Activity $activity
* @param string $source Either "by_a_person" (e.g. a person has manually marked the activity as spam) or "by_akismet" (automatically spammed).
* @since 1.6
* @since BuddyPress (1.6)
*/
public function mark_as_spam( $activity, $source ) {
// Record this item so we can do some tidyup in BP_Akismet::check_member_activity_update()
......@@ -240,7 +240,7 @@ class BP_Akismet {
*
* @param BP_Activity_Activity $activity
* @param string $source Either "by_a_person" (e.g. a person has manually marked the activity as ham) or "by_akismet" (automatically hammed).
* @since 1.6
* @since BuddyPress (1.6)
*/
public function mark_as_ham( $activity, $source ) {
// If the activity was, originally, automatically marked as spam by Akismet, run the @mentions filter as it would have been skipped.
......@@ -248,14 +248,14 @@ class BP_Akismet {
$activity->content = bp_activity_at_name_filter( $activity->content, $activity->id );
do_action( 'bp_activity_akismet_mark_as_ham', $activity, $source );
}
}
/**
* Build a data package for the Akismet service to inspect
*
* @param BP_Activity_Activity $activity
* @see http://akismet.com/development/api/#comment-check
* @since 1.6
* @since BuddyPress (1.6)
* @static
*/
public static function build_akismet_data_package( $activity ) {
......@@ -294,7 +294,7 @@ class BP_Akismet {
*
* @param BP_Activity_Activity $activity The activity item to check
* @see http://akismet.com/development/api/
* @since 1.6
* @since BuddyPress (1.6)
* @todo Spam counter?
* @todo Auto-delete old spam?
*/
......@@ -335,7 +335,7 @@ class BP_Akismet {
* Update activity meta after a manual spam change (user initiated)
*
* @param BP_Activity_Activity $activity The activity to check
* @since 1.6
* @since BuddyPress (1.6)
*/
public function update_activity_spam_meta( $activity ) {
// By default, only handle activity updates and activity comments.
......@@ -351,7 +351,7 @@ class BP_Akismet {
* Update activity meta after a manual ham change (user initiated)
*
* @param BP_Activity_Activity $activity The activity to check
* @since 1.6
* @since BuddyPress (1.6)
*/
public function update_activity_ham_meta( $activity ) {
// By default, only handle activity updates and activity comments.
......@@ -367,7 +367,7 @@ class BP_Akismet {
* Update activity meta after an automatic spam check (not user initiated)
*
* @param BP_Activity_Activity $activity The activity to check
* @since 1.6
* @since BuddyPress (1.6)
*/
public function update_activity_akismet_meta( $activity ) {
// Check we're dealing with what was last updated by Akismet
......@@ -408,7 +408,7 @@ class BP_Akismet {
* @param array $activity_data Packet of information to submit to Akismet
* @param string $check "check" or "submit"
* @param string $spam "spam" or "ham"
* @since 1.6
* @since BuddyPress (1.6)
*/
public function send_akismet_request( $activity_data, $check = 'check', $spam = 'spam' ) {
global $akismet_api_host, $akismet_api_port;
......@@ -480,7 +480,7 @@ class BP_Akismet {
* Filters user agent when sending to Akismet.
*
* @param string $user_agent
* @since 1.6
* @since BuddyPress (1.6)
*/
public function buddypress_ua( $user_agent ) {
$user_agent = 'BuddyPress/' . bp_get_version() . ' | Akismet/'. constant( 'AKISMET_VERSION' );
......@@ -491,7 +491,7 @@ class BP_Akismet {
* Adds a "History" meta box to the activity edit screen.
*
* @param string $screen_action The type of screen that has been requested
* @since 1.6
* @since BuddyPress (1.6)
*/
function add_history_metabox( $screen_action ) {
// Only proceed if we're on the edit screen
......@@ -506,7 +506,7 @@ class BP_Akismet {
* History meta box for the Activity admin edit screen
*
* @param object $item Activity item
* @since 1.6
* @since BuddyPress (1.6)
* @todo Update activity meta to allow >1 record with the same key (iterate through $history).
* @see http://buddypress.trac.wordpress.org/ticket/3907
*/
......@@ -527,7 +527,7 @@ class BP_Akismet {
* @param int $activity_id Activity item ID
* @param string $message Human-readable description of what's changed
* @param string $event The type of check we were carrying out
* @since 1.6
* @since BuddyPress (1.6)
*/
public function update_activity_history( $activity_id = 0, $message = '', $event = '' ) {
$event = array(
......@@ -546,7 +546,7 @@ class BP_Akismet {
*
* @param int $activity_id Activity item ID
* @return array The activity item's Akismet history
* @since 1.6
* @since BuddyPress (1.6)
*/
public function get_activity_history( $activity_id = 0 ) {
$history = bp_activity_get_meta( $activity_id, '_bp_akismet_history' );
......@@ -565,7 +565,7 @@ class BP_Akismet {
*
* @global object $bp BuddyPress global settings
* @global wpdb $wpdb WordPress database object
* @since 1.6
* @since BuddyPress (1.6)
*/
function bp_activity_akismet_delete_old_metadata() {
global $bp, $wpdb;
......@@ -575,7 +575,7 @@ function bp_activity_akismet_delete_old_metadata() {
// Enforce a minimum of 1 day
$interval = max( 1, absint( $interval ) );
// _bp_akismet_submission meta values are large, so expire them after $interval days regardless of the activity status
// _bp_akismet_submission meta values are large, so expire them after $interval days regardless of the activity status
$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 ) );
$activity_ids = $wpdb->get_col( $sql );
......@@ -584,4 +584,4 @@ function bp_activity_akismet_delete_old_metadata() {
bp_activity_delete_meta( $activity_id, '_bp_akismet_submission' );<