WordPress at a glance
Home Functions APIs

APIs (category)

Rewrite API (Clean URLs)

add_permastruct()

Add permalink structure.

add_rewrite_endpoint()

Add an endpoint, like /trackback/.

add_rewrite_rule()

Adds a rewrite rule that transforms a URL structure to a set of query vars.

add_rewrite_tag()

Add a new rewrite tag (like %postname%).

flush_rewrite_rules()

Remove rewrite rules and then recreate rewrite rules.

remove_permastruct()

Removes a permalink structure.

remove_rewrite_tag()

Removes an existing rewrite tag (like %postname%).

Settings API

add_settings_error()

Register a settings error to be displayed to the user

add_settings_field()

Add a new field to a section of a settings page

add_settings_section()

Add a new section to a settings page.

do_settings_fields()

Print out the settings fields for a particular settings section

do_settings_sections()

Prints out all settings sections added to a particular settings page

get_settings_errors()

Fetch settings errors registered by add_settings_error()

register_setting()

Register a setting and its data.

settings_errors()

Display settings errors registered by add_settings_error().

settings_fields()

Output nonce, action, and option_page fields for a settings page.

unregister_setting()

Unregister a setting.

REST API

get_rest_url()

Retrieves the URL to a REST endpoint on a site.

register_rest_field()

Registers a new field on an existing WordPress object type.

register_rest_route()

Registers a REST API route.

rest_ensure_response()

Ensures a REST response is a response object (for consistency).

rest_is_boolean()

Determines if a given value is a boolean or boolean-like. Doesn't look at the type of a given value, and like in PHP, 1 = true and 0 = false.

rest_output_link_wp_head()

Displays a link to the root REST API route in the <head> section on all site pages.

HTTP API

status_header()

Set HTTP status header.

wp_get_http_headers()

Retrieve HTTP Headers from URL.

wp_remote_get()

Retrieve the raw response from the HTTP request using the GET method. It's a wrapper for curl. The result includes HTTP headers and content of the webpage, and returned in the form of an array.

wp_remote_head()

Retrieve the raw response from the HTTP request using the HEAD method.

wp_remote_post()

Gets a remote page using the HTTP POST method. The result includes HTTP headers and content of the webpage and returned in the form of an array. It's a wrapper for curl.

wp_remote_request()

Creates any type of HTTP request and returns the response of the request as an array.

wp_remote_retrieve_body()

Retrieve only the body from the raw response.

wp_remote_retrieve_cookie()

Retrieve a single cookie by name from the raw response.

wp_remote_retrieve_cookie_value()

Retrieve the value of the specified cookie from the passed query response.

wp_remote_retrieve_cookies()

Retrieve only the cookies from the raw response.

wp_remote_retrieve_header()

Retrieve a single header by name from the raw response.

wp_remote_retrieve_headers()

Retrieve only the headers from the raw response.

wp_remote_retrieve_response_code()

Retrieve only the response code from the raw response.

wp_remote_retrieve_response_message()

Retrieve only the response message from the raw response.

wp_safe_remote_request()

Retrieve the raw response from a safe HTTP request.

Cron API

wp_clear_scheduled_hook()

Unschedules all events attached to the hook with the specified arguments.

wp_cron()

Run all scheduled cron events whose time has come.

wp_doing_cron()

Determines whether the current request is a WordPress cron request.

wp_get_schedules()

Retrieve supported event recurrence schedules.

wp_next_scheduled()

Retrieve the next timestamp for an event.

wp_schedule_event()

Schedule a recurring event.

wp_schedule_single_event()

Schedules an event to run only once.

wp_unschedule_event()

Unschedule a previously scheduled event.

wp_unschedule_hook()

Unschedules all events attached to the hook.