| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 19 | public function get($url) |
||
| 20 | { |
||
| 21 | $response = wp_remote_get($url, array( |
||
| 22 | 'headers' => array( |
||
| 23 | 'Accept: application/json', |
||
| 24 | ), |
||
| 25 | 'timeout' => $this->timeout, |
||
| 26 | )); |
||
| 27 | if (is_array($response)) { |
||
| 28 | $response = json_decode($response['body'], true); |
||
| 29 | return $response; |
||
| 30 | } |
||
| 31 | } |
||
| 32 | |||
| 50 |