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
Front page post thumbnail link title refactoring #241
Front page post thumbnail link title refactoring #241
Conversation
…st thumbnail on the front page so that it's easier to override in the child theme.
@vskjefst https://github.com/raamdev/independent-publisher/blob/1.7/content.php#L27 could also be refactored to use the new function. |
@raamdev the intention behind the method was to use it for post thumbnail title only. I use a lot of images with Creative Commons licenses, and thus wanted to easily display the license in the title. I can create a separate method for the title attribute for entry titles. Both methods can share the same code, but it will make it easier for child theme users to show different titles on post thumbnails and title headers. What do you think? |
Ah, I understand now. Thanks for clarifying that (more like reiterating! I missed it the first time you mentioned it—sorry). If you could create a separate method for entry titles and refactor those as well, that would be great. Also, the |
…es to its own function. Also moved shared code to common method. It should be possible for child theme users to override title attribute values as they please now.
I've pulled the remaining title attribute value code from content.php and moved it to functions.php. If there are any other files than content.php that should use this method, please let me know |
@vskjefst Thanks! There are just two more in https://github.com/raamdev/independent-publisher/blob/1.7/functions.php#L1156 https://github.com/raamdev/independent-publisher/blob/1.7/functions.php#L1171 |
Done. I change the two lines so that they use |
@vskjefst Thank you! Merged. Next Release Changelog:
|
Pulled code that created title-attribute on anchor-element for the post thumbnail on the front page so that it's easier to override in the child theme.