function wysiwyg_mediaembed_requirements in Wysiwyg Media Embed 8
Implements hook_requirements().
File
- ./
wysiwyg_mediaembed.install, line 11 - Contains wysiwyg_mediaembed.install.
Code
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;
}