[wp-trac] [WordPress Trac] #47908: "post_updated" hook not working properly with Gutenberg

WordPress Trac noreply at wordpress.org
Wed Aug 21 06:15:48 UTC 2019


#47908: "post_updated" hook not working properly with Gutenberg
--------------------------+-----------------------------
 Reporter:  giuse         |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  5.2.2
 Severity:  critical      |   Keywords:  needs-patch
  Focuses:                |
--------------------------+-----------------------------
 The "post_updated" action hook doesn't work properly when Gutenberg is
 active.
 The content passed to $post_after and $post_before of the following
 example is always the same, no matter if you change something in the
 content before the post saving.

 Disabling Gutenberg all works as normal.

 add_action( 'post_updated','my_post_updated_function',99,3 );


 function my_post_updated_function( $post_ID, $post_after,$post_before ){
     //$post_after and $post_before are always the same if Gutenberg is
 active
 }

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


More information about the wp-trac mailing list