PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.3-a.1
Jetpack – WP Security, Backup, Speed, & Growth v16.3-a.1
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 13.9.2 14.0.1 All 504 releases
← All changes | json-endpoints/class.wpcom-json-api-get-site-v1-2-endpoint.php +17 -0 12.0.3 → 16.3-a.1 View file →
@@ -1,6 +1,10 @@
1 1 <?php // phpcs:ignore WordPress.Files.FileName.InvalidClassFileName
2 2
3 +if ( ! defined( 'ABSPATH' ) ) {
4 + exit( 0 );
5 +}
6 +
3 7 new WPCOM_JSON_API_GET_Site_V1_2_Endpoint(
4 8 array(
5 9 'description' => 'Get information about a site.',
6 10 'group' => 'sites',
@@ -11,8 +15,10 @@
11 15 'path' => '/sites/%s',
12 16 'path_labels' => array(
13 17 '$site' => '(int|string) Site ID or domain',
14 18 ),
19 + 'rest_route' => '/site',
20 + 'rest_min_jp_version' => '15.9',
15 21
16 22 'allow_fallback_to_jetpack_blog_token' => true,
17 23
18 24 'query_parameters' => array(
@@ -27,8 +33,10 @@
27 33 );
28 34
29 35 /**
30 36 * GET Site v1_2 endpoint.
37 + *
38 + * @phan-constructor-used-for-side-effects
31 39 */
32 40 class WPCOM_JSON_API_GET_Site_V1_2_Endpoint extends WPCOM_JSON_API_GET_Site_Endpoint {
33 41
34 42 /**
@@ -73,8 +81,17 @@
73 81 'is_core_site_editor_enabled' => '(bool) If the site has the core site editor enabled.',
74 82 'is_wpcom_atomic' => '(bool) If the site is a WP.com Atomic one.',
75 83 'is_wpcom_staging_site' => '(bool) If the site is a WP.com staging site.',
76 84 'was_ecommerce_trial' => '(bool) If the site ever used an eCommerce trial.',
85 + 'was_upgraded_from_trial' => '(bool) If the site ever upgraded to a paid plan from a trial.',
86 + 'was_migration_trial' => '(bool) If the site ever used a migration trial.',
87 + 'was_hosting_trial' => '(bool) If the site ever used a hosting trial.',
88 + 'is_deleted' => '(bool) If the site flagged as deleted.',
89 + 'is_a4a_client' => '(bool) If the site is an A4A client site.',
90 + 'is_a4a_dev_site' => '(bool) If the site is an A4A dev site.',
91 + 'is_garden' => '(bool) If the site is a Garden site.',
92 + 'hosting_provider_guess' => '(string) Guess of the hosting provider. WordPress.com platform only; only returned when explicitly requested via the fields parameter.',
93 + 'environment_type' => '(string) The WP_ENVIRONMENT_TYPE of the site as synced by Jetpack. WordPress.com platform only; only returned when explicitly requested via the fields parameter.',
77 94 );
78 95
79 96 /**
80 97 *