Fix order by in wp_get_archives(). Props mattbta. fixes #3961
git-svn-id: https://develop.svn.wordpress.org/trunk@5036 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
d97212755b
commit
d3578ce12e
@ -415,7 +415,7 @@ function wp_get_archives($args = '') {
|
||||
}
|
||||
} elseif ( ( 'postbypost' == $type ) || ('alpha' == $type) ) {
|
||||
('alpha' == $type) ? $orderby = "post_title ASC " : $orderby = "post_date DESC ";
|
||||
$arcresults = $wpdb->get_results("SELECT * FROM $wpdb->posts $join $where $orderby $limit");
|
||||
$arcresults = $wpdb->get_results("SELECT * FROM $wpdb->posts $join $where ORDER BY $orderby $limit");
|
||||
if ( $arcresults ) {
|
||||
foreach ( $arcresults as $arcresult ) {
|
||||
if ( $arcresult->post_date != '0000-00-00 00:00:00' ) {
|
||||
|
Loading…
Reference in New Issue
Block a user