Im kinda new with wordpress. I wonder where is the code excute the action Update when I hit the button "Update" in wP admin when I edit post ? Because I want to modify some information before it update to DB.
You don't really need to know where the code is located, Wordpress provides hooks for almost every action we do.
So in your case, when a post is updated there are some hooks that are fired.
2.transition_post_status Fires when a post is transitioned from one status to another.
The 1st one
do_action( 'pre_post_update', int $post_ID, array $data )
You can run the pre_post_update
hook and do whatever you need to do on the post.
https://developer.wordpress.org/reference/hooks/pre_post_update/ https://developer.wordpress.org/reference/hooks/transition_post_status/ https://codex.wordpress.org/Plugin_API/Action_Reference/post_updated