diff --git a/src/bp-activity/bp-activity-template.php b/src/bp-activity/bp-activity-template.php
index b42a0eb44..0e6b763e6 100644
--- a/src/bp-activity/bp-activity-template.php
+++ b/src/bp-activity/bp-activity-template.php
@@ -3770,6 +3770,8 @@ function bp_activity_comments_user_avatars( $args = array() ) {
  *
  * @since 1.7.0
  *
+ * @global BP_Activity_Template $activities_template The main activity
+ *
  * @return bool|array An array of IDs, or false if none are found.
  */
 function bp_activity_get_comments_user_ids() {
diff --git a/src/bp-activity/classes/class-bp-activity-activity.php b/src/bp-activity/classes/class-bp-activity-activity.php
index 148805607..d778d8e21 100644
--- a/src/bp-activity/classes/class-bp-activity-activity.php
+++ b/src/bp-activity/classes/class-bp-activity-activity.php
@@ -173,6 +173,8 @@ class BP_Activity_Activity {
 	 * Populate the object with data about the specific activity item.
 	 *
 	 * @since 1.0.0
+	 *
+	 * @global wpdb $wpdb WordPress database object.
 	 */
 	public function populate() {
 		global $wpdb;
@@ -227,6 +229,8 @@ class BP_Activity_Activity {
 	 *
 	 * @since 1.0.0
 	 *
+	 * @global wpdb $wpdb WordPress database object.
+	 *
 	 * @return WP_Error|bool True on success.
 	 */
 	public function save() {
@@ -350,6 +354,8 @@ class BP_Activity_Activity {
 	 * @see WP_Meta_Query::queries for a description of the 'meta_query'
 	 *      parameter format.
 	 *
+	 * @global wpdb $wpdb WordPress database object.
+	 *
 	 * @param array $args {
 	 *     An array of arguments. All items are optional.
 	 *     @type int          $page              Which page of results to fetch. Using page=1 without per_page will result
@@ -881,6 +887,8 @@ class BP_Activity_Activity {
 	 *
 	 * @since 2.0.0
 	 *
+	 * @global wpdb $wpdb WordPress database object.
+	 *
 	 * @param array $activity_ids Array of activity IDs.
 	 * @return array
 	 */
@@ -1239,6 +1247,8 @@ class BP_Activity_Activity {
 	 * @since 1.2.0
 	 * @since 10.0.0 Parameters were made optional.
 	 *
+	 * @global wpdb $wpdb WordPress database object.
+	 *
 	 * @param array $args {
 	 *     An array of arguments. All items are optional.
 	 *     @type int    $user_id           User ID to filter by.
@@ -1351,6 +1361,8 @@ class BP_Activity_Activity {
 	 *
 	 * @since 1.2.0
 	 *
+	 * @global wpdb $wpdb WordPress database object.
+	 *
 	 * @param array $args {
 	 *     @int    $id                Optional. The ID of a specific item to delete.
 	 *     @string $action            Optional. The action to filter by.
@@ -1528,6 +1540,8 @@ class BP_Activity_Activity {
 	 *
 	 * @since 1.2.0
 	 *
+	 * @global wpdb $wpdb WordPress database object.
+	 *
 	 * @deprecated 2.3.0
 	 *
 	 * @param array $activity_ids Activity IDs whose comments should be deleted.
@@ -1829,6 +1843,8 @@ class BP_Activity_Activity {
 	 *
 	 * @since 1.2.0
 	 *
+	 * @global wpdb $wpdb WordPress database object.
+	 *
 	 * @param bool $skip_last_activity If true, components will not be
 	 *                                 included if the only activity type associated with them is
 	 *                                 'last_activity'. (Since 2.0.0, 'last_activity' is stored in
@@ -1880,6 +1896,8 @@ class BP_Activity_Activity {
 	 *
 	 * @see BP_Activity_Activity::get_filter_sql()
 	 *
+	 * @global wpdb $wpdb WordPress database object. 
+	 *
 	 * @param string     $field The database field.
 	 * @param array|bool $items The values for the IN clause, or false when none are found.
 	 * @return string|false
@@ -2001,6 +2019,8 @@ class BP_Activity_Activity {
 	 *
 	 * @since 1.2.0
 	 *
+	 * @global wpdb $wpdb WordPress database object. 
+	 *
 	 * @return string ISO timestamp.
 	 */
 	public static function get_last_updated() {
@@ -2036,6 +2056,8 @@ class BP_Activity_Activity {
 	 *
 	 * @since 1.1.0
 	 *
+	 * @global wpdb $wpdb WordPress database object.
+	 *
 	 * @param string $content The content to filter by.
 	 * @return int|false The ID of the first matching item if found, otherwise false.
 	 */
@@ -2054,6 +2076,8 @@ class BP_Activity_Activity {
 	 *
 	 * @since 1.2.0
 	 *
+	 * @global wpdb $wpdb WordPress database object.
+	 *
 	 * @param int $user_id The ID of the user whose activity you want to mark hidden.
 	 * @return mixed
 	 */
diff --git a/src/bp-activity/classes/class-bp-activity-feed.php b/src/bp-activity/classes/class-bp-activity-feed.php
index 872e7a22f..a6f8682b4 100644
--- a/src/bp-activity/classes/class-bp-activity-feed.php
+++ b/src/bp-activity/classes/class-bp-activity-feed.php
@@ -90,6 +90,8 @@ class BP_Activity_Feed {
 	 *
 	 * @since 1.8.0
 	 *
+	 * @global WP_Query $wp_query WordPress query object.
+	 *
 	 * @param array $args Optional.
 	 */
 	public function __construct( $args = array() ) {
@@ -330,6 +332,8 @@ class BP_Activity_Feed {
 	 * Most of this class method is derived from {@link WP::send_headers()}.
 	 *
 	 * @since 1.9.0
+	 *
+	 * @global WP_Query $wp_query WordPress query object.
 	 */
 	protected function http_headers() {
 		// Set up some additional headers if not on a directory page
diff --git a/src/bp-activity/classes/class-bp-activity-query.php b/src/bp-activity/classes/class-bp-activity-query.php
index 42a4b4e24..a1df06591 100644
--- a/src/bp-activity/classes/class-bp-activity-query.php
+++ b/src/bp-activity/classes/class-bp-activity-query.php
@@ -108,6 +108,8 @@ class BP_Activity_Query extends BP_Recursive_Query {
 	 *
 	 * @since 2.2.0
 	 *
+	 * @global wpdb $wpdb WordPress database object.
+	 *
 	 * @param  array $clause       Array of arguments belonging to the clause.
 	 * @param  array $parent_query Parent query to which the clause belongs.
 	 * @return array {
diff --git a/src/bp-blogs/bp-blogs-activity.php b/src/bp-blogs/bp-blogs-activity.php
index b7de267dc..253647043 100644
--- a/src/bp-blogs/bp-blogs-activity.php
+++ b/src/bp-blogs/bp-blogs-activity.php
@@ -671,6 +671,8 @@ add_action( 'bp_blogs_remove_data_for_blog', 'bp_blogs_delete_activity_for_site'
  *
  * @since 1.0.0
  *
+ * @global wpdb $wpdb WordPress database object.
+ *
  * @param int $post_id ID of the post to be removed.
  * @param int $blog_id Optional. Defaults to current blog ID.
  * @param int $user_id Optional. Defaults to the logged-in user ID. This param
@@ -1022,6 +1024,8 @@ add_action( 'trashed_post_comments', 'bp_blogs_remove_activity_meta_for_trashed_
  * @since 2.1.0
  * @since 2.5.0 Used for any synced Post type comments, in wp-admin or front-end contexts.
  *
+ * @global wpdb $wpdb WordPress database object.
+ *
  * @param array $args Arguments passed from bp_parse_args() in bp_has_activities().
  * @return array $args
  */
@@ -1200,6 +1204,8 @@ add_action( 'bp_before_activity_comment', 'bp_blogs_setup_comment_loop_globals_o
  *
  * @since 2.0.0
  *
+ * @global BP_Activity_Template $activities_template The main activity template for Disable Activity Commenting.
+ *
  * @param bool $retval Is activity commenting enabled for this activity entry.
  * @return bool
  */
@@ -1331,6 +1337,8 @@ add_filter( 'bp_activity_can_comment_reply', 'bp_blogs_can_comment_reply', 10, 2
  *
  * @since 2.0.0
  *
+ * @global BP_Activity_Template $activities_template The main activity template for Change activity comment permalinks.
+ *
  * @param string $retval The activity comment permalink.
  * @return string
  */
diff --git a/src/bp-blogs/bp-blogs-functions.php b/src/bp-blogs/bp-blogs-functions.php
index 290e689c1..56ab903b3 100644
--- a/src/bp-blogs/bp-blogs-functions.php
+++ b/src/bp-blogs/bp-blogs-functions.php
@@ -87,6 +87,8 @@ function bp_blogs_get_blogs( $args = '' ) {
  * @since 1.0.0
  * @since 2.6.0 Accepts $args as a parameter.
  *
+ * @global wpdb $wpdb WordPress database object.
+ *
  * @param array $args {
  *     Array of arguments.
  *     @type int    $offset   The offset to use.
@@ -860,6 +862,8 @@ add_action( 'bp_activity_post_type_comment', 'bp_blogs_comment_sync_activity_com
  * default, though as of 2.1.0 you can filter 'bp_blogs_get_allowed_roles' to
  * modify this behavior.
  *
+ * @global wpdb $wpdb WordPress database object.
+ *
  * @param int         $user_id The ID of the user.
  * @param string|bool $role    User's WordPress role for this blog ID.
  * @param int         $blog_id Blog ID user is being added to.
@@ -936,6 +940,8 @@ function bp_blogs_get_allowed_roles() {
 /**
  * Remove a blog-user pair from BP's blog tracker.
  *
+ * @global wpdb $wpdb WordPress database object.
+ *
  * @param int $user_id ID of the user whose blog is being removed.
  * @param int $blog_id Optional. ID of the blog being removed. Default: current blog ID.
  */
