Unverified Commit 81400d48 authored by Alex Pott's avatar Alex Pott
Browse files

docs: #3572051 hook_icon_pack_alter() is undocumented

By: tstoeckler
By: kanchanandhini6
By: nicxvan
(cherry picked from commit 65b0772b)
parent 8df2a7d8
Loading
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -1376,6 +1376,21 @@ function hook_template_preprocess_default_variables_alter(&$variables) {
  $variables['is_admin'] = \Drupal::currentUser()->hasPermission('access administration pages');
}

/**
 * Alter icon pack definitions.
 *
 * Allows modules to modify icon pack definitions.
 *
 * @param array $icon_packs
 *   The array of icon pack definitions, keyed by icon pack ID.
 */
function hook_icon_pack_alter(array &$icon_packs): void {
  // Example: Change the label of an icon pack.
  if (isset($icon_packs['navigation'])) {
    $icon_packs['navigation']['label'] = 'Custom navigation icons';
  }
}

/**
 * @} End of "addtogroup hooks".
 */