- Display a dialog when the user approves an image
- Changing A Mockup URL Slug
- Extending Backbone Models, Views and Collections
- Adding Custom Scripts and Styles
- ph_website_publish_thread
- New Comment Threads
- Add additional notification emails
- Display a 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
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.