On this page
function theme_filter_admin_format_filter_order
theme_filter_admin_format_filter_order($variables)
Returns HTML for a text format's filter order form.
Parameters
$variables: An associative array containing:
- element: A render element representing the form.
Related topics
File
- modules/filter/filter.admin.inc, line 303
- Administrative page callbacks for the Filter module.
Code
function theme_filter_admin_format_filter_order($variables) {
$element = $variables['element'];
// Filter order (tabledrag).
$rows = array();
foreach (element_children($element, TRUE) as $name) {
$element[$name]['weight']['#attributes']['class'][] = 'filter-order-weight';
$rows[] = array(
'data' => array(
drupal_render($element[$name]['filter']),
drupal_render($element[$name]['weight']),
),
'class' => array('draggable'),
);
}
$output = drupal_render_children($element);
$output .= theme('table', array('rows' => $rows, 'attributes' => array('id' => 'filter-order')));
drupal_add_tabledrag('filter-order', 'order', 'sibling', 'filter-order-weight', NULL, NULL, TRUE);
return $output;
}
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!filter!filter.admin.inc/function/theme_filter_admin_format_filter_order/7.x