universal_categories; } // use sticky values if set if (isset($vars['universal_categories_list'])) { $selected_categories = $vars['universal_categories_list']; } $categories = elgg_get_site_entity()->categories; if (empty($categories)) { $categories = array(); } if (empty($selected_categories)) { $selected_categories = array(); } if (!empty($categories)) { if (!is_array($categories)) { $categories = array($categories); } // checkboxes want Label => value, so in our case we need category => category $categories = array_flip($categories); array_walk($categories, create_function('&$v, $k', '$v = $k;')); ?>