Conditions | 6 |
Paths | 2 |
Total Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
33 | private function wpApiBasicAuth() |
||
34 | { |
||
35 | // if the WP API basic auth plugin isn't already loaded, load it now. |
||
36 | // We want it for mobile apps. Just include the entire plugin |
||
37 | // also, don't load the basic auth when a plugin is getting activated, because |
||
38 | // it could be the basic auth plugin, and it doesn't check if its methods are already defined |
||
39 | // and causes a fatal error |
||
40 | if (($this->request->isWordPressApi() || $this->request->isApi()) |
||
41 | && ! $this->request->isActivation() |
||
42 | && ! function_exists('json_basic_auth_handler') |
||
43 | && ! function_exists('json_basic_auth_error') |
||
44 | ) { |
||
45 | include_once EE_THIRD_PARTY . 'wp-api-basic-auth/basic-auth.php'; |
||
46 | } |
||
47 | } |
||
48 | } |
||
49 |