| @@ -9,10 +9,8 @@ | ||
| 9 | 9 | require_once 'Level_One_Module.php'; |
| 10 | 10 | require_once 'Level_Two_Module.php'; |
| 11 | 11 | |
| 12 | 12 | class Lightroom extends OAuth2 implements Level_One_Module, Level_Two_Module { |
| 13 | - private static $instance = null; | |
| 14 | - | |
| 15 | 13 | protected function __construct() { |
| 16 | 14 | parent::__construct(); |
| 17 | 15 | global $photonic_google_client_secret, $photonic_google_refresh_token; |
| 18 | 16 | |
| @@ -59,9 +57,12 @@ | ||
| 59 | 57 | 'client_id' => $this->client_id, |
| 60 | 58 | 'client_secret' => $this->client_secret, |
| 61 | 59 | 'refresh_token' => $refresh_token, |
| 62 | 60 | 'grant_type' => 'refresh_token' |
| 63 | - ] | |
| 61 | + ], | |
| 62 | + $this->user_agent, | |
| 63 | + 90, | |
| 64 | + PHOTONIC_SSL_VERIFY | |
| 64 | 65 | ); |
| 65 | 66 | |
| 66 | 67 | if (!is_wp_error($response)) { |
| 67 | 68 | $token = $this->parse_token($response); |
| @@ -69,9 +70,9 @@ | ||
| 69 | 70 | $token['client_id'] = $this->client_id; |
| 70 | 71 | } |
| 71 | 72 | set_transient('photonic_' . $this->provider . '_token', $token, $token['oauth_token_expires']); |
| 72 | 73 | if (empty($token)) { |
| 73 | - $error = print_r(wp_remote_retrieve_body($response), true); | |
| 74 | + $error = print_r(wp_remote_retrieve_body($response), true); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_print_r | |
| 74 | 75 | } |
| 75 | 76 | } |
| 76 | 77 | else { |
| 77 | 78 | $error = $response->get_error_message(); |
| @@ -93,8 +94,8 @@ | ||
| 93 | 94 | public function build_level_1_objects($response, array $short_code, $module_parameters = [], $options = []): array { |
| 94 | 95 | return []; |
| 95 | 96 | } |
| 96 | 97 | |
| 97 | - public function build_level_2_objects($objects_or_response, array $short_code, array $filter_list = [], array &$options = [], ?Pagination &$pagination = null): array { | |
| 98 | + public function build_level_2_objects($objects_or_response, array $short_code, array $filter_list = [], array $options = [], ?Pagination &$pagination = null): array { | |
| 98 | 99 | return []; |
| 99 | 100 | } |
| 100 | 101 | } |