将REST API URL添加到WP RSD端点。
原型
rest_output_rsd()
源文件
路径:wp-includes/rest-api.php
<?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
}
...
?>
其他
英文文档:https://developer.wordpress.org/reference/functions/rest_output_rsd/