Skip to content

Commit

Permalink
Fix namespace in links (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattheu committed Feb 28, 2022
1 parent b54d325 commit a2d0a6a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/wp-api-menus-v2.php
Expand Up @@ -135,7 +135,7 @@ public static function get_menus() {
public function get_menu( $request ) {

$id = (int) $request['id'];
$rest_url = get_rest_url() . self::get_api_namespace() . '/menus/';
$rest_url = get_rest_url() . self::get_plugin_namespace() . '/menus/';
$wp_menu_object = $id ? wp_get_nav_menu_object( $id ) : array();
$wp_menu_items = $id ? wp_get_nav_menu_items( $id ) : array();

Expand Down Expand Up @@ -229,7 +229,7 @@ public static function get_menu_locations( $request ) {

$locations = get_nav_menu_locations();
$registered_menus = get_registered_nav_menus();
$rest_url = get_rest_url() . self::get_api_namespace() . '/menu-locations/';
$rest_url = get_rest_url() . self::get_plugin_namespace() . '/menu-locations/';
$rest_menus = array();

if ( $locations && $registered_menus ) :
Expand Down

0 comments on commit a2d0a6a

Please sign in to comment.