activity->image_base = BP_PLUGIN_URL . '/bp-activity/images'; } add_action( 'plugins_loaded', 'bp_activity_deprecated_globals', 5 ); add_action( 'admin_menu', 'bp_activity_deprecated_globals', 2 ); /* DEPRECATED - use bp_activity_add() */ function bp_activity_record( $item_id, $component_name, $component_action, $is_private, $secondary_item_id = false, $user_id = false, $secondary_user_id = false, $recorded_time = false ) { global $bp, $wpdb; if ( !$user_id ) $user_id = $bp->loggedin_user->id; if ( !$recorded_time ) $recorded_time = time(); $args = compact( 'user_id', 'content', 'component_name', 'component_action', 'item_id', 'secondary_item_id', 'recorded_time' ); bp_activity_add( $args ); if ( $secondary_user_id ) { $hide_sitewide = true; $args = compact( 'user_id', 'content', 'component_name', 'component_action', 'item_id', 'secondary_item_id', 'recorded_time', 'hide_sitewide' ); bp_activity_add( $args ); } do_action( 'bp_activity_record', $item_id, $component_name, $component_action, $is_private, $secondary_item_id, $user_id, $secondary_user_id ); return true; } /* DEPRECATED - use bp_activity_delete_by_item_id() */ function bp_activity_delete( $item_id, $component_name, $component_action, $user_id, $secondary_item_id ) { if ( !bp_activity_delete_by_item_id( array( 'item_id' => $item_id, 'component_name' => $component_name, 'component_action' => $component_action, 'user_id' => $user_id, 'secondary_item_id' => $secondary_item_id ) ) ) return false; do_action( 'bp_activity_delete', $item_id, $component_name, $component_action, $user_id, $secondary_item_id ); return true; } /* DEPRECATED - Structural CSS is now theme based. */ function bp_activity_add_structure_css() { /* If we are using a BuddyPress 1.1+ theme ignore this. */ if ( !file_exists( WP_CONTENT_DIR . '/bp-themes' ) ) return $template; /* Enqueue the structure CSS file to give basic positional formatting for components */ wp_enqueue_style( 'bp-activity-structure', BP_PLUGIN_URL . '/bp-activity/deprecated/css/structure.css' ); } add_action( 'bp_styles', 'bp_activity_add_structure_css' ); ?>