PHP Класс Jetpack_Core_API_Module_Data_Endpoint, jetpack

Показать файл Открыть проект

Открытые методы

Метод Описание
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 )

Приватные методы

Метод Описание
akismet_is_active_and_registered ( ) : boolean | WP_Error Is Akismet registered and active?

Описание методов

can_request() публичный Метод

A WordPress REST API permission callback method that accepts a request object and decides if the current user has enough privileges to act.
С версии: 4.3.0
public can_request ( ) : boolean
Результат boolean does a current user have enough privileges.

get_akismet_data() публичный Метод

Get number of spam messages blocked by Akismet.
С версии: 4.3.0
public get_akismet_data ( ) : integer | string
Результат integer | string Number of spam blocked by Akismet. Otherwise, an error message.

get_monitor_data() публичный Метод

Get date of last downtime.
С версии: 4.3.0
public get_monitor_data ( ) : mixed | WP_Error
Результат mixed | WP_Error Number of days since last downtime. Otherwise, a WP_Error instance with the corresponding error.

get_protect_data() публичный Метод

Get number of blocked intrusion attempts.
С версии: 4.3.0
public get_protect_data ( ) : mixed | WP_Error
Результат mixed | WP_Error Number of blocked attempts if protection is enabled. Otherwise, a WP_Error instance with the corresponding error.

get_stats_data() публичный Метод

Get stats data for this site
С версии: 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. }
Результат integer | string Number of spam blocked by Akismet. Otherwise, an error message.

get_vaultpress_data() публичный Метод

Get VaultPress site data including, among other things, the date of the last backup if it was completed.
С версии: 4.3.0
public get_vaultpress_data ( ) : mixed | WP_Error
Результат mixed | WP_Error VaultPress site data. Otherwise, a WP_Error instance with the corresponding error.

get_verification_tools_data() публичный Метод

Get services that this site is verified with.
С версии: 4.3.0
public get_verification_tools_data ( ) : mixed | WP_Error
Результат mixed | WP_Error List of services that verified this site. Otherwise, a WP_Error instance with the corresponding error.

process() публичный Метод

public process ( $request )