Changeset 2525
- Timestamp:
- 04/09/2005 05:30:57 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r2524 r2525 1053 1053 if (!isset($r['offset'])) $r['offset'] = 0; 1054 1054 if (!isset($r['category'])) $r['category'] = ''; 1055 // The following not implemented yet 1056 if (!isset($r['orderby'])) $r['orderby'] = ''; 1057 if (!isset($r['order'])) $r['order'] = ''; 1055 if (!isset($r['orderby'])) $r['orderby'] = 'post_date'; 1056 if (!isset($r['order'])) $r['order'] = 'DESC'; 1058 1057 1059 1058 $now = current_time('mysql'); … … 1064 1063 " WHERE post_date <= '$now' AND (post_status = 'publish') ". 1065 1064 ( empty( $r['category'] ) ? "" : "AND $wpdb->posts.ID = $wpdb->post2cat.post_id AND $wpdb->post2cat.category_id = " . $r['category']. " " ) . 1066 " GROUP BY $wpdb->posts.ID ORDER BY post_date DESCLIMIT " . $r['offset'] . ',' . $r['numberposts'] );1067 1065 " GROUP BY $wpdb->posts.ID ORDER BY " . $r['orderby'] . " " . $r['order'] . " LIMIT " . $r['offset'] . ',' . $r['numberposts'] ); 1066 1068 1067 update_post_caches($posts); 1069 1068
Note: See TracChangeset
for help on using the changeset viewer.