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

filter_checkboxes.module
<?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