-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgalledit.theme
More file actions
32 lines (28 loc) · 842 Bytes
/
galledit.theme
File metadata and controls
32 lines (28 loc) · 842 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
/**
* @file
* Functions to support theming in the galledit theme.
*/
/**
* Implements hook_preprocess_HOOK() for Block document templates.
*/
function galledit_preprocess_block(array &$variables) {
if ($variables['attributes']['id'] == 'block-sitebranding') {
// Use the logo from the main theme.
$site_logo = str_replace('galledit', 'gall', $variables['site_logo']);
$variables['site_logo'] = str_replace('.svg', '.png', $site_logo);
}
}
/**
* Implements hook_theme_suggestions_form_alter().
*/
function galledit_theme_suggestions_form_alter(array &$suggestions, array $variables) {
switch ($variables['element']['#form_id']) {
case 'node_exhibition_form':
$suggestions[] = 'form--exhibition';
break;
case 'node_gallery_form':
$suggestions[] = 'form--gallery';
break;
}
}