Only used published posts.
git-svn-id: https://develop.svn.wordpress.org/trunk@1280 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
3caaec0bc7
commit
17ab4425d2
@ -299,7 +299,7 @@ function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_orde
|
|||||||
FROM $tablecategories
|
FROM $tablecategories
|
||||||
INNER JOIN $tablepost2cat ON (cat_ID = category_id)
|
INNER JOIN $tablepost2cat ON (cat_ID = category_id)
|
||||||
INNER JOIN $tableposts ON (ID = post_id)
|
INNER JOIN $tableposts ON (ID = post_id)
|
||||||
WHERE 1 = 1 $exclusions
|
WHERE post_status = 'publish' $exclusions
|
||||||
GROUP BY category_id");
|
GROUP BY category_id");
|
||||||
foreach ($cat_counts as $cat_count) {
|
foreach ($cat_counts as $cat_count) {
|
||||||
$category_posts["$cat_count->cat_ID"] = $cat_count->cat_count;
|
$category_posts["$cat_count->cat_ID"] = $cat_count->cat_count;
|
||||||
@ -312,7 +312,7 @@ function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_orde
|
|||||||
FROM $tablecategories
|
FROM $tablecategories
|
||||||
LEFT JOIN $tablepost2cat ON (cat_ID = category_id)
|
LEFT JOIN $tablepost2cat ON (cat_ID = category_id)
|
||||||
LEFT JOIN $tableposts ON (ID = post_id)
|
LEFT JOIN $tableposts ON (ID = post_id)
|
||||||
WHERE 1 = 1 $exclusions
|
WHERE post_status = 'publish' $exclusions
|
||||||
GROUP BY category_id");
|
GROUP BY category_id");
|
||||||
foreach ($cat_dates as $cat_date) {
|
foreach ($cat_dates as $cat_date) {
|
||||||
$category_lastday["$cat_date->cat_ID"] = $cat_date->lastday;
|
$category_lastday["$cat_date->cat_ID"] = $cat_date->lastday;
|
||||||
|
Loading…
Reference in New Issue
Block a user