30 if (
elgg_extract(
'segments', $current_route->getMatchedParameters()) !==
'plugins' && $current_route->getName() !==
'admin:plugin_settings') {
36 if (empty($active_plugins)) {
41 $plugins_with_settings = [];
43 foreach ($active_plugins as
$plugin) {
52 'name' =>
"plugin:settings:{$plugin_id}",
57 'section' =>
'plugin_settings',
61 if (empty($plugins_with_settings)) {
66 $return = $event->getValue();
68 ksort($plugins_with_settings);
70 foreach ($plugins_with_settings as $plugin_item) {
93 $return = $event->getValue();
96 'name' =>
'1_account',
97 'text' =>
elgg_echo(
'usersettings:user:opt:linktext'),
99 'username' =>
$user->username,
101 'section' =>
'configure',
105 'name' =>
'1_notifications',
106 'text' =>
elgg_echo(
'usersettings:notifications:menu:page'),
108 'username' =>
$user->username,
110 'section' =>
'configure',
114 'name' =>
'1_statistics',
115 'text' =>
elgg_echo(
'usersettings:statistics:opt:linktext'),
117 'username' =>
$user->username,
119 'section' =>
'configure',
127 'username' =>
$user->username,
129 'section' =>
'configure',
150 $return = $event->getValue();
153 'name' =>
'1_plugins',
154 'text' =>
elgg_echo(
'usersettings:plugins:opt:linktext'),
156 'section' =>
'configure',
157 'show_with_empty_children' =>
false,
161 foreach ($active_plugins as
$plugin) {
176 'username' =>
$user->username,
179 'parent_name' =>
'1_plugins',
180 'section' =>
'configure',
$plugin_id
Remove all user and plugin settings from the give plugin ID.
if(! $plugin instanceof \ElggPlugin||! $plugin->isActive()) $plugin_name
Models an event passed to event handlers.
elgg_get_config(string $name, $default=null)
Get an Elgg configuration value.
elgg_in_context(string $context)
Check if this context exists anywhere in the stack.
elgg_extract($key, $array, $default=null, bool $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
elgg_get_plugins(string $status='active')
Returns an ordered list of plugins.
elgg_language_key_exists(string $key, string $language='en')
Check if a given language key exists.
elgg_echo(string $message_key, array $args=[], string $language='')
Elgg language module Functions to manage language and translations.
elgg_view_exists(string $view, string $viewtype='', bool $recurse=true)
Returns whether the specified view exists.
elgg_get_current_route()
Get the route for the current request.
elgg_generate_url(string $name, array $parameters=[])
Generate a URL for named route.
elgg_get_page_owner_entity()
Gets the owner entity for the current page.
elgg_is_admin_logged_in()
Returns whether or not the viewer is currently logged in and an admin user.