function editor_plugin_create in Editor 6
Same name and namespace in other branches
- 5 editor.module \editor_plugin_create()
Create a plugin object.
@returns object
Parameters
string $pid : A unique identifier. This may be something similar to 'align_left', 'image', or 'link'.
string $name : A human readable string which should be wrapped in t().
string $type : A plugin type ptid.
string $description : (optional) Description wrapped in t().
string $options : (optional) Markup which is displayed within the options panel.
array $theme_args : (optional) An array of arguments which will be passed to the theme function.
array $dependencies : (optional) An array of plugins to which this plugin is dependant of.
1 call to editor_plugin_create()
- editor_editor_plugins in ./
editor.plugins.inc - Default core and popular module supported plugins.
File
- ./
editor.module, line 328 - Extendable WYSIWYG editor @author Tj Holowaychuk <http://www.350designs.com/> @package Editor
Code
function editor_plugin_create($pid, $name, $type, $description = '', $options = array(), $theme_args = array(), $dependencies = array()) {
$plugin = new stdClass();
$plugin->pid = $pid;
$plugin->name = $name;
$plugin->type = $type;
$plugin->description = $description;
$plugin->options = $options;
$plugin->theme_args = $theme_args;
$plugin->dependencies = $dependencies;
return $plugin;
}