plugin_child [line 314]
void plugin_child(
string $p_child
)
|
|
Allows a plugin to declare a 'child plugin' that can be loaded from the same parent directory.
Parameters:
|
string |
$p_child: |
Child plugin basename. |
plugin_config_defaults [line 204]
void plugin_config_defaults(
array $p_options
)
|
|
Set plugin default values to global values without overriding anything.
Parameters:
|
array |
$p_options: |
Array of configuration option name/value pairs. |
plugin_config_delete [line 193]
void plugin_config_delete(
string $p_option, [int $p_user = ALL_USERS], [int $p_project = ALL_PROJECTS]
)
|
|
Delete a plugin configuration option from the database.
Parameters:
|
string |
$p_option: |
Configuration option name |
|
int |
$p_user: |
User ID |
|
int |
$p_project: |
Project ID |
plugin_config_get [line 161]
void plugin_config_get(
string $p_option, [multi $p_default = null], [ $p_global = false]
)
|
|
Get a plugin configuration option.
Parameters:
|
string |
$p_option: |
Configuration option name |
|
multi |
$p_default: |
Default option value |
|
|
$p_global: |
|
plugin_config_set [line 180]
void plugin_config_set(
string $p_option, multi $p_value, [int $p_user = NO_USER], [int $p_project = ALL_PROJECTS], [int $p_access = ADMINISTRATOR]
)
|
|
Set a plugin configuration option in the database.
Parameters:
|
string |
$p_option: |
Configuration option name |
|
multi |
$p_value: |
Option value |
|
int |
$p_user: |
User ID |
|
int |
$p_project: |
Project ID |
|
int |
$p_access: |
Access threshold |
plugin_dependency [line 420]
integer plugin_dependency(
string $p_basename, string $p_required, [ $p_initialized = false]
)
|
|
Check a plugin dependency given a basename and required version.
Versions are checked using PHP's library version_compare routine and allows both minimum and maximum version requirements. Returns 1 if plugin dependency is met, 0 if dependency not met, or -1 if dependency is the wrong version.
Parameters:
|
string |
$p_basename: |
Plugin basename |
|
string |
$p_required: |
Required version |
|
|
$p_initialized: |
|
API Tags:
| Return: | Plugin dependency status |
plugin_error [line 256]
void plugin_error(
string $p_error_name, [int $p_error_type = ERROR], [string $p_basename = null]
)
|
|
Trigger a plugin-specific error with the given name and type.
Parameters:
|
string |
$p_error_name: |
Error name |
|
int |
$p_error_type: |
Error type |
|
string |
$p_basename: |
Plugin basename |
plugin_event_hook [line 281]
void plugin_event_hook(
string $p_name, string $p_callback
)
|
|
Hook a plugin's callback function to an event.
Parameters:
|
string |
$p_name: |
Event name |
|
string |
$p_callback: |
Callback function |
plugin_event_hook_many [line 290]
void plugin_event_hook_many(
array $p_hooks
)
|
|
Hook multiple plugin callbacks at once.
Parameters:
|
array |
$p_hooks: |
Array of event name/callback key/value pairs |
plugin_file [line 107]
void plugin_file(
string $p_file, [string $p_redirect = false], [ $p_basename = null]
)
|
|
Get the URL to the plugin wrapper page.
Parameters:
|
string |
$p_file: |
Page name |
|
string |
$p_redirect: |
Plugin basename (defaults to current plugin) |
|
|
$p_basename: |
|
plugin_file_include [line 125]
void plugin_file_include(
string $p_filename, [string $p_basename = null]
)
|
|
Include the contents of a file as output.
Parameters:
|
string |
$p_filename: |
File name |
|
string |
$p_basename: |
Plugin basename |
plugin_file_path [line 94]
mixed plugin_file_path(
string $p_filename, string $p_basename
)
|
|
Return a path to a plugin file.
Parameters:
|
string |
$p_filename: |
File name |
|
string |
$p_basename: |
Plugin basename |
API Tags:
| Return: | File path or false if FNF |
plugin_find_all [line 637]
Search the plugins directory for plugins.
API Tags:
| Return: | Plugin basename/info key/value pairs. |
plugin_get_current [line 47]
string plugin_get_current(
)
|
|
Get the currently executing plugin's basename.
API Tags:
| Return: | Plugin basename, or null if no current plugin |
plugin_history_log [line 238]
void plugin_history_log(
$p_bug_id, $p_field_name, $p_old_value, [ $p_new_value = ''], [ $p_user_id = null], [ $p_basename = null]
)
|
|
Parameters:
|
|
$p_bug_id: |
|
|
|
$p_field_name: |
|
|
|
$p_old_value: |
|
|
|
$p_new_value: |
|
|
|
$p_user_id: |
|
|
|
$p_basename: |
|
plugin_include [line 665]
void plugin_include(
string $p_basename, [ $p_child = null]
)
|
|
Load a plugin's core class file.
Parameters:
|
string |
$p_basename: |
Plugin basename |
|
|
$p_child: |
|
plugin_init [line 797]
boolean plugin_init(
string $p_basename
)
|
|
Initialize a single plugin.
Parameters:
|
string |
$p_basename: |
Plugin basename |
API Tags:
| Return: | True if plugin initialized, false otherwise. |
plugin_init_installed [line 752]
void plugin_init_installed(
)
|
|
Initialize all installed plugins.
Post-signals EVENT_PLUGIN_INIT.
plugin_install [line 500]
void plugin_install(
string $p_plugin
)
|
|
Install a plugin to the database.
Parameters:
|
string |
$p_plugin: |
Plugin basename |
plugin_is_installed [line 488]
void plugin_is_installed(
string $p_basename
)
|
|
Determine if a given plugin is installed.
Parameters:
|
string |
$p_basename: |
Plugin basename |
plugin_lang_get [line 226]
string plugin_lang_get(
string $p_name, [string $p_basename = null]
)
|
|
Get a language string for the plugin.
Automatically prepends plugin_<basename> to the string requested.
Parameters:
|
string |
$p_name: |
Language string name |
|
string |
$p_basename: |
Plugin basename |
API Tags:
plugin_needs_upgrade [line 535]
boolean plugin_needs_upgrade(
string $p_plugin
)
|
|
Determine if an installed plugin needs to upgrade its schema.
Parameters:
|
string |
$p_plugin: |
Plugin basename |
API Tags:
| Return: | True if plugin needs schema ugrades. |
plugin_page [line 75]
void plugin_page(
string $p_page, [string $p_redirect = false], [ $p_basename = null]
)
|
|
Get the URL to the plugin wrapper page.
Parameters:
|
string |
$p_page: |
Page name |
|
string |
$p_redirect: |
Plugin basename (defaults to current plugin) |
|
|
$p_basename: |
|
plugin_pop_current [line 65]
string plugin_pop_current(
)
|
|
Remove the current plugin from the stack
API Tags:
| Return: | Plugin basename, or null if no current plugin |
plugin_priority [line 471]
int plugin_priority(
string $p_basename
)
|
|
Gets a plugin's priority.
Parameters:
|
string |
$p_basename: |
Plugin basename |
API Tags:
plugin_protected [line 455]
boolean plugin_protected(
string $p_basename
)
|
|
Checks to see if a plugin is 'protected' from uninstall.
Parameters:
|
string |
$p_basename: |
Plugin basename |
API Tags:
| Return: | True if plugin is protected |
plugin_push_current [line 56]
void plugin_push_current(
string $p_basename
)
|
|
Add the current plugin to the stack
Parameters:
|
string |
$p_basename: |
Plugin basename |
plugin_register [line 687]
void plugin_register(
string $p_basename, [ $p_return = false], [ $p_child = null]
)
|
|
Register a plugin with MantisBT.
The plugin class must already be loaded before calling.
Parameters:
|
string |
$p_basename: |
Plugin classname without 'Plugin' postfix |
|
|
$p_return: |
|
|
|
$p_child: |
|
plugin_register_installed [line 732]
void plugin_register_installed(
)
|
|
Find and register all installed plugins.
plugin_table [line 147]
string plugin_table(
string $p_name, [string $p_basename = null]
)
|
|
Given a base table name for a plugin, add appropriate prefix and suffix.
Convenience for plugin schema definitions.
Parameters:
|
string |
$p_name: |
Table name |
|
string |
$p_basename: |
Plugin basename (defaults to current plugin) |
API Tags:
plugin_uninstall [line 613]
void plugin_uninstall(
string $p_plugin
)
|
|
Uninstall a plugin from the database.
Parameters:
|
string |
$p_plugin: |
Plugin basename |
plugin_upgrade [line 555]
multi plugin_upgrade(
string $p_plugin
)
|
|
Upgrade an installed plugin's schema.
Parameters:
|
string |
$p_plugin: |
Plugin basename |
API Tags:
| Return: | True if upgrade completed, null if problem |
plugin_version_array [line 333]
array plugin_version_array(
string $p_version
)
|
|
Converts a version string to an array, using some punctuation and number/lettor boundaries as splitting points.
Parameters:
|
string |
$p_version: |
Version string |
API Tags:
plugin_version_check [line 360]
void plugin_version_check(
array $p_version1, array $p_version2, [boolean $p_maximum = false]
)
|
|
Checks two version arrays sequentially for minimum or maximum version dependencies.
Parameters:
|
array |
$p_version1: |
Version array to check |
|
array |
$p_version2: |
Version array required |
|
boolean |
$p_maximum: |
Minimum (false) or maximum (true) version check |