function wysiwyg_wymeditor_version in Wysiwyg 5.2
Same name and namespace in other branches
- 6.2 editors/wymeditor.inc \wysiwyg_wymeditor_version()
- 7.2 editors/wymeditor.inc \wysiwyg_wymeditor_version()
Detect editor version.
Parameters
$editor: An array containing editor properties as returned from hook_editor().
Return value
The installed editor version.
1 string reference to 'wysiwyg_wymeditor_version'
- wysiwyg_wymeditor_editor in editors/
wymeditor.inc - Plugin implementation of hook_editor().
File
- editors/
wymeditor.inc, line 53 - Editor integration functions for WYMeditor.
Code
function wysiwyg_wymeditor_version($editor) {
$script = $editor['library path'] . '/jquery.wymeditor.js';
if (!file_exists($script)) {
return;
}
$script = fopen($script, 'r');
fgets($script);
$line = fgets($script);
if (preg_match('@version\\s+([0-9a-z\\.-]+)@', $line, $version)) {
fclose($script);
return $version[1];
}
fclose($script);
}