[wp-trac] [WordPress Trac] #23983: Add filter to get_post_thumbnail_id to override default thumbnail use
WordPress Trac
noreply at wordpress.org
Tue Aug 28 20:34:54 UTC 2018
#23983: Add filter to get_post_thumbnail_id to override default thumbnail use
-------------------------------------------------+-------------------------
Reporter: Jesper800 | Owner:
| SergeyBiryukov
Type: enhancement | Status: reviewing
Priority: normal | Milestone: 5.0
Component: Media | Version:
Severity: normal | Resolution:
Keywords: 2nd-opinion needs-testing has-patch | Focuses:
-------------------------------------------------+-------------------------
Comment (by rzen):
Adding my voice as a +1 to this. There have been so many cases over the
years where I've desired to override the post thumbnail behavior by
specifying an alternative post image.
Being able to filter this value as well as the `has_post_thumbnail()` are
a necessary part of that process since different plugins or themes may
(properly) be checking for `has_post_thumbnail()` before utilizing
`get_the_post_thumbnail()` or `get_the_post_thumbnail_url()`.
I don't see a ticket for the latter, so I'm going to go ahead and create
that one now.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/23983#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list