WordPress at a glance
Главная Functions APIs

Category: APIs

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_route()

Registers a REST API route.

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.

wp_remote_head()

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

wp_remote_post()

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

wp_remote_request()

Retrieve the raw response from the HTTP request.

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 a single cookie's value by name from the raw 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 scheduled callbacks or spawn cron for all scheduled events.

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.