You are here

function wysiwyg_jwysiwyg_version in Wysiwyg 6

Same name and namespace in other branches
  1. 5.2 editors/jwysiwyg.inc \wysiwyg_jwysiwyg_version()
  2. 5 editors/jwysiwyg.inc \wysiwyg_jwysiwyg_version()
  3. 6.2 editors/jwysiwyg.inc \wysiwyg_jwysiwyg_version()
  4. 7.2 editors/jwysiwyg.inc \wysiwyg_jwysiwyg_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_jwysiwyg_version'
wysiwyg_jwysiwyg_editor in editors/jwysiwyg.inc
Plugin implementation of hook_editor().

File

editors/jwysiwyg.inc, line 45

Code

function wysiwyg_jwysiwyg_version($editor) {
  $script = wysiwyg_get_path('jwysiwyg') . '/jquery.wysiwyg.js';
  $script = fopen($script, 'r');
  fgets($script);
  $line = fgets($script);
  if (preg_match('@([0-9\\.]+)$@', $line, $version)) {
    fclose($script);
    return $version[1];
  }
}