Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/17/2014 01:02:25 AM (11 years ago)
Author:
boonebgorges
Message:

Introduce 'update_meta_cache' param to bp_has_activities() stack

See #5398

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity/bp-activity-template.php

    r7899 r7905  
    174174            'show_hidden'      => false,
    175175            'spam'             => 'ham_only',
     176            'update_meta_cache' => true,
    176177        );
    177178        $r = wp_parse_args( $args, $defaults );
     
    189190        // Fetch specific activity items based on ID's
    190191        if ( !empty( $include ) )
    191             $this->activities = bp_activity_get_specific( array( 'activity_ids' => explode( ',', $include ), 'max' => $max, 'page' => $this->pag_page, 'per_page' => $this->pag_num, 'sort' => $sort, 'display_comments' => $display_comments, 'show_hidden' => $show_hidden, 'spam' => $spam ) );
     192            $this->activities = bp_activity_get_specific( array( 'activity_ids' => explode( ',', $include ), 'max' => $max, 'page' => $this->pag_page, 'per_page' => $this->pag_num, 'sort' => $sort, 'display_comments' => $display_comments, 'show_hidden' => $show_hidden, 'spam' => $spam, 'update_meta_cache' => $update_meta_cache, ) );
    192193
    193194        // Fetch all activity items
    194195        else
    195             $this->activities = bp_activity_get( array( 'display_comments' => $display_comments, 'max' => $max, 'per_page' => $this->pag_num, 'page' => $this->pag_page, 'sort' => $sort, 'search_terms' => $search_terms, 'meta_query' => $meta_query, 'filter' => $filter, 'show_hidden' => $show_hidden, 'exclude' => $exclude, 'in' => $in, 'spam' => $spam ) );
     196            $this->activities = bp_activity_get( array( 'display_comments' => $display_comments, 'max' => $max, 'per_page' => $this->pag_num, 'page' => $this->pag_page, 'sort' => $sort, 'search_terms' => $search_terms, 'meta_query' => $meta_query, 'filter' => $filter, 'show_hidden' => $show_hidden, 'exclude' => $exclude, 'in' => $in, 'spam' => $spam, 'update_meta_cache' => $update_meta_cache, ) );
    196197
    197198        if ( !$max || $max >= (int) $this->activities['total'] )
     
    449450 *     @type string|bool $spam Spam status. 'ham_only', 'spam_only', or false
    450451 *           to show all activity regardless of spam status. Default: 'ham_only'.
     452 *     @type bool $populate_extras Whether to pre-fetch the activity metadata
     453 *           for the queried items. Default: true.
    451454 * }
    452455 * @return bool Returns true when activities are found, otherwise false.
     
    520523
    521524        // Searching
    522         'search_terms'     => false         // specify terms to search on
     525        'search_terms'     => false,        // specify terms to search on
     526        'update_meta_cache' => true,
    523527    );
    524528
     
    627631        'display_comments' => $display_comments,
    628632        'show_hidden'      => $show_hidden,
    629         'spam'             => $spam
     633        'spam'             => $spam,
     634        'update_meta_cache' => $update_meta_cache,
    630635    );
    631636
Note: See TracChangeset for help on using the changeset viewer.