how do i get the old and the new post title when it was changed
i am struggling at the moment with a little problem.
I want to compare the old and the new title of a updated post.
But how do i get the data?
i tried it in the functions.php with the pre_update_post hook to get the old title and the save_title hook to get the new title of the post.
After that i would like to compare this two values and if they are the same, don’t do nothing, but when they are different, do a certain action:
In my blog every item of my custom post type “aktive” creates a term in the category-taxonomy. When i edit the name of an “aktive”-item i want that the term which was created at the first time, also gets its name changed accordingly. But it doesnt do with the code above.
Thankful for any advice.
- The topic ‘how do i get the old and the new post title when it was changed’ is closed to new replies.