Make WordPress Core

Opened 7 years ago

Closed 3 months ago

#36181 closed enhancement (wontfix)

wp_transition_post_status after save post action

Reported by: sebastianpisula's profile sebastian.pisula Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: General Keywords: has-patch close
Focuses: Cc:


I want save all post meta to file when post was published. I use publish_post action that I haven't post meta because post meta was saved in save_post action.

I know that I can use save_post to save all post meta to file but I think that action publish_post is better. So we must move

wp_transition_post_status( $data['post_status'], $previous_status, $post );


return $post_ID;

I think that this is appropriate position for this function.

Attachments (1)

36181.patch (911 bytes) - added by sebastian.pisula 7 years ago.

Download all attachments as: .zip

Change History (4)

#1 @sebastian.pisula
7 years ago

  • Keywords has-patch added

#2 @swissspidy
7 years ago

  • Keywords close added

Developers hooking onto save_post and wp_insert_post can rely on wp_transition_post_status() being run. This patch changes that by running it after the hooks have been executed.

I'm sure this would break lots of things and therefore I don't see any reason to implement this.

#3 @JeffPaul
3 months ago

  • Resolution set to wontfix
  • Status changed from new to closed

I concur, moving forward with closing this ticket.

Note: See TracTickets for help on using tickets.