overriding default wordpress FROM header
authorAnthony Talarico <talarico@gaslightmedia.com>
Tue, 31 May 2016 19:33:18 +0000 (15:33 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Tue, 31 May 2016 19:33:18 +0000 (15:33 -0400)
models/front/events/frontAdd.php

index 630c304..6be8619 100644 (file)
@@ -446,7 +446,7 @@ class GLmMembersFront_events_frontAdd extends GlmDataEvents
                     );
 
         $smarty = new smartyTemplateSupport();
-
+        
         $eventsList = GLM_MEMBERS_EVENTS_PLUGIN_ADMIN_URL ."?page=glm-members-admin-menu-events-index&glm_action=index";
         $viewPath = GLM_MEMBERS_EVENTS_PLUGIN_PATH . '/views';
         $smarty->template->setTemplateDir($viewPath);
@@ -475,6 +475,13 @@ class GLmMembersFront_events_frontAdd extends GlmDataEvents
         function set_content_type(){
             return "text/html";
         }
+        
+        // change the default wordpress from name when sending mail
+        add_filter('wp_mail_from_name','yoursite_wp_mail_from_name');
+        function yoursite_wp_mail_from_name($name) {
+            $siteName = get_bloginfo('name');
+            return $siteName;
+        }
         // Send confirmation email, set the content type to allow html by using this filter
         add_filter( 'wp_mail_content_type', 'set_content_type' );