Elgg  Version master
set_priority.php
Go to the documentation of this file.
1 <?php
13 $plugin_guid = (int) get_input('plugin_guid');
14 $priority = get_input('priority');
15 
17 
18 if (!$plugin instanceof ElggPlugin) {
19  return elgg_error_response(elgg_echo('admin:plugins:set_priority:no', [$plugin_guid]));
20 }
21 
22 if ($plugin->setPriority($priority) === false) {
23  return elgg_error_response(elgg_echo('admin:plugins:set_priority:no', [$plugin->getDisplayName()]));
24 }
25 
27 
28 return elgg_ok_response();
$plugin_guid
Changes the load priority of a plugin.
$plugin
Plugin class containing helper functions for plugin activation/deactivation, dependency checking capa...
Definition: ElggPlugin.php:17
elgg_ok_response($content= '', string|array $message= '', string $forward_url=null, int $status_code=ELGG_HTTP_OK)
Prepares a successful response to be returned by a page or an action handler.
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
Definition: languages.php:17
get_input(string $variable, $default=null, bool $filter_result=true)
Parameter input functions.
Definition: input.php:20
elgg_invalidate_caches()
Invalidate all the registered caches.
Definition: cache.php:88
elgg_error_response(string|array $message= '', string $forward_url=REFERRER, int $status_code=ELGG_HTTP_BAD_REQUEST)
Prepare an error response to be returned by a page or an action handler.
get_entity(int $guid)
Loads and returns an entity object from a guid.
Definition: entities.php:70
$priority