wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
get_category_children [ WordPress Function ]
| Parameter: |
|
| Siehe: | |
| Gibt zurück: |
|
| Definiert in: |
|
Retrieve category children list separated before and after the term IDs.
Source
<?php
function get_category_children( $id, $before = '/', $after = '', $visited = array() ) {
_deprecated_function( __FUNCTION__, '2.8', '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;
}
?>
Beispiele [ wp-snippets.com ]
Top Google Suchergebnisse
- WordPress › Support » function get_category_children has a line i ...
Hi guys, i am modifying my template and i read this function of wordpress but there is a line that if erased nothing changes so i guess it does nothing.The line is ...
wordpress.org - #9007 (Poor get_category_children() performance; rewrite to use ...
Running get_categories() with the 'child_of' parameter calls get_category_children(). This call hits the 30-second server time limit. Outside the web environment, ...
core.trac.wordpress.org - get_category_children() WordPress function reference, arguments ...
Retrieve category children list separated before and after the term IDs.
queryposts.com - get_category_children | A HitchHackers guide through WordPress
Feb 12, 2011 ... function get_category_children( $id, $before = '/', $after = '', $visited = array() ) ... get_category_children( $category->term_id, $before, $after ) ...
hitchhackerguide.com