function _wysiwyg_tinymce_plugin_name in Wysiwyg 6
Same name and namespace in other branches
- 5.2 editors/tinymce.inc \_wysiwyg_tinymce_plugin_name()
- 5 editors/tinymce.inc \_wysiwyg_tinymce_plugin_name()
- 6.2 editors/tinymce.inc \_wysiwyg_tinymce_plugin_name()
- 7.2 editors/tinymce.inc \_wysiwyg_tinymce_plugin_name()
Add or remove leading hiven to/of external plugin names.
TinyMCE requires that external plugins, which should not be loaded from its own plugin repository are prefixed with a hiven in the name.
Parameters
string $op: Operation to perform, 'add' or 'remove' (hiven).
string $name: A plugin name.
File
- editors/
tinymce.inc, line 325
Code
function _wysiwyg_tinymce_plugin_name($op, $name) {
if ($op == 'add') {
if (strpos($name, '-') !== 0) {
return '-' . $name;
}
return $name;
}
else {
if ($op == 'remove') {
if (strpos($name, '-') === 0) {
return substr($name, 1);
}
return $name;
}
}
}