forked from opencad-community/OpenCAD-php
-
Notifications
You must be signed in to change notification settings - Fork 0
/
oc-functions.php
32 lines (28 loc) · 984 Bytes
/
oc-functions.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
/**
Open source CAD system for RolePlaying Communities.
Copyright (C) 2017 Shane Gill
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program comes with ABSOLUTELY NO WARRANTY; Use at your own risk.
**/
/** Provides support for enviorments running PHP < 5.5 */
if (version_compare(PHP_VERSION, '5.5', '<' )) {
require_once(ABSPATH . 'vendors/password_compat/password.php');
}
/**
* @source https://gravatar.com/site/implement/images/php/
*/
function get_avatar() {
if (defined( 'USE_GRAVATAR' ) && USE_GRAVATAR) {
$url = 'https://www.gravatar.com/avatar/';
$url .= md5( strtolower( trim( $_SESSION['email'] ) ) );
$url .= "?size=200&default=https://i.imgur.com/VN4YCW7.png";
return $url;
}else{
return "https://i.imgur.com/VN4YCW7.png";
}
}
?>