Elgg  Version master
Functions
plugins.php File Reference

Go to the source code of this file.

Functions

 elgg_get_plugin_from_id (string $plugin_id)
 Elgg plugins library Contains functions for managing plugins. More...
 
 elgg_plugin_exists (string $plugin_id)
 Returns if a plugin exists in the system. More...
 
 elgg_is_active_plugin (string $plugin_id)
 Returns if a plugin is active for a current site. More...
 
 elgg_get_plugins (string $status= 'active')
 Returns an ordered list of plugins. More...
 
 elgg_get_plugin_user_setting (string $name, int $user_guid=0, string $plugin_id= '', $default=null)
 Get a user specific setting for a plugin. More...
 
 elgg_get_plugin_setting (string $name, string $plugin_id, $default=null)
 Get setting for a plugin. More...
 

Function Documentation

elgg_get_plugin_from_id ( string  $plugin_id)

Elgg plugins library Contains functions for managing plugins.

Returns an object with the path $path.

Parameters
string$plugin_idThe id (dir name) of the plugin. NOT the guid.
Returns
|null
Since
1.8.0

Definition at line 15 of file plugins.php.

elgg_get_plugin_setting ( string  $name,
string  $plugin_id,
  $default = null 
)

Get setting for a plugin.

Parameters
string$nameThe name of the setting.
string$plugin_idThe plugin ID (Required)
mixed$defaultThe default value to return if none is set
Returns
mixed
Since
1.8.0
See also
::getSetting()

Definition at line 91 of file plugins.php.

elgg_get_plugin_user_setting ( string  $name,
int  $user_guid = 0,
string  $plugin_id = '',
  $default = null 
)

Get a user specific setting for a plugin.

Parameters
string$nameThe name of the setting.
int$user_guidThe user GUID or 0 for the currently logged in user.
string$plugin_idThe plugin ID (Required)
mixed$defaultThe default value to return if none is set
Returns
mixed
Since
1.8.0
See also
::getPluginSetting()

Definition at line 71 of file plugins.php.

elgg_get_plugins ( string  $status = 'active')

Returns an ordered list of plugins.

Parameters
string$statusThe status of the plugins. active, inactive, or all.
Returns
[]
Since
1.8.0

Definition at line 55 of file plugins.php.

elgg_is_active_plugin ( string  $plugin_id)

Returns if a plugin is active for a current site.

Parameters
string$plugin_idThe plugin ID
Returns
bool
Since
1.8.0

Definition at line 43 of file plugins.php.

elgg_plugin_exists ( string  $plugin_id)

Returns if a plugin exists in the system.

Warning
This checks only plugins that are registered in the system! If the plugin cache is outdated, be sure to regenerate it with _elgg_generate_plugin_objects() first.
Parameters
string$plugin_idThe plugin ID.
Returns
bool
Since
1.8.0

Definition at line 31 of file plugins.php.