메소드 | 설명 | |
---|---|---|
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. } |
리턴 | boolean | WP_Error | True if module was activated. Otherwise, a WP_Error instance with the corresponding error. |
public can_request ( ) : boolean | ||
리턴 | 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. } |
리턴 | 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. } |
리턴 | WP_REST_Response | WP_Error | A REST response if the request was served successfully, otherwise an error. |