thebatclaudio / wp-rest-api-v2-menus

Adding menus endpoints on WP REST API v2
47 stars 23 forks source link

Thanks for the plugin! #20

Closed JAZzmiX closed 4 years ago

JAZzmiX commented 4 years ago

On the last update you added slug to item object but it work from pages & posts, not for category.

in  JS I took slug from url like:

  const getSlug = url => {
    const parts = url.split('/');
    return parts.length > 2 ? parts[parts.length - 2] : '';
  };
....
getSlug(item.url);
thebatclaudio commented 4 years ago

Hi @JAZzmiX, thank you for your issue. I will fix this asap!