Skip to content

Commit

Permalink
feat: update find-and-replace text for config schema
Browse files Browse the repository at this point in the history
  • Loading branch information
Callin Mullaney committed Feb 28, 2024
1 parent 270549c commit 2a64ddc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 41 deletions.
2 changes: 1 addition & 1 deletion whisk/config/schema/whisk.schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

whisk.settings:
type: theme_settings
label: 'EMULSIFY_RECIPE_NAME settings'
label: 'whisk settings'
40 changes: 0 additions & 40 deletions whisk/whisk.theme
Original file line number Diff line number Diff line change
Expand Up @@ -4,43 +4,3 @@
* @file
* Functions to support theming.
*/

/**
* Implements hook_theme_suggestions_alter().
*
* Add form login template suggestions.
*
* @inheritdoc
*/
function whisk_theme_suggestions_alter(&$suggestions, $variables, $hook) {
if ($hook == 'field') {
$suggestions[] = 'field__' . $variables['element']['#entity_type'] . '__' . $variables['element']['#field_name'];
$suggestions[] = 'field__' . $variables['element']['#entity_type'] . '__' . $variables['element']['#field_name'] . '__' . $variables['element']['#bundle'] . '__' . $variables['element']['#view_mode'];
}

if ($hook == 'form' && !empty($variables['element']['#id'])) {
$suggestions[] = 'form__' . str_replace('-', '_', $variables['element']['#id']);
}

if ($hook == 'table' && !empty($variables['attributes']['class'][0])) {
$suggestions[] = 'table__' . str_replace('-', '_', $variables['attributes']['class'][0]);
}

if ($hook == 'user') {
$suggestions[] = 'user__' . $variables['elements']['#view_mode'];
}

if ($hook == 'views_view') {
$suggestions[] = 'views_view__' . $variables['view']->id();
$suggestions[] = 'views_view__' . $variables['view']->id() . '__' . $variables['view']->current_display;
}

if ($hook == 'views_view_unformatted') {
$suggestions[] = 'views_view_unformatted__' . $variables['view']->id();
$suggestions[] = 'views_view_unformatted__' . $variables['view']->id() . '__' . $variables['view']->current_display;
}

if ($hook == 'views_mini_pager') {
$suggestions[] = 'views_mini_pager';
}
}

0 comments on commit 2a64ddc

Please sign in to comment.