You are here

views_handler_filter_block_theme.inc in Views Hacks 7

Same filename and directory in other branches
  1. 6 views_block/handlers/views_handler_filter_block_theme.inc

File

views_block/handlers/views_handler_filter_block_theme.inc
View source
<?php

/**
 * Filter based on block theme.
 */
class views_handler_filter_block_theme extends views_handler_filter_in_operator {
  function get_value_options() {
    foreach (list_themes() as $key => $theme) {
      if ($theme->status) {
        $this->value_options[$key] = $theme->info['name'];
      }
    }
    ksort($this->value_options);
    $this->value_options = array(
      '***CURRENT_THEME***' => t('Current theme'),
      '***DEFAULT_THEME***' => t('Default theme'),
    ) + $this->value_options;
  }

}

Classes

Namesort descending Description
views_handler_filter_block_theme Filter based on block theme.