function editor_plugin_create in Editor 5
Same name and namespace in other branches
- 6 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 $class : A plugin class pcid.
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 - Implementation of hook_editor_plugins();
File
- ./
editor.module, line 445 - Extendable WYSIWYG editor @author Tj Holowaychuk <tj@vision-media.ca> @link http://vision-media.ca @package Editor
Code
function editor_plugin_create($pid, $name, $class, $description = '', $options = array(), $theme_args = array(), $dependencies = array()) {
$plugin = new stdClass();
$plugin->pid = $pid;
$plugin->name = $name;
$plugin->class = $class;
$plugin->description = $description;
$plugin->options = $options;
$plugin->theme_args = $theme_args;
$plugin->dependencies = $dependencies;
return $plugin;
}