- Dialog Display On User Image Approval
- Changing A Mockup URL Slug
- Extend Backbone Models, Views, Collections
- Custom Scripts & Styles
- Website Publish Action
- New Comment Threads
- Additional Notification Emails
- Welcome Message In Mockups
- Change Subscribed User Email
- Dialog Display After A Comment
- Auto-Close Mockup Comment
- Changing Mockup Download
- Add Settngs To Extension Page
- Listening JavaScript Events
- Modify Default Mockup Project Options
- Overriding & Changing Templates
Add additional notification emails
Sometimes it’s useful to have more than just project members and administrators to project receive notifications. The best way to do this is to add additional emails using the ph_project_emails filter. This filter runs for both mockup and website project actions (comments, approvals, etc) right before it sends the email.
Here’s an example on how to use the filter. You would place this code in your theme or child theme’s functions.php file. In this example, we are subscribe all users with the Project Administrator role to get mockup and website updates via email:
<?php
/**
* Add additional emails for project actions
*/
function wp_987_add_emails_from_role( $emails = array() ) {
// get users with a specific role
$users = get_users( array(
// can also be project_editor, project_collaborator, project_client or a combo
'role__in' => array( 'project_admin' )
) );
// add each user to the email list
foreach ( $users as $user ) {
$emails[] = $user->user_email;
}
return $emails;
}
add_filter( 'ph_project_emails', 'wp_987_add_emails_from_role' );
We don't respond to the article feedback, we use it to improve our support content.