WordPress.org

Make WordPress Core

Opened 11 days ago

Last modified 11 days ago

#48790 new defect (bug)

Featured Image not available with transition_post_status hook with a fresh post

Reported by: Kpudlo Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.3
Component: Post Thumbnails Keywords:
Focuses: Cc:
PR Number:

Description

When using the transition_post_status with Gutenberg, it is impossible to use the get_post_thumbnail_id of the post that is being published that has not previously been saved. Shouldn't this hook be able to grab this information?

This seems to only be an issue when a featured image is added to a post and is not saved before being published. If the post is scheduled it seems to work fine, or if is saved immediately prior to publishing it seems to work fine.

transition_post_status allows you to use get_post_thumbnai_id with the Classic Editor just fine.

Change History (1)

#1 @SergeyBiryukov
11 days ago

  • Component changed from General to Post Thumbnails
Note: See TracTickets for help on using tickets.