You are here

function ckeditor_responsive_plugin_preprocess_page in CKEditor Responsive Plugin 8

Same name and namespace in other branches
  1. 2.0.x ckeditor_responsive_plugin.module \ckeditor_responsive_plugin_preprocess_page()

Implements hook_preprocess_page().

File

./ckeditor_responsive_plugin.module, line 10
Hooks implementations.

Code

function ckeditor_responsive_plugin_preprocess_page(&$variables) {
  global $base_url;
  $defaultThemeName = \Drupal::config('system.theme')
    ->get('default');
  $image_path = '/themes/custom/' . $defaultThemeName . '/' . 'assets/img/';
  $variables['#attached']['drupalSettings']['active']['theme_path'] = $base_url . $image_path;
}