DrupalBin
Submit Code
About
Recent Posts
float?
2 hours 36 min
ago
views handler
6 hours 6 min
ago
Code
6 hours 22 min
ago
Code
6 hours 23 min
ago
more
Tags
CCK
drupal
fapi
jquery
menu
module
Panels
php
simpletest
test
theme
views
more tags
User login
Log in using OpenID:
What is OpenID?
Username:
*
Password:
*
Create new account
Request new password
Log in using OpenID
Cancel OpenID login
Home
get vocab depth
View
Download
Fix
May 10, 2008 - 10:47am —
Wim Leers
function
taxonomy_vocabulary_get_depth
(
$vid
)
{
$tree
=
taxonomy_get_tree
(
$vid
)
;
foreach
(
$tree
as
$term
)
{
if
(
$term
->
depth
>
$depth
)
{
$depth
=
$term
->
depth
;
}
}
return
$depth
;
}
taxonomy