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
- Prevent Authors from viewing each others Posts
- Display Random Author with Details in Sidebar
- The hook for the AJAX Add to Cart button?
- 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?
- 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?
- Different permalink for posts and authors
- Action hook ‘wp’ firing twice… why?
- How to display posts by current user/author in a custom page template?
- 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)?
- Search posts by post author name
- Get the user type of an author
- Better post meta efficiency?
- Count singular post views automatically
- Show the title of the latest post by author
- Find most recent authors
- Show author post count in sidebar – Variable
- Get current users post URL?
- Get the author of the latest revision
- Filter posts by author and category simultaneously
- 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*
- WordPress Delete hook with wp_delete_post function?
- Post author is changed to admin after his post is modified by admin
- Custom function for “Submit for Review” hook
- Get all posts by post_author
- First hook to use current page post id
- How can I control multiple editing of wordpress posts?
- Multiple authors for single post without plugin
- How to place HTML below the title of the (custom) post overview
- Limit number of posts a user can make per minute?
- 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
- 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?
- How do I disable the “by author” hyperlink on posts?
- Authors’ Links on Homepage Not Going to Author Post Pages
- Send email to admin with post author
- 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
- Is there a way to know when a page has been updated and do some action only once?
- Author post count in category
- How can I change the date format of the revision list?
- Hook when post is set from published to draft?
- Change of author not updating
- Limit Post Creation Count by Author or Role
- Is update_post_meta used when save_post action hook is invoked?
- Display post by Random Authors on Page Refresh
- Get Category in save_post Hook
- Count singular post views automatically
- How to prevent post update using transition_post_status
- 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
- Can’t get post_updated hook to work
- Changing the Category for all posts of an Author
- List of authors posts minus very latest
- How to get the postID inside ‘content_save_pre’? Other hook?
- 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?
- fire action when post is being edited as well as saved?
- Display the current post author and his url in the post header
- Create a Page Template Which Displays All Posts by Current User
- Set the limit to allow author when make post!
- Which hooks are essential for post templates?
- Show last post of employee in his profile page
- How to get single post by one author?
- 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)
- Echo author slug in post edit page
- How to show total view count across all posts for an author
- How can I add Author’s phone number to wp profile and make it appear in wp-admin/edit.php columns
- Add author section on Author archive posts
- How to make the Post Author name fixed as “Editorial Staff” even if there are multiple authors?
- Admin notice on wp_insert_post
- users followin the blog post author
- Modify upload directory to use post category slug in file path on multisite installation
- WordPress as microblog: show excerpt instead of “(no title)” in posts view
- Comment count next to post title?