Add post thumbnail support for v2.#37
Open
samdotme wants to merge 4 commits into
Open
Conversation
samdotme
commented
Nov 15, 2016
|
|
||
| foreach ( $rev_items as $item ) : | ||
|
|
||
| $post_id = url_to_postid( $item->url ); |
Author
There was a problem hiding this comment.
I'm not sure why the spacing is off here. I'm using Atom, and it's formatted perfectly. Same for below.
Contributor
There was a problem hiding this comment.
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? |
Author
|
@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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.