Last active
December 26, 2017 19:32
-
-
Save tripflex/fbb3a9c8c6c9bae988dfdf46e590a13c to your computer and use it in GitHub Desktop.
Add Reply-to configuration to Email Template in WP Job Manager Emails (only required for version 2.1.0 or older)
This file contains 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 | |
// edit the file located at wp-content/plugins/wp-job-manager-emails/includes/class-emails.php | |
// on line #107 you will see the the code that replaces the content shortcodes: | |
$this->content = $shortcodes->replace( $this->template->post_content ); | |
// Right below that, add this line of code: | |
$this->reply_to = $shortcodes->replace( $this->template->reply_to ); |
This file contains 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 | |
// edit the file located at wp-content/plugins/wp-job-manager-emails/includes/class-cpt.php | |
// on line #279 you will see the the $post_metas array that should look like this: | |
$post_metas = array( 'from_name', 'from_email', 'post_title', 'subject', 'to', 'bcc', 'hook', 'attachments', 'email_format', 'exclude' ); | |
// Change that entire line to look like this: | |
$post_metas = array( 'from_name', 'from_email', 'post_title', 'subject', 'to', 'bcc', 'hook', 'attachments', 'email_format', 'exclude', 'reply_to' ); | |
// As you will notice, the only change is adding 'reply-to' in the array --- this tells the email template to save the reply-to value when saving an email template |
This file contains 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 | |
// edit the file located at wp-content/plugins/wp-job-manager-emails/includes/admin/views/headers.php | |
// on line #45 you will see the closing HTML </div> for the "from_email" input field | |
// Add this code right below that closing </div> to add configuration in advanced area for reply-to | |
?> | |
<div class="field ui left icon input tooltip"> | |
<input type="text" name="reply_to" id="reply_to" value="<?php $this->the_reply_to(); ?>" placeholder="" data-content="<?php _e( 'Set a custom Reply-To address in the email (shortcodes supported)' ); ?>" data-variation="small" data-title="<?php _e( 'Reply-To (optional)' ); ?>"> | |
<i class="reply icon"></i> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment