From 9f8cb4ee9d645339a93584c0160013cda97d67a2 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Fri, 11 Dec 2015 14:18:21 -0500 Subject: [PATCH] Setup the html part correctly now --- controllers/front.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/controllers/front.php b/controllers/front.php index 4717791..4a9ed9d 100644 --- a/controllers/front.php +++ b/controllers/front.php @@ -168,7 +168,7 @@ class staffords_employment_front foreach ($depTax as $depTerm) { $deps[] = $depTerm->name; } - add_filter( 'wp_mail_content_type', 'set_html_content_type' ); + add_filter( 'wp_mail_content_type', array( $this, 'set_html_content_type' ) ); wp_mail( $to, @@ -177,7 +177,12 @@ class staffords_employment_front $headers ); - remove_filter( 'wp_mail_content_type', 'set_html_content_type' ); + remove_filter( 'wp_mail_content_type', array( $this, 'set_html_content_type' ) ); + } + + public function set_html_content_type() + { + return 'text/html'; } /** -- 2.17.1