Add alpha sort to wp_get_archives(). Props skippy. fixes #247
git-svn-id: http://svn.automattic.com/wordpress/trunk@3549 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
941ec0ff97
commit
35c2833427
|
@ -370,8 +370,9 @@ function get_archives($type='', $limit='', $format='html', $before = '', $after
|
|||
}
|
||||
}
|
||||
}
|
||||
} elseif ( 'postbypost' == $type ) {
|
||||
$arcresults = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish' ORDER BY post_date DESC" . $limit);
|
||||
} elseif ( ( 'postbypost' == $type ) || ('alpha' == $type) ) {
|
||||
('alpha' == $type) ? $orderby = "post_title ASC " : $orderby = "post_date DESC ";
|
||||
$arcresults = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish' 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