You are here

function hook_skinr_preprocess_alter in Skinr 7.2

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

Perform alterations on skin configuration objects before they are applied.

Parameters

$skins: An array of skin configuration objects.

$context: An array containing the current context. It has the following keys:

  • hook: The name of the theme hook.
  • variables: The variables array from hook_preprocess() (modify in place).
  • theme: The current theme.
  • module: The module implementing the elements.
  • elements: An array of element IDs.

Related topics

2 functions implement hook_skinr_preprocess_alter()

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

skinr_context_skinr_preprocess_alter in skinr_context/skinr_context.module
Implements hook_skinr_preprocess_alter().
skinr_panels_skinr_preprocess_alter in skinr_panels/skinr_panels.module
Implements hook_skinr_preprocess_alter().
2 invocations of hook_skinr_preprocess_alter()
skinr_preprocess in ./skinr.module
Implements hook_preprocess().
skinr_preprocess in ./skinr.module
Implements hook_preprocess().

File

./skinr.api.php, line 456
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_preprocess_alter(&$skins, $context) {
  if ($context['theme'] == 'bartik') {
    foreach ($skins as $key => $skin) {
      if ($skin->module == 'block' && $skin->element == 'system_navigation') {
        unset($skins[$key]);
      }
    }
  }
}