Last active
December 13, 2015 18:18
-
-
Save nb/4953815 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 ); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Comments are useless.