PluginProbe
Hash Form – Drag & Drop Form Builder / trunk
Hash Form – Drag & Drop Form Builder vtrunk
1.4.4 1.4.3 1.4.2 1.4.1 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8 1.1.9 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.6.1 1.2.7 1.2.8 1.2.9 1.3.0 All 47 releases
hash-form / admin / settings / email-settings.php

email-settings.php in Hash Form – Drag & Drop Form Builder trunk, at admin/settings/email-settings.php

67 lines 3.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 defined('ABSPATH') || die();
3 /*
4 * A template, included from inside a class method - never loaded on its own.
5 * The variables below are locals of the method that includes it, not globals,
6 * which is what the prefix sniff assumes about a file-scope assignment.
7 */
8 // phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- included from within a method, so these are function locals.
9
10 $image_id = '';
11 $image = '';
12 if (isset($settings['header_image'])) {
13 $image_id = $settings['header_image'];
14 $image = wp_get_attachment_image_src($settings['header_image'], 'full');
15 $image = isset($image[0]) ? esc_attr($image[0]) : '';
16 }
17 ?>
18 <div class="hf-form-container hf-grid-container">
19 <div class="hf-settings-row">
20 <label class="hf-setting-label"><?php esc_html_e('Header Image', 'hash-form'); ?></label>
21 <div class="hf-image-preview">
22 <input type="hidden" class="hf-image-id" name="hashform_settings[header_image]" id="header_image" value="<?php echo esc_attr($image_id); ?>" />
23
24 <div class="hf-image-preview-wrap<?php echo ($image ? '' : ' hf-hidden'); ?>">
25 <div class="hf-image-preview-box">
26 <?php // esc_url, not esc_attr, and omitted entirely when empty. ?>
27 <img id="hf-image-preview-header-image" alt="" <?php echo $image ? 'src="' . esc_url($image) . '"' : ''; ?> />
28 </div>
29
30 <div class="hf-image-actions">
31 <button type="button" class="button hf-replace-image">
32 <span class="mdi mdi-image-sync-outline" aria-hidden="true"></span>
33 <?php esc_html_e('Replace', 'hash-form'); ?>
34 </button>
35 <button type="button" class="button hf-remove-image">
36 <span class="mdi mdi-trash-can-outline" aria-hidden="true"></span>
37 <?php esc_html_e('Remove', 'hash-form'); ?>
38 </button>
39 </div>
40 </div>
41
42 <button type="button" class="button hf-choose-image<?php echo ($image ? ' hf-hidden' : ''); ?>">
43 <span class="mdi mdi-image-plus-outline" aria-hidden="true"></span>
44 <span class="hf-choose-image-label"><?php esc_html_e('Choose image', 'hash-form'); ?></span>
45 <span class="hf-choose-image-hint"><?php esc_html_e('From your media library', 'hash-form'); ?></span>
46 </button>
47 </div>
48 </div>
49
50 <div class="hf-settings-row">
51 <label class="hf-setting-label"><?php esc_html_e('Email Template', 'hash-form'); ?></label>
52 <select id="hf-settings-email-template" name="hashform_settings[email_template]">
53 <option value="template1" <?php selected($settings['email_template'], 'template1'); ?>><?php esc_html_e('Template 1', 'hash-form'); ?></option>
54 <option value="template2" <?php selected($settings['email_template'], 'template2'); ?>><?php esc_html_e('Template 2', 'hash-form'); ?></option>
55 <option value="template3" <?php selected($settings['email_template'], 'template3'); ?>><?php esc_html_e('Template 3', 'hash-form'); ?></option>
56 </select>
57 </div>
58
59 <div class="hf-settings-row">
60 <label class="hf-setting-label"><?php esc_html_e('Send Test Email to', 'hash-form'); ?></label>
61 <div class="hf-setting-field">
62 <input type="email" id="hf-test-email" />
63 <a href="#" class="hf-btn" id="hf-test-email-button"><?php esc_attr_e('Send Test Email', 'hash-form'); ?></a>
64 </div>
65 <div class="hf-test-email-notice"></div>
66 </div>
67 </div>