Uses
Uses | Description |
---|---|
wp-includes/rest-api.php: get_rest_url() | Retrieves the URL to a REST endpoint on a site. |
Retrieves the URL to a REST endpoint.
Note: The returned URL is NOT escaped.
(string) (Optional) REST route.
Default value: ''
(string) (Optional) Sanitization scheme.
Default value: 'rest'
(string) Full URL to the endpoint.
File: wp-includes/rest-api.php
function rest_url( $path = '', $scheme = 'rest' ) { return get_rest_url( null, $path, $scheme ); }
Uses | Description |
---|---|
wp-includes/rest-api.php: get_rest_url() | Retrieves the URL to a REST endpoint on a site. |
Used By | Description |
---|---|
wp-includes/rest-api/endpoints/class-wp-rest-block-directory-controller.php: WP_REST_Block_Directory_Controller::prepare_links() | Generates a list of links to include in the response for the plugin. |
wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php: WP_REST_Plugins_Controller::prepare_links() | Prepares links for the request. |
wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php: WP_REST_Plugins_Controller::create_item() | Uploads a plugin and optionally activates it. |
wp-includes/rest-api/endpoints/class-wp-rest-block-types-controller.php: WP_REST_Block_Types_Controller::prepare_links() | Prepares links for the request. |
wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php: WP_REST_Attachments_Controller::edit_media_item() | Applies edits to a media item and creates a new attachment record. |
wp-admin/includes/class-wp-site-health.php: WP_Site_Health::wp_cron_scheduled_check() | Run our scheduled event to check and update the latest site health status for the website. |
wp-admin/includes/class-wp-site-health.php: WP_Site_Health::get_test_rest_availability() | Test if the REST API is accessible. |
wp-includes/rest-api/endpoints/class-wp-rest-search-controller.php: WP_REST_Search_Controller::get_items() | Retrieves a collection of search results. |
wp-includes/rest-api/endpoints/class-wp-rest-search-controller.php: WP_REST_Search_Controller::prepare_item_for_response() | Prepares a single search result for response. |
wp-includes/rest-api/search/class-wp-rest-post-search-handler.php: WP_REST_Post_Search_Handler::prepare_item_links() | Prepares links for the search result of a given ID. |
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php: WP_REST_Posts_Controller::get_schema_links() | Retrieve Link Description Objects that should be added to the Schema for the posts collection. |
wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php: WP_REST_Users_Controller::prepare_links() | Prepares links for the user request. |
wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php: WP_REST_Users_Controller::create_item() | Creates a single user. |
wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php: WP_REST_Users_Controller::get_items() | Retrieves all users. |
wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php: WP_REST_Revisions_Controller::prepare_item_for_response() | Prepares the revision for the REST response. |
wp-includes/rest-api/endpoints/class-wp-rest-revisions-controller.php: WP_REST_Revisions_Controller::get_items() | Gets a collection of revisions. |
wp-includes/rest-api/endpoints/class-wp-rest-attachments-controller.php: WP_REST_Attachments_Controller::create_item() | Creates a single attachment. |
wp-includes/rest-api/endpoints/class-wp-rest-post-statuses-controller.php: WP_REST_Post_Statuses_Controller::prepare_item_for_response() | Prepares a post status object for serialization. |
wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php: WP_REST_Terms_Controller::prepare_links() | Prepares links for the request. |
wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php: WP_REST_Terms_Controller::create_item() | Creates a single term in a taxonomy. |
wp-includes/rest-api/endpoints/class-wp-rest-terms-controller.php: WP_REST_Terms_Controller::get_items() | Retrieves terms associated with a taxonomy. |
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php: WP_REST_Posts_Controller::prepare_links() | Prepares links for the request. |
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php: WP_REST_Posts_Controller::create_item() | Creates a single post. |
wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php: WP_REST_Posts_Controller::get_items() | Retrieves a collection of posts. |
wp-includes/rest-api/endpoints/class-wp-rest-taxonomies-controller.php: WP_REST_Taxonomies_Controller::prepare_item_for_response() | Prepares a taxonomy object for serialization. |
wp-includes/rest-api/endpoints/class-wp-rest-post-types-controller.php: WP_REST_Post_Types_Controller::prepare_item_for_response() | Prepares a post type object for serialization. |
wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php: WP_REST_Comments_Controller::prepare_links() | Prepares links for the request. |
wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php: WP_REST_Comments_Controller::create_item() | Creates a comment. |
wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php: WP_REST_Comments_Controller::get_items() | Retrieves a list of comment items. |
wp-includes/rest-api/class-wp-rest-request.php: WP_REST_Request::from_url() | Retrieves a WP_REST_Request object from a full URL. |
wp-includes/rest-api.php: rest_output_link_wp_head() | Outputs the REST API link tag into page header. |
wp-includes/rest-api.php: rest_output_link_header() | Sends a Link header for the REST API. |
wp-includes/embed.php: get_oembed_endpoint_url() | Retrieves the oEmbed endpoint URL for a given permalink. |
wp-includes/rest-api/class-wp-rest-server.php: WP_REST_Server::get_data_for_route() | Retrieves publicly-visible data for the route. |
wp-includes/rest-api/class-wp-rest-server.php: WP_REST_Server::get_namespace_index() | Retrieves the index for a namespace. |
wp-includes/media.php: wp_enqueue_media() | Enqueues all scripts, styles, settings, and templates necessary to use all media JS APIs. |
Version | Description |
---|---|
4.4.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/rest_url