[wp-trac] [WordPress Trac] #23983: Add filter to get_post_thumbnail_id to override default thumbnail use
WordPress Trac
noreply at wordpress.org
Tue Jun 10 16:31:04 UTC 2014
#23983: Add filter to get_post_thumbnail_id to override default thumbnail use
-----------------------------------+------------------------------
Reporter: Jesper800 | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version:
Severity: normal | Resolution:
Keywords: 2nd-opinion has-patch | Focuses:
-----------------------------------+------------------------------
Changes (by engelen):
* keywords: 2nd-opinion => 2nd-opinion has-patch
Comment:
''(formerly Jesper800)''
Why would this confuse people? Hooking directly into `get_post_meta` would
confuse people, but allowing a function return value to be filterable
shouldn't. We're requesting the featured image for a post, not a raw
database value. Allowing `get_the_title` to be filterable doesn't confuse
people either, does it?
In my opinion this should be filterable, as it provides flexibility in a
currently quite rigid thumbnail system. For example, one might want to use
the thumbnail of a parent post if the post itself doesn't have one. Adding
a filter adds more flexibility, there are more than enough realistic use
cases, and it doesn't add any confusion.
In dire need of a second opinion :-).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/23983#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list