PHP Class Jetpack_Core_API_Data, jetpack

Since: 4.3.0
Since: 4.4.0 Renamed Jetpack_Core_API_Module_Endpoint from to Jetpack_Core_API_Data.
Author: Automattic
Inheritance: extends Jetpack_Core_API_XMLRPC_Consumer_Endpoint
Datei anzeigen Open project: automattic/jetpack

Public Methods

Method Description
can_request ( WP_REST_Request $request ) : boolean Check if user is allowed to perform the update.
get_module ( WP_REST_Request $data ) : mixed | void | WP_Error Get information about a specific and valid Jetpack module.
process ( WP_REST_Request $data ) : boolean | mixed | void | WP_Error Process request by returning the module or updating it.
update_data ( WP_REST_Request $data ) : boolean | WP_Error If it's a valid Jetpack module and configuration parameters have been sent, update it.

Private Methods

Method Description
_process_post_by_email ( string $endpoint, string $error ) : array Calls WPCOM through authenticated request to create, regenerate or delete the Post by Email address.

Method Details

can_request() public method

Check if user is allowed to perform the update.
Since: 4.3.0
public can_request ( WP_REST_Request $request ) : boolean
$request WP_REST_Request
return boolean

get_module() public method

Get information about a specific and valid Jetpack module.
Since: 4.3.0
public get_module ( WP_REST_Request $data ) : mixed | void | WP_Error
$data WP_REST_Request { Array of parameters received by request. @type string $slug Module slug. }
return mixed | void | WP_Error

process() public method

Process request by returning the module or updating it.
Since: 4.3.0
public process ( WP_REST_Request $data ) : boolean | mixed | void | WP_Error
$data WP_REST_Request
return boolean | mixed | void | WP_Error

update_data() public method

If it's a valid Jetpack module and configuration parameters have been sent, update it.
Since: 4.3.0
public update_data ( WP_REST_Request $data ) : boolean | WP_Error
$data WP_REST_Request { Array of parameters received by request. @type string $slug Module slug. }
return boolean | WP_Error True if module was updated. Otherwise, a WP_Error instance with the corresponding error.