Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#36443 closed enhancement (fixed)

admin_post_thumbnail_html filter should receive the thumbnail ID

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

Description

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 11 years ago.
Add $thumbnail_id to admin_post_thumbnail_html filter

Download all attachments as: .zip

Change History (3)

@johnjamesjacoby
11 years ago

Add $thumbnail_id to admin_post_thumbnail_html filter

#1 @boonebgorges
11 years ago

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

Yes.

#2 @boonebgorges
11 years ago

  • Resolution → fixed
  • Status accepted → 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.