filter_checkboxes-8.x-1.x-dev/filter_checkboxes.module

filter_checkboxes.module
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php
/**
 * @file
 * Contains main functions related the checkboxes filters.
 */
 
/**
 * Implements hook_theme_registry_alter().
 */
function filter_checkboxes_theme_registry_alter(array &$theme_registry) {
  $theme_registry['checkboxes']['preprocess functions'][] = 'filter_checkboxes_preprocess_checkboxes';
}
 
/**
 * Preprocess for the theme_checkboxes theming.
 */
function filter_checkboxes_preprocess_checkboxes(array &$variables) {
  if (!empty($variables['element']['#filter'])) {
    $variables['attributes']['class'][] = 'checkboxes-filter-element';
    $variables['#attached']['library'][] = 'filter_checkboxes/filter-checkboxes-js';
  }
}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc