function cms_content_sync_preprocess_html in CMS Content Sync 2.1.x
Same name and namespace in other branches
- 2.0.x cms_content_sync.module \cms_content_sync_preprocess_html()
Implements hook_preprocess_html()
File
- ./
cms_content_sync.module, line 2066 - Module file for cms_content_sync.
Code
function cms_content_sync_preprocess_html(&$vars) {
// Add the possiblity to hide the admin toolbar for the import dashboard
// live previews.
$isPreview = \Drupal::request()->query
->get('content_sync_preview');
if (isset($isPreview)) {
$vars['attributes']['class'][] = 'content-sync-preview';
$vars['#attached']['library'][] = 'cms_content_sync/preview';
}
}