Don't get children for cat 0. fixes #2123
git-svn-id: http://svn.automattic.com/wordpress/trunk@3338 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
17707c8a55
commit
3a3d3f6aee
|
@ -126,6 +126,9 @@ function get_category_parents($id, $link = FALSE, $separator = '/', $nicename =
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_category_children($id, $before = '/', $after = '') {
|
function get_category_children($id, $before = '/', $after = '') {
|
||||||
|
if ( 0 == $id )
|
||||||
|
return '';
|
||||||
|
|
||||||
$cat_ids = get_all_category_ids();
|
$cat_ids = get_all_category_ids();
|
||||||
foreach ( $cat_ids as $cat_id ) {
|
foreach ( $cat_ids as $cat_id ) {
|
||||||
if ( $cat_id == $id)
|
if ( $cat_id == $id)
|
||||||
|
|
Loading…
Reference in New Issue