[wp-trac] [WordPress Trac] #36181: wp_transition_post_status after save post action

WordPress Trac noreply at wordpress.org
Wed Mar 9 14:08:56 UTC 2016


#36181: wp_transition_post_status after save post action
------------------------------+-----------------------------
 Reporter:  sebastian.pisula  |      Owner:
     Type:  enhancement       |     Status:  new
 Priority:  normal            |  Milestone:  Awaiting Review
Component:  General           |    Version:
 Severity:  normal            |   Keywords:
  Focuses:                    |
------------------------------+-----------------------------
 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
 );
 }}}

 before

 {{{
 return $post_ID;
 }}}

 I think that this is appropriate position for this function.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/36181>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list