WordPress at a glance
function is not described

get_category_children() WP 1.2.0

Deprecated in 2.8.0. It is no longer supported and can be removed in future releases. Use get_term_children() instead.

Retrieve category children list separated before and after the term IDs.

  • See: get_term_children()

No Hooks.

Return

String.

Usage

get_category_children( $id, $before, $after, $visited );
$id(int) (required)
Category ID to retrieve children.
$before(string)
Prepend before category term ID.
Default: '/'
$after(string)
Append after category term ID.
Default: empty string
$visited(array)
Category Term IDs that have already been added.
Default: array()

Code of get category children: wp-includes/deprecated.php VER 5.0.3

<?php
function get_category_children( $id, $before = '/', $after = '', $visited = array() ) {
	_deprecated_function( __FUNCTION__, '2.8.0', 'get_term_children()' );
	if ( 0 == $id )
		return '';

	$chain = '';
	/** TODO: consult hierarchy */
	$cat_ids = get_all_category_ids();
	foreach ( (array) $cat_ids as $cat_id ) {
		if ( $cat_id == $id )
			continue;

		$category = get_category( $cat_id );
		if ( is_wp_error( $category ) )
			return $category;
		if ( $category->parent == $id && !in_array( $category->term_id, $visited ) ) {
			$visited[] = $category->term_id;
			$chain .= $before.$category->term_id.$after;
			$chain .= get_category_children( $category->term_id, $before, $after );
		}
	}
	return $chain;
}