Reply To: Inserting activity content via plugin
as per http://pastebin.com/Y0AE9KuS
I’m in a (huge) way over my head here.
i just changed the plugin as per your code and tried variations.
All variations, so far, disabled the site.
Can take instructions, copy and paste, research, etc and do some simple stuff.
Also Tried this variation
$inputs = array(
'id' => false,
'action' => 'Jon Doe posted an update',
'content' => $apost_content,
'component' => false,
'type' => 'activity_update',
'primary_link' => false,
'user_id' => $user_id,
'item_id' => false,
'secondary_item_id' => false,
'recorded_time' => gmdate( "Y-m-d H:i:s" ),
'hide_sitewide' => false,
'is_spam' => false
);
$r = wp_parse_args( $args, $inputs );
extract( $r );
return bp_activity_add( array( 'id' => $id, 'user_id' => $user_id, 'action' => $action, 'content' => $content, 'component' => $component, 'type' => $type,'primary_link' => $primary_link, 'item_id' => $item_id, 'secondary_item_id' => $secondary_item_id, 'recorded_time' => $recorded_time, 'hide_sitewide' => $hide_sitewide, is_spam' => $is_spam) );
Same result.
But I imagine there just must be a “proper” way to programatically insert an activity item.