Yes, it sounds like you do want a post transition hook, probably draft_to_publish
as per the following from the Codex:
function your_callback( $post ) {
// Code here
}
add_action( 'draft_to_publish', 'your_callback' );
Use authorNotification
— your function name– instead of your_callback
. It should be fairly simple in your case.
However, the precise details of your project are not clear. You may require something more complex. I can’t tell.
Related Posts:
- WordPress Author Posts Review After Every Change In The Same WordPress Post
- the_author_posts_link() for authors of custom post types
- Customize users’ capabilities to change a custom post’s post status
- Adding %author% in custom post type URL structure?
- How to programmatically create a connection with [Plugin: Posts 2 Posts] on cpt publish?
- Author archive only for custom post type
- Custom loop for custom post type for current author
- Sanitizing post content for use in an email
- Custom post type without editor or revisions – Notify on update?
- How to auto send email when publishing a custom post type?
- Show Custom Post Type by Author
- Recent comments on author page?
- wp_publish_post breaks permalinks
- Post Via Email to a Custom Post Type
- Get the terms of a custom taxonomy for a specific author in author template
- Prevent author role from editing all posts in custom post type?
- Display only custom post type count for current author on the “At a Glance” dashboard widget
- Posts created in a Custom Post Type are lost if published without a title
- Registration and Custom Post Types – How to synchronize information?
- How to fetch custom post by Author?
- WP-Admin edit.php & post.php slowdown after import of 10k users
- Check if author or current user has posts published
- Sending an email when a CPT is saved/updated (NOT when it’s created)
- Get Author for Single Post in Custom Post Type
- How can I show a custom post type for users in the authors.php file?
- WordPress post count not showing for custom post type author
- How Can I Set the Post Author of a Post I Just Created With PHP?
- Custom Post Type and Labels
- Email friend for each Custom Post Type posts on a page
- Send email button in custom post type backend
- How to only show posts assigned to current user, only in certain post types
- get_attached_media() on author page not working
- Trigger email send after custom post publish
- Notify admin on new submit
- Custom post type suppress transition from future to publish
- get_post_meta returning no value in custom post type alert email
- URL rewrite add author as base
- Edit the author of custom post type
- “Submit for review” for updates on existing posts
- Can multiple authors be assigned on a single custom post?
- Adding the_content() in custom template email
- How can the recipients and content for comment email notifications on a custom post type be changed?
- How to restrict author to only access one custom post type ?
- How to show featured image block in custom post type for Author?
- How can I move (or create another) publish button?
- Can’t publish custom post type – “You are not allowed to edit this post.”
- Get only used meta_values
- Author posts not appearing for custom post type
- detect when a custom post is cretaed for the first time
- Custom Meta Box Causing Error: “Are you sure you want to do this? Please try again.”
- post body class for current user only if they are the post author
- Restrict category access to specific users/groups. Author always has access
- Send email messages after comment was submitted
- Send post changes to set email addresses (not users or subscribers)
- Find custom post type url by author
- Display latest posts of author in a custom post type
- Custom post type title of each author in his own post
- get post count for related author
- Display author box on just certain category posts?
- Display custom post counts for author , not default posts
- Use Author Ids or Names to echo different output inside loop
- Extending post by email
- Creating an option for writing a post without an author attribution for a group blog on WordPress
- Showing only posts from the current user who is logged in?
- “Author” custom post type
- See if the email exists or not
- CPT email notification including only new value custom fields
- how to display author name in custom post type
- Limiting the Number of User Posts to Their Own Posts
- Limit custom post type to the authors only on front-end!
- Update main post with same category when creating custom post to update the modified date
- Modify Publish Metabox location on CPT
- How do I get all authors posts of a custom post type outside loop
- Send email to author of the post when the custom post status changes to published
- Why is wp_list_authors not picking up Authors from CPT’s?
- Send mail to author when custom post type is saved
- Need to display author’s email id in the “Edit post” field in wp dashboard. How do I do this?
- Delete Post by User
- How to make id user can be view content
- Display posts on parent post if author coincides
- Author archive custom posts only?
- ACF saving posts
- Set a static page as a user profile page?
- I want to link an author to everything from any post type that they publish on the website
- Get author image for posts in loop on custom type posts page
- Publish post and create additional posts with same content
- Disable Facebook Comments Automatically On CPT
- How can I get taxonomy terms and custom field values of a newly created post
- BCC email to subscribers
- send email to all registered users when post expires
- Custom Post Type Author Array Problem
- Updating User Meta from Custom Post Field Upon Publish Not Working
- Show a custom field instead of username in the backend author area
- Author template – separate custom post type by custom taxonomy term for $curauth
- CPT Metabox with email notification
- How is get_the_author connected to a custom post type?
- How to display Author Profile based on Custom field value
- how to show Author post type count
- How to create a job post by email parsing? [closed]
- Send email on creation of custom post type and use get_post_meta()