Skip to content

Commit

Permalink
Update more references to __experimental menu endpoints to make them …
Browse files Browse the repository at this point in the history
…stable (#36386)

* Update more references to __experimental menu endpoints to make them stable

* Update reference in REST API

* Update endpint in expression

Co-authored-by: George Mamadashvili <georgemamadashvili@gmail.com>
  • Loading branch information
talldan and Mamaduka committed Nov 15, 2021
1 parent ffbd0df commit ed83554
Show file tree
Hide file tree
Showing 4 changed files with 245 additions and 151 deletions.
2 changes: 1 addition & 1 deletion lib/class-wp-rest-menus-controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ protected function prepare_links( $term ) {
$locations = $this->get_menu_locations( $term->term_id );
$rest_base = 'menu-locations';
foreach ( $locations as $location ) {
$url = rest_url( sprintf( '__experimental/%s/%s', $rest_base, $location ) );
$url = rest_url( sprintf( 'wp/v2/%s/%s', $rest_base, $location ) );
$links['https://api.w.org/menu-location'][] = array(
'href' => $url,
'embeddable' => true,
Expand Down
Loading

0 comments on commit ed83554

Please sign in to comment.