Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#36443 closed enhancement (fixed)

admin_post_thumbnail_html filter should receive the thumbnail ID

Reported by: johnjamesjacoby's profile johnjamesjacoby Owned by: boonebgorges's profile boonebgorges
Milestone: 4.6 Priority: normal
Severity: normal Version: 3.4
Component: Post Thumbnails Keywords:
Focuses: Cc:


The admin_post_thumbnail_html filter isn't as useful (when called via ajax, or otherwise) without context, e.g. changing the Set/Remove text based on whether a thumbnail is even set. Since _wp_post_thumbnail_html has always required a $thumbnail_id, the admin_post_thumbnail_html filter probably should as well.

Related: #20003, #20891.

Attachments (1)

36443.diff (694 bytes) - added by johnjamesjacoby 7 years ago.
Add $thumbnail_id to admin_post_thumbnail_html filter

Download all attachments as: .zip

Change History (3)

7 years ago

Add $thumbnail_id to admin_post_thumbnail_html filter

#1 @boonebgorges
7 years ago

  • Keywords 2nd-opinion removed
  • Milestone changed from Awaiting Review to 4.6
  • Owner set to boonebgorges
  • Status changed from new to accepted


#2 @boonebgorges
7 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 37196:

Pass thumbnail ID to the admin_post_thumbnail_html filter.

Also updates changelog to reflect that $post->ID was added in 3.5

Props johnjamesjacoby.
Fixes #36443.

Note: See TracTickets for help on using tickets.