1 | <?php |
||
15 | class Utils { |
||
16 | |||
17 | /** |
||
18 | * Some hosts disable the OpenSSL extension and so cannot make outgoing HTTPS requests. |
||
19 | * This method sets the URL scheme to HTTP when HTTPS requests can't be made. |
||
20 | * |
||
21 | * @param string $url The url. |
||
22 | * @return string The url with the required URL scheme. |
||
23 | */ |
||
24 | public static function fix_url_for_bad_hosts( $url ) { |
||
38 | |||
39 | /** |
||
40 | * Enters a user token into the user_tokens option |
||
41 | * |
||
42 | * @param int $user_id The user id. |
||
43 | * @param string $token The user token. |
||
44 | * @param bool $is_master_user Whether the user is the master user. |
||
45 | * @return bool |
||
46 | */ |
||
47 | public static function update_user_token( $user_id, $token, $is_master_user ) { |
||
62 | } |
||
63 |