Skip to:
Content

BuddyPress.org

Changeset 7709


Ignore:
Timestamp:
12/18/2013 10:07:38 PM (13 years ago)
Author:
johnjamesjacoby
Message:

Revert r7707, and add inline documentation to BP_Notifications_Notification:get_total_count(). See #5303.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-notifications/bp-notifications-classes.php

    r7707 r7709  
    613613                global $wpdb;
    614614
    615                 $bp         = buddypress();
     615                // Load BuddyPress
     616                $bp = buddypress();
     617
     618                /**
     619                 * Default component_name to active_components
     620                 *
     621                 * @see http://buddypress.trac.wordpress.org/ticket/5300
     622                 */
     623                $args = wp_parse_args( $args, array( 'component_name' => array_keys( $bp->active_components ) ) );
     624
     625                // Build the query
    616626                $select_sql = "SELECT COUNT(*)";
    617627                $from_sql   = "FROM {$bp->notifications->table_name}";
     
    619629                $sql        = "{$select_sql} {$from_sql} {$where_sql}";
    620630
     631                // Return the queried results
    621632                return $wpdb->get_var( $sql );
    622633        }
Note: See TracChangeset for help on using the changeset viewer.