aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/Apps.php
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Lib/Apps.php')
-rw-r--r--Zotlabs/Lib/Apps.php21
1 files changed, 19 insertions, 2 deletions
diff --git a/Zotlabs/Lib/Apps.php b/Zotlabs/Lib/Apps.php
index 497a9d299..00e65479e 100644
--- a/Zotlabs/Lib/Apps.php
+++ b/Zotlabs/Lib/Apps.php
@@ -419,11 +419,28 @@ class Apps {
static public function app_render($papp, $mode = 'view') {
$installed = false;
- if(! $papp)
+ if(!$papp) {
return;
+ }
+
+ /**
+ * @hooks app_render_before
+ * Hook to manipulate the papp array before rendering
+ */
- if(! $papp['photo'])
+ $hookinfo = [
+ 'name' => $papp['name'],
+ 'photo' => $papp['photo']
+ ];
+
+ call_hooks('app_render_manipulate_photo', $hookinfo);
+
+ // We will only allow to manipulate the photo
+ $papp['photo'] = $hookinfo['photo'];
+
+ if(!$papp['photo']) {
$papp['photo'] = 'icon:gear';
+ }
self::translate_system_apps($papp);