Skip to content

Instantly share code, notes, and snippets.

@nb
Last active December 13, 2015 18:18
Show Gist options
  • Save nb/4953815 to your computer and use it in GitHub Desktop.
Save nb/4953815 to your computer and use it in GitHub Desktop.
<?php
public function notify_project_owner( $post_id ) {
if( 'project' == get_post_type() ) {
if( 'publish' == get_post_status( $post_id ) ) {
if( 'true' != get_post_meta( $post_id, 'project_owner_emailed', true ) ) {
$this->mailer->set_subject( __( 'Your Project Has Been Published!', 'cj' ) );
$this->mailer->set_message( __( 'Need filler text.', 'cj' ) );
$this->mailer->send_mail( $this->temp_email );
update_post_meta( $post_id, 'project_owner_emailed', 'true' );
}
} elseif( 'inherit' == get_post_status( $post_id ) && ! isset( $_POST['project_is_completed'] ) && 'trash' != $_GET['action'] ) {
$this->mailer->set_subject( __( 'Your Project Has Been Updated.', 'cj' ) );
$this->mailer->set_message( __( 'Need filler text.', 'cj' ) );
$this->mailer->send_mail( $this->temp_email );
}
}
}
@nb
Copy link
Author

nb commented Feb 14, 2013

Comments are useless.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment