Skip to content

Commit

Permalink
Remove "experimental" from URL details REST controller and promote to…
Browse files Browse the repository at this point in the history
… `v1` namespace (#35915)

* Update to v1 namespace

* Update client code to utilise new namespace
  • Loading branch information
getdave authored Oct 28, 2021
1 parent 6419aff commit 3674620
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/class-wp-rest-url-details-controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class WP_REST_URL_Details_Controller extends WP_REST_Controller {
* Constructs the controller.
*/
public function __construct() {
$this->namespace = '__experimental';
$this->namespace = 'wp-block-editor/v1';
$this->rest_base = 'url-details';
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const CACHE = new Map();
* @return {Promise< WPRemoteUrlData[] >} Remote URL data.
*/
const fetchUrlData = async ( url, options = {} ) => {
const endpoint = '/__experimental/url-details';
const endpoint = '/wp-block-editor/v1/url-details';

const args = {
url: prependHTTP( url ),
Expand Down
2 changes: 1 addition & 1 deletion phpunit/class-wp-rest-url-details-controller-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class WP_REST_URL_Details_Controller_Test extends WP_Test_REST_Controller_Testca

protected static $admin_id;
protected static $subscriber_id;
protected static $route = '/__experimental/url-details';
protected static $route = '/wp-block-editor/v1/url-details';
protected static $url_placeholder = 'https://placeholder-site.com';
protected static $request_args = array();

Expand Down

0 comments on commit 3674620

Please sign in to comment.