Uses
Uses | Description |
---|---|
wp-includes/rest-api.php: get_rest_url() | Retrieves the URL to a REST endpoint on a site. |
wp-includes/formatting.php: esc_url() | Checks and cleans a URL. |
Adds the REST API URL to the WP RSD endpoint.
File: wp-includes/rest-api.php
function rest_output_rsd() { $api_root = get_rest_url(); if ( empty( $api_root ) ) { return; } ?> <api name="WP-API" blogID="1" preferred="false" apiLink="<?php echo esc_url( $api_root ); ?>" /> <?php }
Version | Description |
---|---|
4.4.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/rest_output_rsd