[ 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.

param: WP_REST_Request $request
return: WP_Error|WP_REST_Response

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

param: WP_REST_Request $request
return: WP_Error|WP_REST_Response

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

param: WP_REST_Request $request
return: WP_Error|WP_REST_Response

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

param: WP_REST_Request $request
return: WP_Error|WP_REST_Response

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

param: WP_REST_Request $request
return: WP_Error|WP_REST_Response

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

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

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

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

param: WP_REST_Request $request
return: WP_Error|WP_REST_Response

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.

param: WP_REST_Request $request
return: WP_Error|WP_REST_Response

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

param: WP_REST_Request $request
return: WP_Error|WP_REST_Response

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

param: WP_REST_Request $request
return: WP_Error|WP_REST_Response

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 Dec 22 01:00:02 2024 Cross-referenced by PHPXref 0.7.1