Opened 12 years ago
Closed 12 years ago
#22636 closed defect (bug) (duplicate)
Add a filter for post_thumbnail_meta_box HTML
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.5 |
Component: | Post Thumbnails | Keywords: | needs-patch |
Focuses: | Cc: |
Description
It's been helpful to add additional HTML to the post thumbnail meta box, but without any hooks in post_thumbnail_meta_box the process is very fragile, and and requires the use of Javascript, or removing the postimagediv meta box and adding your own meta box.
_wp_post_thumbnail_html provides a way to filter the HTML, but function is only used for ajax requests.
The attached patch adds a filter to $thumbnail_html in post_thumbnail_meta_box, allowing for some parity.
Attachments (1)
Change History (10)
Note: See
TracTickets for help on using
tickets.
I don't think
_wp_post_thumbnail_html()
fires at all anymore. Seems like we need backcompat for theadmin_post_thumbnail_html
filter, at least. Maybe for all of the output, even the JS, since it has title and update text in_e()
and the filter is often used to change some of the text rather than usinggettext()
.