You are here

function hook_skinr_skin_PLUGIN_info in Skinr 7.2

Same name and namespace in other branches
  1. 8.2 skinr.api.php \hook_skinr_skin_PLUGIN_info()

Define one or more skins in an atomic Skinr plugin file.

This hook works identically to hook_skinr_skin_info(), but allows to place one or more related skin definitions into a separate plugin file.

For example, considering a module or theme with the name "extension" that contains an include file: @code extension/skins/example/example.inc @encode The "hook" prefix is substituted with the name of the module or theme implementing it ("extension"), and PLUGIN is substituted with the name of the include file ("example"), e.g., THEME_skinr_skin_PLUGIN_info() or MODULE_skinr_skin_PLUGIN_info(). For above example, the function name would be: extension_skinr_skin_example_info().

Related topics

1 function implements hook_skinr_skin_PLUGIN_info()

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

skinr_test_skinr_skin_example_info in tests/skinr_test/skins/example/example.inc
Implements hook_skinr_skin_PLUGIN_info().

File

./skinr.api.php, line 337
This file contains no working PHP code; it exists to provide additional documentation for doxygen as well as to document hooks in the standard Drupal manner.

Code

function hook_skinr_skin_PLUGIN_info() {
  $skins['extension_example_menus'] = array(
    'title' => t('Example menu styles'),
    'type' => 'select',
    'group' => 'skinr_menus',
    'theme hooks' => array(
      'block__menu',
      'block__menu_block',
    ),
    'attached' => array(
      'css' => array(
        'css/nav.css',
      ),
    ),
    'options' => array(
      'menu_a' => array(
        'title' => t('Standard (1 level) - Green'),
        'class' => array(
          'nav',
          'nav-a',
        ),
        'attached' => array(
          'css' => array(
            'css/nav-colors.css',
          ),
        ),
      ),
      'menu_b' => array(
        'title' => t('Standard (1 level) - Blue'),
        'class' => array(
          'nav',
          'nav-b',
        ),
        'attached' => array(
          'css' => array(
            'css/nav-colors.css',
          ),
        ),
      ),
    ),
  );
  return $skins;
}