summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYury German <blueknight@gentoo.org>2019-04-28 17:39:03 -0400
committerYury German <blueknight@gentoo.org>2019-04-28 17:39:03 -0400
commit2ab16973706e120bc344c83be6295b54fd908c57 (patch)
tree358267a52d9542c77c90e3663cea32d13b8cb639 /plugins/jetpack/json-endpoints/class.wpcom-json-api-get-site-endpoint.php
parentUpdate twentysixteen 1.7 (diff)
downloadblogs-gentoo-2ab16973706e120bc344c83be6295b54fd908c57.tar.gz
blogs-gentoo-2ab16973706e120bc344c83be6295b54fd908c57.tar.bz2
blogs-gentoo-2ab16973706e120bc344c83be6295b54fd908c57.zip
Updating packages for 5.1.1
Signed-off-by: Yury German <blueknight@gentoo.org>
Diffstat (limited to 'plugins/jetpack/json-endpoints/class.wpcom-json-api-get-site-endpoint.php')
-rw-r--r--plugins/jetpack/json-endpoints/class.wpcom-json-api-get-site-endpoint.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/plugins/jetpack/json-endpoints/class.wpcom-json-api-get-site-endpoint.php b/plugins/jetpack/json-endpoints/class.wpcom-json-api-get-site-endpoint.php
index c7dbcb24..a7868dea 100644
--- a/plugins/jetpack/json-endpoints/class.wpcom-json-api-get-site-endpoint.php
+++ b/plugins/jetpack/json-endpoints/class.wpcom-json-api-get-site-endpoint.php
@@ -50,6 +50,7 @@ class WPCOM_JSON_API_GET_Site_Endpoint extends WPCOM_JSON_API_Endpoint {
'jetpack_modules' => '(array) A list of active Jetpack modules.',
'meta' => '(object) Meta data',
'quota' => '(array) An array describing how much space a user has left for uploads',
+ 'launch_status' => '(string) A string describing the launch status of a site',
);
protected static $no_member_fields = array(
@@ -68,6 +69,7 @@ class WPCOM_JSON_API_GET_Site_Endpoint extends WPCOM_JSON_API_Endpoint {
'is_private',
'is_following',
'meta',
+ 'launch_status',
);
protected static $site_options_format = array(
@@ -125,7 +127,7 @@ class WPCOM_JSON_API_GET_Site_Endpoint extends WPCOM_JSON_API_Endpoint {
'has_pending_automated_transfer',
'woocommerce_is_active',
'design_type',
- 'site_goals'
+ 'site_goals',
);
protected static $jetpack_response_field_additions = array(
@@ -353,9 +355,8 @@ class WPCOM_JSON_API_GET_Site_Endpoint extends WPCOM_JSON_API_Endpoint {
$response[ $key ] = $this->site->get_capabilities();
break;
case 'jetpack_modules':
- $jetpack_modules = $this->site->get_jetpack_modules();
- if ( ! is_null( $jetpack_modules ) ) {
- $response[ $key ] = $jetpack_modules;
+ if ( is_user_member_of_blog() ) {
+ $response[ $key ] = $this->site->get_jetpack_modules();
}
break;
case 'plan' :
@@ -364,6 +365,9 @@ class WPCOM_JSON_API_GET_Site_Endpoint extends WPCOM_JSON_API_Endpoint {
case 'quota' :
$response[ $key ] = $this->site->get_quota();
break;
+ case 'launch_status' :
+ $response[ $key ] = $this->site->get_launch_status();
+ break;
}
do_action( 'post_render_site_response_key', $key );