Skip to content

Commit

Permalink
API: Jetpack: API: Updates /sites/%s/jetpack/modules endpoints respon…
Browse files Browse the repository at this point in the history
…se format to add override (#8863)

Currently, it is possible to override the active modules in Jetpack and force some to be active or inactive. The issue with this is that our UI does not respond to that. So, while a module may be forced on, a user is shown UI that allows them to attempt to disable the module, except, when the page is refreshed, the module is still enabled.

See: #8836
See: #8800

Differential Revision: D10224-code

This commit syncs r170223-wpcom.
  • Loading branch information
ebinnion authored and dereksmart committed Feb 21, 2018
1 parent 5df5c2e commit b5f2e25
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion class.json-api-endpoints.php
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,8 @@ function cast_and_filter_item( &$return, $type, $key, $value, $types = array(),
'introduced' => '(string) The Jetpack version when the module was introduced.',
'changed' => '(string) The Jetpack version when the module was changed.',
'free' => '(boolean) The module\'s Free or Paid status.',
'module_tags' => '(array) The module\'s tags.'
'module_tags' => '(array) The module\'s tags.',
'override' => '(string) The module\'s override. Empty if no override, otherwise \'active\' or \'inactive\'',
);
$return[$key] = (object) $this->cast_and_filter(
$value,
Expand Down

0 comments on commit b5f2e25

Please sign in to comment.