function theme_module_filter_operations in Module Filter 7.2
Theme function for module filter operations.
Parameters
$variables:
Return value
string HTML for admin status operations.
1 theme call to theme_module_filter_operations()
- theme_module_filter_system_modules_tabs in ./
module_filter.theme.inc - Theme callback for the modules tabbed form.
File
- ./
module_filter.theme.inc, line 212 - File for theme functions.
Code
function theme_module_filter_operations(&$vars) {
$links =& $vars['links'];
$dropbutton = $vars['dropbutton'];
$operations = array();
foreach (element_children($links) as $key) {
if ($dropbutton) {
hide($links[$key]);
if (!empty($links[$key]['#href'])) {
$operations[$key] = array(
'title' => $links[$key]['#title'],
'href' => $links[$key]['#href'],
);
if (isset($links[$key]['#options'])) {
$operations[$key] += $links[$key]['#options'];
}
}
}
else {
$data = drupal_render($links[$key]);
if (!empty($data)) {
$operations[$key] = array(
'data' => $data,
);
}
}
}
if (!empty($operations)) {
if ($dropbutton) {
return '<div class="admin-operations">' . theme('links__ctools_dropbutton', array(
'title' => t('Operations'),
'links' => $operations,
'attributes' => array(
'class' => array(
'links',
),
),
)) . '</div>';
}
return '<div class="admin-operations">' . theme('item_list', array(
'items' => $operations,
'attributes' => array(
'class' => array(
'links',
'inline',
),
),
)) . '</div>';
}
}