Changes between Version 4 and Version 5 of Doc_Plugins
- Timestamp:
- Feb 19, 2009 2:34:21 AM (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Doc_Plugins
v4 v5 47 47 function init() 48 48 { 49 $this->add_hook('message -body-after', array($this, 'replace'));49 $this->add_hook('message_part_after', array($this, 'replace')); 50 50 51 51 $this->map = array( … … 71 71 * The plugin class should be preceded by a comment block that describes the plugin. 72 72 * If your plugin is meant to only run in a certain task (e.g. mail,addressbook,settings) you should specify a public property {{{$task}}}. If this property is set the plugin will only be activated within that specific task in order to save memory and performance in all the other tasks. 73 * The method {{{init()}}} is mandatory and first links the hook ''message -body-after'' to the object method {{{replace}}}.73 * The method {{{init()}}} is mandatory and first links the hook ''message_part_after'' to the object method {{{replace}}}. 74 74 * The callback method {{{replace}}} receives one argument containing context-specific data. In this example we first check if the message type is {{{plain}}} and then the {{{body}}} field is altered and returned. The plugin API will replace the returned fields in it's original context. 75 75
