http://mosquito.wordpress.org/view.php?id=1331 - Hat tip: Mike the Magnificant
git-svn-id: http://svn.automattic.com/wordpress/trunk@2603 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7059985cf1
commit
4160fafdcd
|
@ -288,13 +288,13 @@ function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_orde
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $optiondates ) {
|
if ( $optiondates ) {
|
||||||
$cat_dates = $wpdb->get_results(" SELECT cat_ID,
|
$cat_dates = $wpdb->get_results(" SELECT category_id,
|
||||||
UNIX_TIMESTAMP( MAX(post_date) ) AS ts
|
UNIX_TIMESTAMP( MAX(post_date) ) AS ts
|
||||||
FROM $wpdb->posts, $wpdb->post2cat
|
FROM $wpdb->posts, $wpdb->post2cat
|
||||||
WHERE post_status = 'publish' AND post_id = ID $exclusions
|
WHERE post_status = 'publish' AND post_id = ID $exclusions
|
||||||
GROUP BY category_id");
|
GROUP BY category_id");
|
||||||
foreach ($cat_dates as $cat_date) {
|
foreach ($cat_dates as $cat_date) {
|
||||||
$category_timestamp["$cat_date->cat_ID"] = $cat_date->ts;
|
$category_timestamp["$cat_date->category_id"] = $cat_date->ts;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue