aboutsummaryrefslogtreecommitdiffstats
path: root/include/channel.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-05-14 23:10:20 -0700
committerzotlabs <mike@macgirvin.com>2018-05-14 23:10:20 -0700
commit803e85caeb959c730fcb69135aa2ccd55bea751b (patch)
treeffe5513789a6d8cfe87807ee8c82149a5dcaae62 /include/channel.php
parent062dea8e13ddafb1ff466d4a1c4a262d1e525e55 (diff)
downloadvolse-hubzilla-803e85caeb959c730fcb69135aa2ccd55bea751b.tar.gz
volse-hubzilla-803e85caeb959c730fcb69135aa2ccd55bea751b.tar.bz2
volse-hubzilla-803e85caeb959c730fcb69135aa2ccd55bea751b.zip
make get_default_profile_photo() pluggable
Diffstat (limited to 'include/channel.php')
-rw-r--r--include/channel.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/channel.php b/include/channel.php
index 42a392e8e..1a62dcd3c 100644
--- a/include/channel.php
+++ b/include/channel.php
@@ -1776,6 +1776,17 @@ function get_default_profile_photo($size = 300) {
if(! $scheme)
$scheme = 'rainbow_man';
+ if(! is_dir('images/default_profile_photos/' . $scheme)) {
+ $x = [ 'scheme' => $scheme, 'size' => $size, 'url' => '' ];
+ call_hooks('default_profile_photo',$x);
+ if($x['url']) {
+ return $x['url'];
+ }
+ else {
+ $scheme = 'rainbow_man';
+ }
+ }
+
return 'images/default_profile_photos/' . $scheme . '/' . $size . '.png';
}