function _wysiwyg_tinymce_plugin_name in Wysiwyg 7.2
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()
- 6 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 1126 - Editor integration functions for TinyMCE.
Code
function _wysiwyg_tinymce_plugin_name($op, $name) {
if ($op == 'add') {
if (strpos($name, '-') !== 0) {
return '-' . $name;
}
return $name;
}
elseif ($op == 'remove') {
if (strpos($name, '-') === 0) {
return substr($name, 1);
}
return $name;
}
}