PluginProbe
Extendify / 3.1.5
Extendify v3.1.5
3.2.0 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.6 3.0.5 3.0.4 trunk 0.1.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.2.0 0.3.0 0.3.1 0.4.0 0.5.0 0.6.0 0.7.0 All 126 releases
extendify / app / Shared / Controllers / DataController.php

DataController.php in Extendify 3.1.5, at app/Shared/Controllers/DataController.php

46 lines 927 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Data Controller
5 */
6
7 namespace Extendify\Shared\Controllers;
8
9 use Extendify\Constants;
10 use Extendify\Shared\Services\HttpClient;
11 use Extendify\PartnerData;
12
13 defined('ABSPATH') || die('No direct access.');
14
15 /**
16 * The controller for handling general data
17 */
18
19 class DataController
20 {
21 /**
22 * Get Partner Plugins information.
23 *
24 * @return \WP_REST_Response
25 */
26 public static function getPartnerPlugins()
27 {
28 $response = HttpClient::get(
29 Constants::DASHBOARD_HOST . '/api/onboarding/partner-plugins',
30 ['params' => ['partner' => PartnerData::$id]]
31 );
32
33 return new \WP_REST_Response($response['response'], $response['code']);
34 }
35
36 /**
37 * Just here to check for 200 (vs server rate limiting)
38 *
39 * @return \WP_REST_Response
40 */
41 public static function ping()
42 {
43 return new \WP_REST_Response(true, 200);
44 }
45 }
46