[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-content/plugins/akismet/ -> class.akismet-rest-api.php (summary)

(no description)

File Size: 366 lines (11 kb)
Included or required: 1 time
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Akismet_REST_API:: (16 methods):
  init()
  get_key()
  set_key()
  delete_key()
  get_settings()
  set_boolean_settings()
  parse_boolean()
  get_stats()
  get_alert()
  set_alert()
  delete_alert()
  key_is_valid()
  privileged_permission_callback()
  remote_call_permission_callback()
  sanitize_interval()
  sanitize_key()


Class: Akismet_REST_API  - X-Ref

init()   X-Ref
Register the REST API routes.


get_key( $request = null )   X-Ref
Get the current Akismet API key.

return: WP_Error|WP_REST_Response
param: WP_REST_Request $request

set_key( $request )   X-Ref
Set the API key, if possible.

return: WP_Error|WP_REST_Response
param: WP_REST_Request $request

delete_key( $request )   X-Ref
Unset the API key, if possible.

return: WP_Error|WP_REST_Response
param: WP_REST_Request $request

get_settings( $request = null )   X-Ref
Get the Akismet settings.

return: WP_Error|WP_REST_Response
param: WP_REST_Request $request

set_boolean_settings( $request )   X-Ref
Update the Akismet settings.

return: WP_Error|WP_REST_Response
param: WP_REST_Request $request

parse_boolean( $value )   X-Ref
Parse a numeric or string boolean value into a boolean.

return: bool The converted value.
param: mixed $value The value to convert into a boolean.

get_stats( $request )   X-Ref
Get the Akismet stats for a given time period.

Possible `interval` values:
- all
- 60-days
- 6-months

return: WP_Error|WP_REST_Response
param: WP_REST_Request $request

get_alert( $request )   X-Ref
Get the current alert code and message. Alert codes are used to notify the site owner
if there's a problem, like a connection issue between their site and the Akismet API,
invalid requests being sent, etc.

return: WP_Error|WP_REST_Response
param: WP_REST_Request $request

set_alert( $request )   X-Ref
Update the current alert code and message by triggering a call to the Akismet server.

return: WP_Error|WP_REST_Response
param: WP_REST_Request $request

delete_alert( $request )   X-Ref
Clear the current alert code and message.

return: WP_Error|WP_REST_Response
param: WP_REST_Request $request

key_is_valid( $key )   X-Ref
No description

privileged_permission_callback()   X-Ref
No description

remote_call_permission_callback( $request )   X-Ref
For calls that Akismet.com makes to the site to clear outdated alert codes, use the API key for authorization.


sanitize_interval( $interval, $request, $param )   X-Ref
No description

sanitize_key( $key, $request, $param )   X-Ref
No description



Generated: Sun Sep 15 01:00:03 2019 Cross-referenced by PHPXref 0.7.1