You are here

function node_embed_requirements in Node Embed 7

Implements hook_requirements().

File

./node_embed.module, line 347
This module defines an input filter for taking an embed code syntax ([[nid: ###]]) and removing the embed code and replacing with a rendered node view at that position in the text field.

Code

function node_embed_requirements($phase) {
  $t = get_t();
  $requirements = array();
  if (module_exists('ckeditor')) {
    $requirements['node_embed_iframedialog'] = array(
      'title' => $t('Node Embed - CKEditor IFrame Dialog Field plugin'),
      'value' => $t('Exists'),
      'severity' => REQUIREMENT_OK,
    );
    $plugin = DRUPAL_ROOT . ckeditor_library_path() . '/ckeditor/plugins/iframedialog/plugin.js';
    if (!file_exists($plugin)) {
      $requirements['node_embed_iframedialog']['description'] = $t('Node embed requires the CKEditor IFrame Dialog Field plugin. Please download it from !link and extract it into %path.', array(
        '!link' => l('http://ckeditor.com/addon/iframedialog', 'http://ckeditor.com/addon/iframedialog'),
        '%path' => dirname($plugin),
      ));
      $requirements['node_embed_iframedialog']['value'] = $t('Not found');
      $requirements['node_embed_iframedialog']['severity'] = REQUIREMENT_ERROR;
    }
  }
  return $requirements;
}