Index: bp-activity/bp-activity-classes.php
===================================================================
--- bp-activity/bp-activity-classes.php	(revision 7125)
+++ bp-activity/bp-activity-classes.php	(working copy)
@@ -9,22 +9,95 @@
 // Exit if accessed directly
 if ( !defined( 'ABSPATH' ) ) exit;
 
+/**
+ * Database interaction class for the BuddyPress activity component.
+ *
+ * Instance methods are available for creating/editing an activity,
+ * static methods for querying activities.
+ *
+ * @since BuddyPress (1.0)
+ */
 class BP_Activity_Activity {
+
+	/** Properties ************************************************************/
+
+	/**
+	 * @var int Activity ID
+	 */
 	var $id;
+
+	/**
+	 * @var int The primary item ID
+	 */
 	var $item_id;
+
+	/**
+	 * @var int The secondary item ID
+	 */
 	var $secondary_item_id;
+
+	/**
+	 * @var int The user ID
+	 */
 	var $user_id;
+
+	/**
+	 * @var string The primary URL for the activity in RSS feeds
+	 */
 	var $primary_link;
+
+	/**
+	 * @var string The BuddyPress component activity relates to
+	 */
 	var $component;
+
+	/**
+	 * @var string Activity type (e.g. activity_update)
+	 */
 	var $type;
+
+	/**
+	 * @var string Description of the activity, (e.g. Alex posted an update)
+	 */
 	var $action;
+
+	/**
+	 * @var string Activity content
+	 */
 	var $content;
+
+	/**
+	 * @var string ISO timestamp of the activity's date/time
+	 */
 	var $date_recorded;
+
+	/**
+	 * @var int Hide activity from sitewide feeds
+	 */
 	var $hide_sitewide = false;
+
+	/**
+	 * @var int node boundary start for activity or activity comment
+	 */
 	var $mptt_left;
+
+	/**
+	 * @var int node boundary end for activity or activity comment
+	 */
 	var $mptt_right;
+
+	/**
+	 * @var int Activity spam/ham status
+	 */
 	var $is_spam;
 
+	/** Instance Methods ******************************************************/
+
+	/**
+	 * Constructor
+	 *
+	 * @param int $id optional Activity ID
+	 */
 	function __construct( $id = false ) {
 		if ( !empty( $id ) ) {
 			$this->id = $id;
@@ -104,7 +177,7 @@
 		return true;
 	}
 
-	// Static Functions
+	/** Static Methods ********************************************************/
 
 	/**
 	 * Get activity items, as specified by parameters
@@ -256,7 +329,7 @@
 			$activity_user_ids = wp_list_pluck( $activities, 'user_id' );
 			$activity_user_ids = implode( ',', wp_parse_id_list( $activity_user_ids ) );
 
-			if ( !empty( $activity_user_ids ) ) {				
+			if ( !empty( $activity_user_ids ) ) {
 				if ( $names = $wpdb->get_results( "SELECT user_id, value AS user_fullname FROM {$bp->profile->table_name_data} WHERE field_id = 1 AND user_id IN ({$activity_user_ids})" ) ) {
 					foreach ( (array) $names as $name )
 						$tmp_names[$name->user_id] = $name->user_fullname;
@@ -584,6 +657,16 @@
 		return $comments;
 	}
 
+	/**
+	 * Rebuild nested comment tree under an activity or activity comment.
+	 *
+	 * @global BuddyPress $bp The one true BuddyPress instance
+	 * @global wpdb $wpdb WordPress database object
+	 * @param int $parent_id ID of an activty or activity comment
+	 * @param int $left node boundary start for activity or activity comment
+	 * @return int Right node boundary of activity or activity comment
+	 * @since BuddyPress (1.2)
+	 */
 	function rebuild_activity_comment_tree( $parent_id, $left = 1 ) {
 		global $wpdb, $bp;
 
@@ -608,12 +691,29 @@
 		return $right + 1;
 	}
 
+	/**
+	 * Get child comments of an activity or activity comment
+	 *
+	 * @global BuddyPress $bp The one true BuddyPress instance
+	 * @global wpdb $wpdb WordPress database object
+	 * @param int $parent_id ID of an activty or activity comment
+	 * @return object Numerically indexed array of child comments
+	 * @since BuddyPress (1.2)
+	 */
 	function get_child_comments( $parent_id ) {
 		global $bp, $wpdb;
 
 		return $wpdb->get_results( $wpdb->prepare( "SELECT id FROM {$bp->activity->table_name} WHERE type = 'activity_comment' AND secondary_item_id = %d", $parent_id ) );
 	}
 
+	/**
+	 * Get a unique list of components that have related activity recorded to them
+	 *
+	 * @global BuddyPress $bp The one true BuddyPress instance
+	 * @global wpdb $wpdb WordPress database object
+	 * @return array The components
+	 * @since BuddyPress (1.2)
+	 */
 	function get_recorded_components() {
 		global $wpdb, $bp;
 
@@ -637,6 +737,13 @@
 		return $activity_feed;
 	}
 
+	/**
+	 * Create SQL IN clause
+	 *
+	 * @param string $field The database field
+	 * @param array $items The values for the IN clause
+	 * @since BuddyPress (1.3)
+	 */
 	function get_in_operator_sql( $field, $items ) {
 		global $wpdb;
 
@@ -661,6 +768,12 @@
 			return false;
 	}
 
+	/**
+	 * Create filter SQL clauses
+	 *
+	 * @param array $filter_array Multidimensional array of fields to filter and values
+	 * @since BuddyPress (1.3)
+	 */
 	function get_filter_sql( $filter_array ) {
 
 		$filter_sql = array();
@@ -701,6 +814,13 @@
 		return join( ' AND ', $filter_sql );
 	}
 
+
+	/**
+	 * Get the date/time of last recorded activity
+	 *
+	 * @return string ISO timestamp
+	 * @since BuddyPress (1.2)
+	 */
 	function get_last_updated() {
 		global $bp, $wpdb;
 
@@ -720,6 +840,12 @@
 		return $wpdb->get_var( $wpdb->prepare( "SELECT id FROM {$bp->activity->table_name} WHERE content = %s", $content ) );
 	}
 
+	/**
+	 * Hide all sitewide activity for a specific user
+	 *
+	 * @param int $user_id
+	 * @since BuddyPress (1.2)
+	 */
 	function hide_all_for_user( $user_id ) {
 		global $wpdb, $bp;
 
