public static function visitor_setup(XenForo_Visitor &$visitor) { $options = $visitor->get('bdsocialshare_options'); if (!empty($options)) { $visitor['_bdSocialShare_options'] = bdSocialShare_Helper_Common::unserializeOrFalse($options); } else { $visitor['_bdSocialShare_options'] = array(); } $visitor['_bdSocialShare_canStaffShare'] = $visitor->hasPermission('general', 'bdSocialShare_staffShare'); }