ActionEmailSettings.php
4.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
<?php if ( ! defined( 'ABSPATH' ) ) exit;
return apply_filters( 'ninja_forms_action_email_settings', array(
/*
|--------------------------------------------------------------------------
| Primary Settings
|--------------------------------------------------------------------------
*/
/*
* To
*/
'to' => array(
'name' => 'to',
'type' => 'textbox',
'group' => 'primary',
'label' => esc_html__( 'To', 'ninja-forms' ),
'placeholder' => esc_attr__( 'Email address or search for a field', 'ninja-forms' ),
'value' => '{wp:admin_email}',
'width' => 'one-half',
'use_merge_tags' => TRUE,
),
/*
* Reply To
*/
'reply_to' => array(
'name' => 'reply_to',
'type' => 'textbox',
'group' => 'primary',
'label' => esc_html__( 'Reply To', 'ninja-forms' ),
'placeholder' => '',
'value' => '',
'width' => 'one-half',
'use_merge_tags' => TRUE,
),
/*
* Subject
*/
'email_subject' => array(
'name' => 'email_subject',
'type' => 'textbox',
'group' => 'primary',
'label' => esc_html__( 'Subject', 'ninja-forms' ),
'placeholder' => esc_attr__( 'Subject Text or seach for a field', 'ninja-forms' ),
'value' => esc_textarea( __( 'Ninja Forms Submission', 'ninja-forms' ) ),
'width' => 'full',
'use_merge_tags' => TRUE,
),
/*
* Email Message
*/
'email_message' => array(
'name' => 'email_message',
'type' => 'rte',
'group' => 'primary',
'label' => esc_html__( 'Email Message', 'ninja-forms' ),
'placeholder' => '',
'value' => '{fields_table}',
'width' => 'full',
'use_merge_tags' => array(
'include' => array(
'calcs',
),
),
'deps' => array(
'email_format' => 'html'
)
),
'email_message_plain' => array(
'name' => 'email_message_plain',
'type' => 'textarea',
'group' => 'primary',
'label' => esc_html__( 'Email Message', 'ninja-forms' ),
'placeholder' => '',
'value' => '',
'width' => 'full',
'use_merge_tags' => TRUE,
'deps' => array(
'email_format' => 'plain'
)
),
/*
|--------------------------------------------------------------------------
| Advanced Settings
|--------------------------------------------------------------------------
*/
/*
* From Name
*/
'from_name' => array(
'name' => 'from_name',
'type' => 'textbox',
'group' => 'advanced',
'label' => esc_html__( 'From Name', 'ninja-forms' ),
'placeholder' => esc_attr__( 'Name or fields', 'ninja-forms' ),
'value' => '',
'width' => 'one-half',
'use_merge_tags' => TRUE,
),
/*
* From Address
*/
'from_address' => array(
'name' => 'from_address',
'type' => 'textbox',
'group' => 'advanced',
'label' => esc_html__( 'From Address', 'ninja-forms' ),
'placeholder' => esc_attr__( 'One email address or field', 'ninja-forms' ),
'value' => '',
'use_merge_tags' => TRUE,
),
/*
* Format
*/
'email_format' => array(
'name' => 'email_format',
'type' => 'select',
'options' => array(
array( 'label' => esc_html__( 'HTML', 'ninja-forms' ), 'value' => 'html' ),
array( 'label' => esc_html__( 'Plain Text', 'ninja-forms' ), 'value' => 'plain' )
),
'group' => 'advanced',
'label' => esc_html__( 'Format', 'ninja-forms' ),
'value' => 'html',
),
/*
* Cc
*/
'cc' => array(
'name' => 'cc',
'type' => 'textbox',
'group' => 'advanced',
'label' => esc_html__( 'Cc', 'ninja-forms' ),
'placeholder' => '',
'value' => '',
'use_merge_tags' => TRUE,
),
/*
* Bcc
*/
'bcc' => array(
'name' => 'bcc',
'type' => 'textbox',
'group' => 'advanced',
'label' => esc_html__( 'Bcc', 'ninja-forms' ),
'placeholder' => '',
'value' => '',
'use_merge_tags' => TRUE,
),
/*
* Attach CSV
*/
'attach_csv' => array(
'name' => 'attach_csv',
'type' => 'toggle',
'group' => 'primary',
'label' => esc_html__( 'Attach CSV', 'ninja-forms' ),
),
/**
* File Attachments
*/
'file_attachment' => array(
'name' => 'file_attachment',
'type' => 'media',
'group' => 'advanced',
'label' => esc_html__('Add Attachment', 'ninja-forms'),
'width' => 'full',
'use_merge_tags' => false,
)
));