Yes. It is possible publish_report
action triggered whenever a report is published, or if it is edited and the status is changed to publish.
You have to done some error hadling.
function create_discussion_post( $ID, $post ) {
//Write a code to create a discussion post.
}
add_action( 'publish_report', 'create_discussion_post');
Related Posts:
- modify all posts of a category to “no comments allowed”
- How to assign classes to all elements?
- Enable comments for post when comments meta box removed
- Error 403 when posting comments to a custom post type from a different page
- Submit post and upload image from front-end
- Why are the comments disabled by default on my custom_post_types?
- Linking Two Post Types
- Pull Two Posts Into Custom Post Type `single-cpt.php`
- feed links for custom post type pages
- Problem excluding category from get_next_post
- Why is the »_builtin« parameter not advised in »register_post_type()« for custom post types?
- How to let custom post type posts show in standard post archive (like in homepage)?
- Rewrite custom post & taxonomy to share same URL path
- Recent comments on author page?
- Comment moderation on custom post types
- Automatically check “Allow comments” for custom post type [duplicate]
- Get the post children count of a post
- Quickest way to get last or oldest post date – WP Query
- How could I create a ‘private comments’ section on a custom post type?
- How to use custom fields to enable sticky posts on custom post types?
- get_template_part for custom post type content not working
- Why my custom post posts aren’t showing (404 error / page not found)
- Automaticly add slug to posts
- Show Two custom Post type and their posts on category page
- count_many_users_posts except current logged in user?
- Custom post type and body_class: Remove “blog” class
- Find the user who initially created the post
- How to get the post type from a category id?
- Is there a way to have the view link on manage posts page to open in a new window or tab?
- How i can add ‘N’ page of ‘N’ pages under posts loop?
- Getting posts under the custom post type ui category
- create parent post using wp_insert_post
- Turn on and off custom post type from admin?
- I would like to have different styles for my posts based on the content of each post
- List custom taxonomy specific to one custom post type
- Add custom post type settings to wordress default posts
- JS innerhtml changing style when using AJAX
- Side effects of Script and Iframe in post
- Several post types on WP Query by tag and taxonomy
- Portfolio Page for Classic Posts
- Admin Column does not populate with data
- Some posts from custom post type to subdomains
- wordpress remove views from action links in a custom post
- Display an authors post on a single page only when they are logged in
- Check if user has comment on current post
- Stores category posts in an array
- Add to ‘action’ within post.php to allow more actions when editing a Custom Post Type in a plugin
- duplicate comment section functionality and call it something else for custom post types
- Get post format
- How to add new post using a form to categories when categories are using as menu
- Custom wordpress loop
- Template code to split a post and print a custom field?
- Send post changes to set email addresses (not users or subscribers)
- Display post from custom post type
- Custom post type title of each author in his own post
- Custom Post type registering as page post type
- Custom Posts and Posts – next_post_link and previous_post_link not working together
- How to: Add a publish immediately button when editing custom WordPress posts?
- Extending post by email
- Checking for custom field in admin pages
- Custom Posttype URL
- Display custom post front end filter by ACF equals current user
- How to add comments to my custom post type but hide it from default WordPress Comments section?
- Best way to fix bad count on All | Mine | Published
- Get_post_custom not fetching value from array wordpress
- open custom post type in popup window instead of page
- What is the best way to structure posts for the same event happening in different years?
- Comments on posts with new custom post type redirected to another post
- How to display custom field in product description?
- How do I find the count of the current post?
- Permalink for specific post type
- SEARCH QUERIES – REVERSE OUTPUT
- Adding specific custom fields (images) to post excerpt
- Add input radio menu to post
- How to properly get the wp_postmeta.meta_value of a custom post type in specifics?
- How to add custom PHP code in post header?
- I cannot display custom posts in custom taxonomy
- How to manage a dynamic multi-level page hierearchy system?
- Custom Post By Category
- custum post inner page not taking single-gallery.php? it redirecting to archive page
- Change Custom Post Type to Post + Category
- When post is Published, insert into custom table a number – custom post type
- Get post from Category by Priority
- How To Loop Through list with Custom Post Types
- Adding Information To All Posts Screen
- Different post types arranged on one page
- erase post excerpt limitation [×]
- Custom Post Type URL Rewriting
- Comments not enabled for custom post types
- Get All post that is in table
- Display all post types together
- Pulling in a particular post into a single page based on the post id passed into the code
- Custom My account page and custom page for editing posts
- my custom_post_type does not appear in my web page…how?
- Get post from custom post type that title is like custom string [closed]
- show posts under custom post type with same autj
- How to change post cpt with submit button?
- Storing every individual update to the posts being updated over time?
- Change post structure
- display posts, pages and custom post types from another wordpress site