checkboxes_filter-1.0.0/checkboxes_filter.module
checkboxes_filter.module
<?php
/**
* @file
* Contains main functions related to the checkboxes filters.
*/
/**
* Implements hook_theme_registry_alter().
*/
function checkboxes_filter_theme_registry_alter(array &$theme_registry) {
$theme_registry['checkboxes']['preprocess functions'][] = 'checkboxes_filter_preprocess_checkboxes';
}
/**
* Preprocess for the theme_checkboxes theming.
*/
function checkboxes_filter_preprocess_checkboxes(array &$variables) {
if (!empty($variables['element']['#filter'])) {
$variables['attributes']['class'][] = 'checkboxes-filter-element';
$variables['#attached']['library'][] = 'checkboxes_filter/filter_checkboxes';
}
}
