← All changes
|
json-endpoints/jetpack/class.jetpack-json-api-plugins-list-endpoint.php
+8
-0
13.2.4
→
16.3-a.5
View file →
| @@ -1,11 +1,17 @@ | ||
| 1 | 1 | <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName |
| 2 | 2 | |
| 3 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 4 | + exit( 0 ); | |
| 5 | +} | |
| 6 | + | |
| 3 | 7 | new Jetpack_JSON_API_Plugins_List_Endpoint( |
| 4 | 8 | array( |
| 5 | 9 | 'description' => 'Get installed Plugins on your blog', |
| 6 | 10 | 'method' => 'GET', |
| 7 | 11 | 'path' => '/sites/%s/plugins', |
| 12 | + 'rest_route' => '/plugins', | |
| 13 | + 'rest_min_jp_version' => '15.9', | |
| 8 | 14 | 'stat' => 'plugins', |
| 9 | 15 | 'min_version' => '1', |
| 10 | 16 | 'max_version' => '1.1', |
| 11 | 17 | 'path_labels' => array( |
| @@ -29,8 +35,10 @@ | ||
| 29 | 35 | * |
| 30 | 36 | * GET /sites/%s/plugins |
| 31 | 37 | * |
| 32 | 38 | * No v1.2 versions since they are .com only |
| 39 | + * | |
| 40 | + * @phan-constructor-used-for-side-effects | |
| 33 | 41 | */ |
| 34 | 42 | class Jetpack_JSON_API_Plugins_List_Endpoint extends Jetpack_JSON_API_Plugins_Endpoint { |
| 35 | 43 | /** |
| 36 | 44 | * Needed capabilities. |