Difference between revisions of "PLG configChange"

From GeeklogWiki
Jump to: navigation, search
(PLG_configChange)
(No difference)

Revision as of 09:14, 29 March 2009

This API function informs plugins about configuration changes:

function PLG_configChange($group, $changes)

where $group is either 'Core' for changes in the core configuration (i.e. the global $_CONF array) or the name of the plugin. Note that plugins are only notified of changes in Core or their own configuration. Plugins will not be notified of changes in the configuration of other plugins.

$changes is an array of names of the config values that changed, i.e. keys of $_CONF or the plugin's own configuration array.

For example: For a plugin 'foo', a change in $_CONF['path'] and $_CONF['site_mail'] would result in a function call like this:

plugin_configchange_foo('Core', array('path', 'site_mail'));