Twitter cards: add new jetpack_twitter_image_default filter#8664
Twitter cards: add new jetpack_twitter_image_default filter#8664dereksmart merged 1 commit intoAutomattic:masterfrom
Conversation
jeherve
left a comment
There was a problem hiding this comment.
Thanks for your contribution!
This seems like a good idea. I've just added a few comments of things that could be improved in my opinion.
class.jetpack-twitter-cards.php
Outdated
There was a problem hiding this comment.
We've passed the code freeze period for 5.8.0. Could you update this to 5.9.0?
class.jetpack-twitter-cards.php
Outdated
There was a problem hiding this comment.
Could you add @module sharedaddy here, so our codex parser can pick the filter up?
class.jetpack-twitter-cards.php
Outdated
There was a problem hiding this comment.
What do you think about changing the filter name to jetpack_twitter_cards_image_default to match other filters in that file?
7b940f5 to
5f2eff3
Compare
|
thanks for the review! all those sound good; all done. |
Matches existing `jetpack_open_graph_image_default` filter.
5f2eff3 to
024a7b4
Compare
|
I've just updated the testing snippet in the PR description because the filter name was not the same one introduced by the code. Correct one is |
|
woo, thanks all! |
* update changelog.txt * Update readme.txt with scaffolding for 5.9 changelog and release draft shortlink * Add changelog entry for #8243 * Add changelog entry for #8296 * Add changelog entry for #8367 * Add changelog entry for #8686 * Add changelog entry for #8707 * Add changelog entry for #8709 and #8714 * Add changelog entry for #8729 * Add changelog entry for #8777 * Add changelog entry for #8780 * Add changelog entry for #8786 * Add changelog entry for #8787 * Add changelog entry for #8801 #8805 #8832 #8865 and #8804 * Add changelog entry for #8817 * Add changelog entry for #8822 * Add changelog entry for #8823 * Add changelog entry for #8829 * Add changelog entry for #8834 * move some items to major enhancements * Add changelog entry for #8836 * Add changelog entry for #8839 * Add changelog entry for #8861 * Add changelog entry for #8862 * Add changelog entry for #8863 * Add changelog entry for #8866 * Add changelog entry for #8870 * Add changelog entry for #8874 * Add changelog entry for #8875 * Add changelog entry for #8881 * Add changelog entry for #8890 * Add changelog entry for #8911 * Add changelog entry for #8927 * Add changelog entry for #8931 * Add changelog entry for #8933 * Add changelog entry for #8930 * fix wording * typo * minor fixes * replace partner scripts for Jetpack Start in changelog entry * Update to-test.md * Update to-test.md * minor style fixes to to-test.md * minor style fixes to to-test.md * minor fixes on to-test.md * Add changelog entry for #8868 * Add changelog entry for #8844 * Add changelog entry for #8664 * Add changelog entry for #8935 * Add changelog entry for #8425 * Add changelog entry for #8625
Twitter cards: add new
jetpack_twitter_image_defaultfilter to allow themes and plugins to customize twitter:image when no suitable image is found automatically. It matches the existingjetpack_open_graph_image_defaultfilter.(Thanks for considering this!)
To test, add this to your theme's
functions.php:Fetch your site's home page, and a post page that wouldn't otherwise have a Twitter image set. Verify that they both now include
<meta name="twitter:image" content="http://asdf.com/89asdf.gif" />.Proposed changelog entry: