From 1895eca0dfef4b94f23f6e8347447789b6a3615b Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Tue, 4 Jun 2019 15:36:32 +0200 Subject: [PATCH] Implement stat indicator for fw header avatar --- api/src/Framework.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/api/src/Framework.php b/api/src/Framework.php index 903026f06b..72f23d691a 100644 --- a/api/src/Framework.php +++ b/api/src/Framework.php @@ -634,9 +634,12 @@ abstract class Framework extends Framework\Extra */ protected static function _user_avatar_menu() { + $stat = array_pop(Hooks::process('framework_avatar_stat')); + return ''; + )).'"/>'. + ''.$stat['body'].''; } /** @@ -1182,7 +1185,7 @@ abstract class Framework extends Framework\Extra { $this->_add_topmenu_info_item(self::_get_notification_bell(), 'notifications'); } - $this->_add_topmenu_info_item($this->_user_avatar_menu(), 'user_avatar'); + if (is_array(($current_user = $this->_current_users()))) $this->_add_topmenu_item($current_user); $this->_add_topmenu_info_item($vars['quick_add'], 'quick_add'); $this->_add_topmenu_info_item($this->_print_menu(), 'print_title');