Changeset 13184 for trunk/src/bp-blogs/bp-blogs-template.php
- Timestamp:
- 12/12/2021 02:09:02 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-blogs/bp-blogs-template.php
r13147 r13184 112 112 * Based on the $args passed, bp_has_blogs() populates the $blogs_template 113 113 * global, enabling the use of BuddyPress templates and template functions to 114 * display a list of activity items. 114 * display a list of blogs. 115 * 116 * @since 1.0.0 117 * @since 1.2.0 Added $type, $page, $search_terms parameters 118 * @since 1.6.0 Added $page_arg parameter 119 * @since 2.0.0 Added $include_blog_ids, $update_meta_cache parameters 120 * @since 10.0.0 Added $date_query parameter 115 121 * 116 122 * @global BP_Blogs_Template $blogs_template {@link BP_Blogs_Template} … … 122 128 * and because bp_has_blogs() determines some default arguments in a 123 129 * dynamic fashion, we list all accepted arguments here as well. 124 *125 * Arguments can be passed as an associative array, or as a URL query126 * string (eg, 'user_id=4&per_page=3').127 130 * 128 131 * @type int $page Which page of results to fetch. Using page=1 without … … 141 144 * When viewing a user profile page, 'user_id' defaults to the 142 145 * ID of the displayed user. Otherwise the default is false. 146 * @type array $date_query Filter results by site last activity date. See first parameter of 147 * {@link WP_Date_Query::__construct()} for syntax. Only applicable if 148 * $type is either 'newest' or 'active'. 143 149 * } 144 150 * @return bool Returns true when blogs are found, otherwise false. … … 168 174 'include_blog_ids' => false, 169 175 'search_terms' => $search_terms_default, 176 'date_query' => false, 170 177 'update_meta_cache' => true, 171 178 ), … … 179 186 180 187 // Get the blogs. 181 $blogs_template = new BP_Blogs_Template( $r ['type'], $r['page'], $r['per_page'], $r['max'], $r['user_id'], $r['search_terms'], $r['page_arg'], $r['update_meta_cache'], $r['include_blog_ids']);188 $blogs_template = new BP_Blogs_Template( $r ); 182 189 183 190 /**
Note: See TracChangeset
for help on using the changeset viewer.