Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

62 views-view template #66

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions lark.theme
Original file line number Diff line number Diff line change
Expand Up @@ -245,3 +245,18 @@ function lark_forms_attach_views_display_id(&$form, $views_display_id) {
lark_forms_attach_views_display_id($form[$child], $views_display_id);
}
}

/**
* Views media_library preprocess hook.
*
* @param $variables
*/
function lark_preprocess_views_view__media_library(&$variables) {
// Make header classes BEM compatible by adding a new class 'views-display-link-widget__table'.
if (isset($variables['header']['display_link_table']['#options']['attributes']['class'])) {
$table_classes = $variables['header']['display_link_table']['#options']['attributes']['class'];
if (in_array('views-display-link-widget_table', $table_classes)) {
$variables['header']['display_link_table']['#options']['attributes']['class'] = array_merge($table_classes, array_diff(['views-display-link-widget__table'], $table_classes));
}
}
}
Loading