You are here

function syntaxhighlighter_modules_disabled in Syntax Highlighter 8

Same name and namespace in other branches
  1. 7.2 syntaxhighlighter.module \syntaxhighlighter_modules_disabled()
  2. 7 syntaxhighlighter.module \syntaxhighlighter_modules_disabled()

Implements hook_modules_disabled().

File

./syntaxhighlighter.module, line 215
Syntax highlight code using the SyntaxHighlighter Javascript library.

Code

function syntaxhighlighter_modules_disabled($modules) {
  $config = \Drupal::config('syntaxhighlighter.settings');
  if (in_array('php', $modules) && $config
    ->get('inject') == SYNTAXHIGHLIGHTER_INJECT_PHP) {
    drupal_set_message(t('The "%syntaxhighlighter" module is currently configured to use PHP for js/css code inject control, disabling the "%module_name" module will effectively turn off syntax highlighting on all pages.', [
      '%syntaxhighlighter' => t('Syntax Highlighter'),
      '%module_name' => t('PHP filter'),
    ]), 'warning');
  }
}