New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add post thumbnail support for v2. #37
base: master
Are you sure you want to change the base?
Conversation
@@ -280,13 +280,14 @@ public function get_menu_location( $request ) { | |||
$cache = array(); | |||
|
|||
foreach ( $rev_items as $item ) : | |||
|
|||
$post_id = url_to_postid( $item->url ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why the spacing is off here. I'm using Atom, and it's formatted perfectly. Same for below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is because of tabs vs spaces
I don't understand the reason behind this. The plugin just adds endpoints for menus. Can you explain? |
@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. |
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.