Skip to content

Commit dda90ff

Browse files
committed
Add notes to field
1 parent 8849426 commit dda90ff

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

trunk/admin.widget.class.php

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -229,12 +229,20 @@ public function render_password_field()
229229

230230
public function render_template_field()
231231
{
232-
printf(
233-
'<input type="text" id="template" name="sp_settings[template]" class="regular-text" value="%s" /><br/>
234-
<small>The template must have a variable in it named <code>{{{content}}}</code>.<br/>
235-
Note the triple curly braces, which are required to include non-escaped HTML.</small>',
236-
isset($this->options['template']) ? $this->options['template'] : ''
237-
);
232+
?>
233+
<input type="text" id="template" name="sp_settings[template]" class="regular-text"
234+
value="<?php echo $this->options['template']; ?>"/><br/>
235+
<small><strong>Important Notes</strong>
236+
<ul>
237+
<li>- Leave blank not to use Template.</li>
238+
<li>- Only valid for HTTP API.</li>
239+
<li>- The template must have a variable in it named <code>{{{content}}}</code>. Note the triple curly braces, which are required to include non-escaped HTML.
240+
</li>
241+
<li>- Use <code>{{subject}}</code> and <code>{{from_name}}</code> to substitute Subject and From Name respectively</li>
242+
<li>- From email override has no effect.</li>
243+
</ul>
244+
</small>
245+
<?php
238246
}
239247

240248
public function render_from_email_field()

0 commit comments

Comments
 (0)