wysiwyg_mediaembed.install in Wysiwyg Media Embed 8
Contains wysiwyg_mediaembed.install.
File
wysiwyg_mediaembed.installView source
<?php
/**
* @file
* Contains wysiwyg_mediaembed.install.
*/
/**
* Implements hook_requirements().
*/
function wysiwyg_mediaembed_requirements($phase) {
$requirements = [];
$path = 'libraries/mediaembed/plugin.js';
$path = DRUPAL_ROOT . '/' . $path;
if (!file_exists($path)) {
$requirements['wysiwyg_mediaembed'] = [
'title' => t('mediaembed library is missing'),
'value' => t('Plugin not detected'),
'severity' => REQUIREMENT_ERROR,
'description' => t('wysiwyg_mediaembed requires the plugin.js library.
Download the plugin from https://ckeditor.com/addon/mediaembed
version 0.7, and place it in the libraries folder
(/libraries/mediaembed)'),
];
}
else {
$requirements['wysiwyg_mediaembed'] = [
'title' => t('CKEditor mediaembed'),
'value' => t('Plugin detected'),
'severity' => REQUIREMENT_OK,
];
}
return $requirements;
}
Functions
Name | Description |
---|---|
wysiwyg_mediaembed_requirements | Implements hook_requirements(). |