You are here

function hook_nivo_slider_theme_info in Nivo Slider 8

Same name and namespace in other branches
  1. 7 nivo_slider.api.php \hook_nivo_slider_theme_info()

Register slider themes.

This hook can be used to register themes for the slider. Themes will be displayed and made selectable on the slider options administration page.

Slider themes get a unique CSS class to use for styling and can specify an unlimited number of CSS and JS files to include when the slider is displayed.

1 function implements hook_nivo_slider_theme_info()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

nivo_slider_nivo_slider_theme_info in ./nivo_slider.nivo_slider.inc
Implements hook_nivo_slider_theme_info().
2 invocations of hook_nivo_slider_theme_info()
NivoSliderSliderBlock::build in src/Plugin/Block/NivoSliderSliderBlock.php
Implements \Drupal\block\BlockBase::build().
SlideOptionsConfigurationForm::buildForm in src/Form/SlideOptionsConfigurationForm.php
Form constructor.

File

./nivo_slider.api.php, line 21
Hooks provided by the Nivo Slider module.

Code

function hook_nivo_slider_theme_info() {
  return [
    'theme_name' => [
      // Human readable theme name.
      'name' => t('Theme name'),
      // Description of the theme.
      'description' => t('Theme description.'),
      // Theme supports thumbnail navigation.
      'thumb_support' => TRUE,
      'resources' => [
        'css' => [
          // Full path to a CSS file to include with the theme.
          drupal_get_path('module', 'module_name') . '/css/example.css',
          drupal_get_path('module', 'module_name') . '/css/demonstration.css',
        ],
        'js' => [
          // Full path to a JS file to include with the theme.
          drupal_get_path('module', 'module_name') . '/js/example.css',
          drupal_get_path('module', 'module_name') . '/js/demonstration.css',
        ],
      ],
    ],
  ];
}