Created
February 21, 2015 16:06
-
-
Save ChrisChinchilla/2582a8ec0365031e599d to your computer and use it in GitHub Desktop.
Check if a term has any children in Drupal
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$argArray = arg() ; | |
$finalTerm = end($argArray) ; | |
$termArray = taxonomy_get_children($finalTerm); | |
if (empty($termArray)) return TRUE; | |
$argArray = arg() ; | |
$finalTerm = end($argArray) ; | |
$termArray = taxonomy_get_children($finalTerm); | |
if (!empty($termArray)) return TRUE; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment