- Display a dialog when user approves an image
- Changing A Mockup URL Slug
- Extend Backbone Models, Views, Collections
- Adding Custom Scripts and Styles
- ph_website_publish_thread
- New Comment Threads
- Add additional notification emails
- Welcome message for new users on mockup projects
- Change the subscribed user email based on a role
- Display a dialog when the user submits a comment
- Auto-Close Mockup Comment After New Comment
- Changing the mockup download
- Add Settings To Extensions Page
- Listening for Javscript Events
- Change default mockup project options
- Overriding and Changing Templates
- How to Install SureFeedback & Addons
- How to Update SureFeedback
- Should I Install SureFeedback on My Main Site or a Dedicated Installation?
- Caching and SureFeedback
- Dashboard Shortcode
- Adding A Project Shortcode To Your Site 3.1.x and lower
- Project Shortcode
- Hosting
- Cloudways Compatibility
ph_website_publish_thread
This action runs after a new website thread is published.
Parameters
- $post_ID – (int) Post ID.
- $thread – (WP_Post) Post object for the thread.
Examples
<?php
function my_project_created_send_email( $post_id, $thread) {
$thread_url = get_permalink( $post_id );
$subject = 'A new conversation has been started.';
// get webpage id (parent_id)
$webpage_id = get_post_meta( $post_id, 'parent_id', true);
$message = " A new conversation has been started on " . get_the_title($webpage_id) . ". \n\n";
$message .="View it" . $post_url;
// Send email to admin.
wp_mail( '[email protected]', $subject, $message );
}
add_action( 'ph_website_publish_thread', 'my_project_created_send_email', 10, 3 );
Was this doc helpful?
What went wrong?
We don't respond to the article feedback, we use it to improve our support content.
On this page