PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 12.9.5
Jetpack – WP Security, Backup, Speed, & Growth v12.9.5
16.3-a.5 16.3-a.7 16.3-a.3 16.3-a.1 16.2 16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 13.7.2 13.8.3 All 506 releases
jetpack / json-endpoints / jetpack / class.jetpack-json-api-plugins-get-endpoint.php

class.jetpack-json-api-plugins-get-endpoint.php in Jetpack – WP Security, Backup, Speed, & Growth 12.9.5, at json-endpoints/jetpack/class.jetpack-json-api-plugins-get-endpoint.php

44 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
2
3 /**
4 * JSON API plugins get endpoint.
5 */
6 new Jetpack_JSON_API_Plugins_Get_Endpoint(
7 array(
8 'description' => 'Get the Plugin data.',
9 'method' => 'GET',
10 'path' => '/sites/%s/plugins/%s/',
11 'min_version' => '1',
12 'max_version' => '1.1',
13 'stat' => 'plugins:1',
14 'path_labels' => array(
15 '$site' => '(int|string) The site ID, The site domain',
16 '$plugin' => '(string) The plugin ID',
17 ),
18 'allow_jetpack_site_auth' => true,
19 'response_format' => Jetpack_JSON_API_Plugins_Endpoint::$_response_format,
20 'example_request_data' => array(
21 'headers' => array(
22 'authorization' => 'Bearer YOUR_API_TOKEN',
23 ),
24 ),
25 'example_request' => 'https://public-api.wordpress.com/rest/v1/sites/example.wordpress.org/plugins/hello-dolly%20hello',
26 )
27 );
28
29 /**
30 * Plugins get endpoint class.
31 *
32 * GET /sites/%s/plugins/%s
33 *
34 * No v1.2 version since it is .com only
35 */
36 class Jetpack_JSON_API_Plugins_Get_Endpoint extends Jetpack_JSON_API_Plugins_Endpoint {
37 /**
38 * Needed capabilities.
39 *
40 * @var string
41 */
42 protected $needed_capabilities = 'activate_plugins';
43 }
44