unfulvio / wp-api-menus

:abcd: Menu routes for WordPress JSON REST API.
https://wordpress.org/plugins/wp-api-menus
GNU General Public License v2.0
140 stars 59 forks source link

Add post thumbnail support for v2. #37

Open samdotme opened 7 years ago

samdotme commented 7 years ago

Allowing users to get access to featured images in posts is a simple two line change. This will simply return an empty string for those posts/themes which do not have/support a featured image.

mckernanin commented 7 years ago

I don't understand the reason behind this. The plugin just adds endpoints for menus. Can you explain?

samdotme commented 7 years ago

@mckernanin The use case for this would be someone building a modern, tiled menu layout. An example of doing this with posts or categories would be https://wordpress.org/plugins/wp-tiles/.

Exposing the featured image from the menu endpoint would allow a theme designer to get the same effect using a menu, which has the benefits of your tiles not having to change with every new post.