PHP Class Jetpack_Core_API_Module_Data_Endpoint, jetpack

Datei anzeigen Open project: automattic/jetpack

Public Methods

Method Description
can_request ( ) : boolean A WordPress REST API permission callback method that accepts a request object and decides if the current user has enough privileges to act.
get_akismet_data ( ) : integer | string Get number of spam messages blocked by Akismet.
get_monitor_data ( ) : mixed | WP_Error Get date of last downtime.
get_protect_data ( ) : mixed | WP_Error Get number of blocked intrusion attempts.
get_stats_data ( WP_REST_Request $data ) : integer | string Get stats data for this site
get_vaultpress_data ( ) : mixed | WP_Error Get VaultPress site data including, among other things, the date of the last backup if it was completed.
get_verification_tools_data ( ) : mixed | WP_Error Get services that this site is verified with.
process ( $request )

Private Methods

Method Description
akismet_is_active_and_registered ( ) : boolean | WP_Error Is Akismet registered and active?

Method Details

can_request() public method

A WordPress REST API permission callback method that accepts a request object and decides if the current user has enough privileges to act.
Since: 4.3.0
public can_request ( ) : boolean
return boolean does a current user have enough privileges.

get_akismet_data() public method

Get number of spam messages blocked by Akismet.
Since: 4.3.0
public get_akismet_data ( ) : integer | string
return integer | string Number of spam blocked by Akismet. Otherwise, an error message.

get_monitor_data() public method

Get date of last downtime.
Since: 4.3.0
public get_monitor_data ( ) : mixed | WP_Error
return mixed | WP_Error Number of days since last downtime. Otherwise, a WP_Error instance with the corresponding error.

get_protect_data() public method

Get number of blocked intrusion attempts.
Since: 4.3.0
public get_protect_data ( ) : mixed | WP_Error
return mixed | WP_Error Number of blocked attempts if protection is enabled. Otherwise, a WP_Error instance with the corresponding error.

get_stats_data() public method

Get stats data for this site
Since: 4.1.0
public get_stats_data ( WP_REST_Request $data ) : integer | string
$data WP_REST_Request { Array of parameters received by request. @type string $date Date range to restrict results to. }
return integer | string Number of spam blocked by Akismet. Otherwise, an error message.

get_vaultpress_data() public method

Get VaultPress site data including, among other things, the date of the last backup if it was completed.
Since: 4.3.0
public get_vaultpress_data ( ) : mixed | WP_Error
return mixed | WP_Error VaultPress site data. Otherwise, a WP_Error instance with the corresponding error.

get_verification_tools_data() public method

Get services that this site is verified with.
Since: 4.3.0
public get_verification_tools_data ( ) : mixed | WP_Error
return mixed | WP_Error List of services that verified this site. Otherwise, a WP_Error instance with the corresponding error.

process() public method

public process ( $request )