Method | Description | |
---|---|---|
activate_module ( string | WP_REST_Request $data ) : boolean | WP_Error | If it's a valid Jetpack module, activate it. | |
can_request ( ) : boolean | Check that the current user has permissions to manage Jetpack modules. | |
deactivate_module ( string | WP_REST_Request $data ) : boolean | WP_Error | If it's a valid Jetpack module, deactivate it. | |
process ( WP_REST_Request $data ) : WP_REST_Response | WP_Error | Check if the module requires the site to be publicly accessible from WPCOM. |
public activate_module ( string | WP_REST_Request $data ) : boolean | WP_Error | ||
$data | string | WP_REST_Request | { Array of parameters received by request. @type string $slug Module slug. } |
return | boolean | WP_Error | True if module was activated. Otherwise, a WP_Error instance with the corresponding error. |
public can_request ( ) : boolean | ||
return | boolean |
public deactivate_module ( string | WP_REST_Request $data ) : boolean | WP_Error | ||
$data | string | WP_REST_Request | { Array of parameters received by request. @type string $slug Module slug. } |
return | boolean | WP_Error | True if module was activated. Otherwise, a WP_Error instance with the corresponding error. |
public process ( WP_REST_Request $data ) : WP_REST_Response | WP_Error | ||
$data | WP_REST_Request | { Array of parameters received by request. @type string $slug Module slug. @type bool $active should module be activated. } |
return | WP_REST_Response | WP_Error | A REST response if the request was served successfully, otherwise an error. |