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
- Prevent Authors from viewing each others Posts
- Display Random Author with Details in Sidebar
- Get old values for post before saving new ones
- Execute function when post is published
- how to limit edit_form_after_title hook to page and post edit only?
- WordPress: How to get the current logged in author page URL?
- Different permalink for posts and authors
- Action hook ‘wp’ firing twice… why?
- Query posts distinct authors
- In what sequence are the hooks fired when a post is “published”?
- Restrict the Number of Posts an Author can Publish (over time)?
- Better post meta efficiency?
- Count singular post views automatically
- Show author post count in sidebar – Variable
- Get current users post URL?
- Get the author of the latest revision
- How to change post status from publish to draft using hook in wordpress?
- Custom Post Type & Author not associating, user post count is 0, api doesn’t return author in post objects
- Guest Author – How to modify my custom function code if the guest author URL will follow a particular pattern/format?
- Filter post before *editing*
- Post author is changed to admin after his post is modified by admin
- Custom function for “Submit for Review” hook
- How can I control multiple editing of wordpress posts?
- Multiple authors for single post without plugin
- Limit number of posts a user can make per minute?
- Show the author’s count of total amount of posts assign to a custom taxonomy term
- Author must complete profile info before they can publish a post?
- WP rest api returns 404 only when author param is used
- Does an action fire when adding a tag via the “Tags” meta box?
- How can I list random authors from current post category?
- Are posts updated or built from revisions + autosaves?
- How can i do something after head like adding a hook for after head but before post
- How can I show wordpress posts based on author?
- Action hook for new pending posts?
- How to retrieve the postID in a “image_send_to_editor” hook function?
- Register post status, exclude from searches
- Limit posts per author role (excluding admin) in home page
- Guest Author – How to display posts on /author/ archive page
- How can I show many posts an author has per week?
- How to give capability (publish contributors posts) to author role?
- How to modify post content?
- Which WordPress hook fires after post content loaded?
- use wpml_post_language_details function other plugin based on $post->ID [closed]
- Show posts by a custom post author
- How to access $post from a callback function
- Getting the current author (it has changed) of a post, not the original author
- Showing author page if user has no post
- Call Web Services on post first publish
- Show comment number per author per day
- Get all comments of author’s posts
- (solved) getting post author’s user role
- Change all author links in Blog roll
- What does WordPress do if I save a post without content/title? [duplicate]
- Adding bootstrap classes to video shortcodes
- Display author’s name and avatar in post’s sidebar
- preg_replace not removed “class”
- why the same code got different results when using query_posts in functions.php and index.php
- 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
- Modify posts listing at back end
- Change post author without using wp_update_post()
- Hook for changing excerpt content when excerpt not set
- Is it possible to lock all new and existing WordPress posts to one specific author?
- Echo Text If User Is Logged in But NOT the Author of post
- Restrict displaying posts to the poster itself (in Back-end)
- Send email to author of post on post submission
- How can I set a maximum allowed post size and number of posts submitted?
- Get x recent posts by author?
- Change Author Name to Sitename on Frontend
- Get latest author posts inside the loop
- Author Avatar as default first image
- 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
- Prevent 404 of Author pages without posts
- how to show comments only author which send own posts in wordpress
- Posting to WP via URL
- Author post count in category
- Hook when post is set from published to draft?
- Display post by Random Authors on Page Refresh
- Get Category in save_post Hook
- Count singular post views automatically
- What permissions does a role need for the user to be assigned as the author of a post?
- 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
- Grab meta data before post is saved
- Custom author search
- How to get the postID inside ‘content_save_pre’? Other hook?
- Getting posts from multiple users?
- How to get single post by one author?
- save_post not working
- how to show all type of author posts in author page (SOLVED)
- Echo author slug in post edit page
- How to make the Post Author name fixed as “Editorial Staff” even if there are multiple authors?
- users followin the blog post author