function xmlsitemap_element_get_visible_children in XML sitemap 6.2
Backport of element_get_visible_children() from Drupal 7.
2 calls to xmlsitemap_element_get_visible_children()
- xmlsitemap_settings_form in ./
xmlsitemap.admin.inc - Form builder; Administration settings form.
- xmlsitemap_sitemap_edit_form_pre_render in ./
xmlsitemap.admin.inc
File
- ./
xmlsitemap.module, line 1572 - Main file for the xmlsitemap module.
Code
function xmlsitemap_element_get_visible_children(array $elements) {
foreach (element_children($elements) as $key) {
// Skip un-accessible children.
if (isset($elements[$key]['#access']) && !$elements[$key]['#access']) {
continue;
}
// Skip value and hidden elements, since they are not rendered.
if (isset($elements[$key]['#type']) && in_array($elements[$key]['#type'], array(
'value',
'hidden',
))) {
continue;
}
return TRUE;
}
return FALSE;
}