There is no special hook to author change.
But you can achieve it by using post_updated hook.
Example:
add_action('post_updated', 'prefix_on_update_author', 10, 3);
function prefix_on_update_author($post_ID, $post_after, $post_before)
{
if ($post_after->post_author != $post_before->post_author) {
// author has been changed
// you can add your own hook here or write your code
}
}
Here is the codex reference.
Related Posts:
- Restricting displayed posts to posts from only select authors
- the_author() returns empty string
- The hook for the AJAX Add to Cart button?
- How to show list of posts by author and category?
- WordPress: How to get the current logged in author page URL?
- How to add editor’s name to entry meta byline?
- Action hook ‘wp’ firing twice… why?
- How to display posts by current user/author in a custom page template?
- In what sequence are the hooks fired when a post is “published”?
- Search posts by post author name
- Get the user type of an author
- Show the title of the latest post by author
- Find most recent authors
- Get current users post URL?
- Filter posts by author and category simultaneously
- How to change post status from publish to draft using hook in wordpress?
- WordPress Delete hook with wp_delete_post function?
- Custom function for “Submit for Review” hook
- Get all posts by post_author
- First hook to use current page post id
- How to place HTML below the title of the (custom) post overview
- How can I hook into creating a new post and execute wp_die(), before the post is inserted into the database?
- Authors in menu, template list post by author
- WP rest api returns 404 only when author param is used
- Does an action fire when adding a tag via the “Tags” meta box?
- Are posts updated or built from revisions + autosaves?
- Action hook for new pending posts?
- Show info to author only
- Auto “expire” all of an authors posts on spcific date
- How to get the user meta data for a post?
- Guest Author – How to display posts on /author/ archive page
- What is the filter or hook to add admin controls to posts on the front end?
- Adding buttons to Add New Post and Add New Page
- Show posts by a custom post author
- Hide a specific category in admin All Posts page (WordPress)
- Updating post data on save (save_post vs wp_insert_post_data)
- Getting the current author (it has changed) of a post, not the original author
- Showing author page if user has no post
- Copy post to separate database with “add_action(….)”
- Hooking into the post editing screen for an existing page only
- Trying to alter the post_content through the_post
- Display Notification Bar on Header on Certain Post Count
- How do I retrieve a users’ last 5 posts?
- Call Web Services on post first publish
- obtain the author id given the post id
- Show comment number per author per day
- Get all comments of author’s posts
- What does WordPress do if I save a post without content/title? [duplicate]
- Adding bootstrap classes to video shortcodes
- preg_replace not removed “class”
- static landing page leading to author specific pages w/ “live” content
- If contributor has published 2 or more posts then show otherwise hide
- All Posts Linking to Author Posts directly
- Divs appearing everywhere in post content
- Change post author without using wp_update_post()
- Is it possible to add a shortcode below post title?
- How to get the ability to change the author of a post
- Echo Text If User Is Logged in But NOT the Author of post
- Automatically set post_parent value
- Only allow posts with a specific term to only be viewed by other authors with the same term in their post
- How to limit author related post listing ?
- Get total post from an author
- Send email to author of post on post submission
- Get x recent posts by author?
- Get latest author posts inside the loop
- Cannot select certain authors for posts after import
- Display message depending on capability outside loop
- How do I disable the “by author” hyperlink on posts?
- Authors’ Links on Homepage Not Going to Author Post Pages
- adding my posts (author posts) in menu
- how to show comments only author which send own posts in wordpress
- Posting to WP via URL
- Is there a way to know when a page has been updated and do some action only once?
- Hook when post is set from published to draft?
- Change of author not updating
- Limit Post Creation Count by Author or Role
- Get Category in save_post Hook
- Count singular post views automatically
- On WordPress Search, how to search post from Author meta also
- How to hide meta from search result only on pages?
- Numbering author posts in posts query
- Custom author search
- Can’t get post_updated hook to work
- Changing the Category for all posts of an Author
- List of authors posts minus very latest
- wp query custom orderby not custom field
- How to remove related post from home page
- show latest authors blog post
- Checking if some condition is matched before inserting post into database
- Getting posts from multiple users?
- Display the current post author and his url in the post header
- Which hooks are essential for post templates?
- Show last post of employee in his profile page
- Notify Author of the post if admin deletes his post and perform some function
- save_post not working
- how to show all type of author posts in author page (SOLVED)
- How to show total view count across all posts for an author
- Add author section on Author archive posts
- users followin the blog post author
- Comment count next to post title?