Add global default setting for how single posts (and portfolio items #379) handle the featured image link.
Can select whether featured image link gets applied or reverts to lightbox enlarged image.
Explain the setting only applies when featured image is set as, "Standard, with content."
Add "default" selection to "Featured Image Link (the single post)" option of the Post Options meta box.
Add global default featured image link setting to sections, Blog, Post List, Post Grid, Post Showcase, which contains the following selections:
Featured image is not a link
It links to its post
It links to its enlarged lightbox version
Add "default" selection to "Featured Image Link (the single post)" option of the Post Options and Page Options meta boxes.
Add logic adjustments to thumbnail link in themeblvd_get_post_thumbnail().
There's currently a location argument that can be passed when displaying a thumbnail. So within template parts for the different post displays, we'll need to pass in that location to represent the post display, which can then be used within the logic.
Notes
Post Displays
The choice to add this global option to each post display modifies the logic and steps towards applying a featured image link. It also allows for a universal modification to all posts of a specific post display, which have not been individually edited.
When a post is displayed within a blog, post list, post grid, or post showcase:
Check if the "Featured Image Link (everywhere)" option is set on the individual post.
If that is not set or is equal to "default", then determine post display (i.e. location).
Based on the post display, pull the corresponding theme option.
Backwards Compatibility
This whole concept has always been a challenge because of backward compatibility. I've never wanted to change something major that would then cause people to have to go through all the posts on their site.
Here's what this should look like: People with pages and posts already set up should have either a featured image link value or the "none" value already saved to the post. Now, there will be a new selection "default" which will pull from theme options.
So any previously created pages and posts will not get the theme option applied unless the user goes back to them and selects the new default option. And future new posts and pages will have "default" value assigned from the start.
Tasks
themeblvd_get_post_thumbnail()
.location
argument that can be passed when displaying a thumbnail. So within template parts for the different post displays, we'll need to pass in that location to represent the post display, which can then be used within the logic.Notes
Post Displays
The choice to add this global option to each post display modifies the logic and steps towards applying a featured image link. It also allows for a universal modification to all posts of a specific post display, which have not been individually edited.
When a post is displayed within a blog, post list, post grid, or post showcase:
location
).Backwards Compatibility
This whole concept has always been a challenge because of backward compatibility. I've never wanted to change something major that would then cause people to have to go through all the posts on their site.
Here's what this should look like: People with pages and posts already set up should have either a featured image link value or the "none" value already saved to the post. Now, there will be a new selection "default" which will pull from theme options.
So any previously created pages and posts will not get the theme option applied unless the user goes back to them and selects the new default option. And future new posts and pages will have "default" value assigned from the start.
cc @askwpgirl