[wp-trac] [WordPress Trac] #41751: save_post_{custom_post_type} not behaving exactly as save_post

WordPress Trac noreply at wordpress.org
Tue Aug 29 13:50:44 UTC 2017


#41751: save_post_{custom_post_type} not behaving exactly as save_post
-------------------------------+-----------------------------
 Reporter:  dipakbbsr          |      Owner:
     Type:  defect (bug)       |     Status:  new
 Priority:  normal             |  Milestone:  Awaiting Review
Component:  Posts, Post Types  |    Version:  4.8.1
 Severity:  normal             |   Keywords:
  Focuses:  administration     |
-------------------------------+-----------------------------
 When save_post is fired, the code
 {{{
 get_post_meta( $post_id )
 }}}
 is getting all meta field values. But when same code is written inside
 save_post_{custom_post_type} action, the meta fields that are originally
 save to a post are coming. But the meta fields that are being updated in
 the post are not coming.

 Note : I am creating a post from frontend with fewer custom fields and
 with status "draft". And when admin "publish" the post at backend i want
 to update other meta fields based on admin selection. But while save_post
 displays me all meta fields save_post_{custom_type} only shows the meta
 entries that are saved in db while post creation.

 I hope i am clear enough to explain. Correct me if I am missed anything
 during coding.

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


More information about the wp-trac mailing list