WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#22636 closed defect (bug) (duplicate)

Add a filter for post_thumbnail_meta_box HTML

Reported by: coreygilmore Owned by: nacin
Milestone: Priority: normal
Severity: normal Version: 3.5
Component: Post Thumbnails Keywords: needs-patch
Focuses: Cc:
PR Number:

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)

meta-boxes.php.diff (610 bytes) - added by coreygilmore 7 years ago.

Download all attachments as: .zip

Change History (10)

#1 @helenyhou
7 years ago

I don't think _wp_post_thumbnail_html() fires at all anymore. Seems like we need backcompat for the admin_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 using gettext().

#2 @nacin
7 years ago

  • Milestone changed from Awaiting Review to 3.5
  • Type changed from enhancement to defect (bug)

#3 @devinreams
7 years ago

  • Cc devin@… added

#4 @batmoo
7 years ago

  • Cc batmoo@… added

#5 @koopersmith
7 years ago

  • Keywords needs-patch added; has-patch removed

#6 @micahwave
7 years ago

  • Cc micahwave added

#7 @nacin
7 years ago

  • Owner set to nacin
  • Status changed from new to assigned

#8 @koopersmith
7 years ago

Note that this will be fixed by the patch on #21776.

#9 @nacin
7 years ago

  • Milestone 3.5 deleted
  • Resolution set to duplicate
  • Status changed from assigned to closed

Duplicate of #21776.

Note: See TracTickets for help on using tickets.