function wysiwyg_markitup_version in Wysiwyg 5
Same name and namespace in other branches
- 5.2 editors/markitup.inc \wysiwyg_markitup_version()
- 6.2 editors/markitup.inc \wysiwyg_markitup_version()
- 6 editors/markitup.inc \wysiwyg_markitup_version()
- 7.2 editors/markitup.inc \wysiwyg_markitup_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_markitup_version'
- wysiwyg_markitup_editor in editors/
markitup.inc - Plugin implementation of hook_editor().
File
- editors/
markitup.inc, line 52 - Editor integration functions for markItUp.
Code
function wysiwyg_markitup_version($editor) {
$changelog = wysiwyg_get_path('markitup/markitup') . '/readme.txt';
$changelog = fopen($changelog, 'r');
$line = fgets($changelog);
if (preg_match('@([0-9\\.]+)@', $line, $version)) {
fclose($changelog);
return $version[1];
}
fclose($changelog);
}