@@ -131,6 +131,7 @@ public function admin_page_init()
131131 add_settings_field ('sending_method ' , 'Method* ' , array ($ this , 'render_sending_method_field ' ), 'sp-options ' , 'general ' );
132132 add_settings_field ('password ' , 'API Key* ' , array ($ this , 'render_password_field ' ), 'sp-options ' , 'general ' );
133133 add_settings_field ('enable_tracking ' , 'Enable tracking* ' , array ($ this , 'render_enable_tracking_field ' ), 'sp-options ' , 'general ' );
134+ add_settings_field ('template ' , 'Template* ' , array ($ this , 'render_template_field ' ), 'sp-options ' , 'general ' );
134135
135136 add_settings_section ('overrides ' , 'Overrides ' , null , 'sp-overrides ' );
136137 add_settings_field ('from_name ' , 'From name ' , array ($ this , 'render_from_name_field ' ), 'sp-overrides ' , 'overrides ' );
@@ -154,6 +155,10 @@ public function sanitize($input)
154155 $ new_input ['from_name ' ] = trim ($ input ['from_name ' ]);
155156 }
156157
158+ if (!empty ($ input ['template ' ])) {
159+ $ new_input ['template ' ] = trim ($ input ['template ' ]);
160+ }
161+
157162 if (empty ($ input ['password ' ])) {
158163 add_settings_error ('Password ' , esc_attr ('password ' ), 'API Key is required ' , 'error ' );
159164 } else {
@@ -222,6 +227,14 @@ public function render_password_field()
222227 );
223228 }
224229
230+ public function render_template_field ()
231+ {
232+ printf (
233+ '<input type="text" id="template" name="sp_settings[template]" class="regular-text" value="%s" /><br/> ' ,
234+ isset ($ this ->options ['template ' ]) ? $ this ->options ['template ' ] : ''
235+ );
236+ }
237+
225238 public function render_from_email_field ()
226239 {
227240 $ hint = 'Important: Domain must match with one of your verified sending domains. ' ;
0 commit comments