Changeset 13236 for trunk/src/bp-blogs/classes/class-bp-blogs-blog.php
- Timestamp:
- 02/18/2022 11:06:15 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-blogs/classes/class-bp-blogs-blog.php
r13184 r13236 171 171 * @type string $type The order in which results should be returned. 172 172 * 'active', 'alphabetical', 'newest', or 'random'. 173 * @type int|bool $ limit Optional. The maximum records to return.173 * @type int|bool $per_page Optional. The number of records to return per page. 174 174 * Default: false. 175 175 * @type int|bool $page Optional. The page of records to return. … … 201 201 $old_args_keys = [ 202 202 0 => 'type', 203 1 => ' limit',203 1 => 'per_page', 204 204 2 => 'page', 205 205 3 => 'user_id', … … 218 218 array( 219 219 'type' => 'active', 220 ' limit'=> false,220 'per_page' => false, 221 221 'page' => false, 222 222 'user_id' => 0, … … 234 234 } 235 235 236 $pag_sql = ( $r[' limit'] && $r['page'] ) ? $wpdb->prepare( " LIMIT %d, %d", intval( ( $r['page'] - 1 ) * $r['limit']), intval( $r['limit'] ) ) : '';236 $pag_sql = ( $r['per_page'] && $r['page'] ) ? $wpdb->prepare( " LIMIT %d, %d", intval( ( $r['page'] - 1 ) * $r['per_page']), intval( $r['per_page'] ) ) : ''; 237 237 238 238 $user_sql = ! empty( $r['user_id'] ) ? $wpdb->prepare( " AND b.user_id = %d", $r['user_id'] ) : '';
Note: See TracChangeset
for help on using the changeset viewer.