Custom Login Page Customizer - Version 1.0.7

Version Description

Download this release

Release Info

Developer codeinwp
Plugin Icon 128x128 Custom Login Page Customizer
Version 1.0.7
Comparing to
See all releases

Version 1.0.7

css/admin.css ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .logincust-success{
2
+ border: 2px solid #398f14
3
+ }
4
+
5
+ .appearance_page_logincust_options #wpcontent #wrap h3,
6
+ .appearance_page_logincust_options #wpcontent #wrap h2,
7
+ .appearance_page_logincust_options #wpcontent #wrap a,
8
+ .appearance_page_logincust_options #wpcontent #wrap {
9
+ color:#777;
10
+ }
11
+ #logincust-logo{
12
+ background:url("<?php echo LOGINCUST_FREE_URL; ?>/css/logo.png") ;
13
+ width: 123px;
14
+ height: 85px;
15
+ background-repeat: no-repeat;
16
+ background-position: center;
17
+ position: absolute;
18
+ right: 13%;
19
+ }
20
+ .appearance_page_logincust_options #submit:hover{
21
+
22
+ background: #FF907A !important;
23
+ border-color: #FF9D89 !important;
24
+ }
25
+ .appearance_page_logincust_options #submit{
26
+ color:#fff !important;
27
+
28
+ background: #FF7F66 !important;
29
+ border-color: #FF5F3F !important;
30
+ box-shadow: 0px 1px 0px #FF9682 inset, 0px 1px 0px rgba(0, 0, 0, 0.15);
31
+ text-shadow: none;
32
+ }
33
+ .appearance_page_logincust_options #wpcontent {
34
+ background:#fff;
35
+ }
css/bg.png ADDED
Binary file
css/disable_controls.css ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .logincust_pro_text a{
2
+
3
+ color:#A00;
4
+ }
5
+ .logincust_pro_text{
6
+ text-align: center;
7
+ font-weight: bold;
8
+ background-color: #F5F5F5;
9
+ padding: 10px;
10
+ margin-top: 0px;
11
+ width: 94%;
12
+ padding: 0px;
13
+ padding-top: 3px;
14
+ font-size: 12px;
15
+ padding-left: 28px;
16
+ margin-left: -21px;
17
+ padding-right: 28px;
18
+ margin-top: -10px;
19
+ }
20
+ #accordion-section-logincust_security_section h3:hover,
21
+ #accordion-section-logincust_security_section h3{
22
+ background-image: url("security.png") !important;
23
+ background-repeat: no-repeat!important;;
24
+ background-position: 85% !important;
25
+ background-size: 25% !important;;
26
+
27
+ }
css/logo.png ADDED
Binary file
css/security.png ADDED
Binary file
customizer.php ADDED
@@ -0,0 +1,561 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+
4
+ function logincust_customize_register($wp_customize)
5
+ {
6
+ $wp_customize->add_panel( 'logincust_panel', array(
7
+ 'priority' => 30,
8
+ 'capability' => 'edit_theme_options',
9
+ 'title' => __('Login Customizer', LOGINCUST_TEXTDOMAIN),
10
+ 'description' => __('This section allows you to customize the login page of your website.<br/>Login Customizer by <a target="_blank" rel="nofollow" href="https://themeisle.com">ThemeIsle</a>', LOGINCUST_TEXTDOMAIN),
11
+ ));
12
+
13
+ $wp_customize->add_section('logincust_logo_section', array(
14
+ 'priority' => 5,
15
+ 'title' => __('Logo', LOGINCUST_TEXTDOMAIN),
16
+ 'panel' => 'logincust_panel',
17
+ ));
18
+
19
+ $wp_customize->add_section('logincust_background_section', array(
20
+ 'priority' => 10,
21
+ 'title' => __('Background', LOGINCUST_TEXTDOMAIN),
22
+ 'panel' => 'logincust_panel',
23
+ ));
24
+
25
+ $wp_customize->add_section('logincust_form_bg_section', array(
26
+ 'priority' => 15,
27
+ 'title' => __('Form Background', LOGINCUST_TEXTDOMAIN),
28
+ 'panel' => 'logincust_panel',
29
+ ));
30
+
31
+ $wp_customize->add_section('logincust_form_section', array(
32
+ 'priority' => 20,
33
+ 'title' => __('Form Styling', LOGINCUST_TEXTDOMAIN),
34
+ 'panel' => 'logincust_panel',
35
+ ));
36
+
37
+ $wp_customize->add_section('logincust_field_section', array(
38
+ 'priority' => 25,
39
+ 'title' => __('Fields Styling', LOGINCUST_TEXTDOMAIN),
40
+ 'panel' => 'logincust_panel',
41
+ ));
42
+
43
+ $wp_customize->add_section('logincust_button_section', array(
44
+ 'priority' => 30,
45
+ 'title' => __('Button Styling', LOGINCUST_TEXTDOMAIN),
46
+ 'panel' => 'logincust_panel',
47
+ ));
48
+
49
+ $wp_customize->add_section('logincust_other_section', array(
50
+ 'priority' => 35,
51
+ 'title' => __('Other', LOGINCUST_TEXTDOMAIN),
52
+ 'panel' => 'logincust_panel',
53
+ ));
54
+
55
+ $wp_customize->add_section('logincust_security_section', array(
56
+ 'priority' => 40,
57
+ 'title' => __('Security', LOGINCUST_TEXTDOMAIN),
58
+ 'panel' => 'logincust_panel',
59
+ ));
60
+
61
+ $wp_customize->add_setting('logincust_logo', array(
62
+ 'type' => 'option',
63
+ 'capability' => 'edit_theme_options',
64
+ ));
65
+
66
+ $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'logincust_logo', array(
67
+ 'label' => __('Login Logo', LOGINCUST_TEXTDOMAIN),
68
+ 'section' => 'logincust_logo_section',
69
+ 'priority' => 5,
70
+ 'settings' => 'logincust_logo'
71
+ )));
72
+
73
+ $wp_customize->add_setting('logincust_logo_width', array(
74
+ 'default' => '84px',
75
+ 'type' => 'option',
76
+ 'capability' => 'edit_theme_options',
77
+ ));
78
+
79
+ $wp_customize->add_control('logincust_logo_width', array(
80
+ 'label' => __('Logo Width', LOGINCUST_TEXTDOMAIN),
81
+ 'section' => 'logincust_logo_section',
82
+ 'priority' => 10,
83
+ 'settings' => 'logincust_logo_width'
84
+ ));
85
+
86
+ $wp_customize->add_setting('logincust_logo_height', array(
87
+ 'default' => '84px',
88
+ 'type' => 'option',
89
+ 'capability' => 'edit_theme_options',
90
+ ));
91
+
92
+ $wp_customize->add_control('logincust_logo_height', array(
93
+ 'label' => __('Logo Height', LOGINCUST_TEXTDOMAIN),
94
+ 'section' => 'logincust_logo_section',
95
+ 'priority' => 15,
96
+ 'settings' => 'logincust_logo_height'
97
+ ));
98
+
99
+ $wp_customize->add_setting('logincust_logo_padding', array(
100
+ 'default' => '5px',
101
+ 'type' => 'option',
102
+ 'capability' => 'edit_theme_options',
103
+ ));
104
+
105
+ $wp_customize->add_control('logincust_logo_padding', array(
106
+ 'label' => __('Padding Bottom', LOGINCUST_TEXTDOMAIN),
107
+ 'section' => 'logincust_logo_section',
108
+ 'priority' => 20,
109
+ 'settings' => 'logincust_logo_padding'
110
+ ));
111
+
112
+ $wp_customize->add_setting('logincust_bg_image', array(
113
+ 'type' => 'option',
114
+ 'capability' => 'edit_theme_options',
115
+ ));
116
+
117
+ $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'logincust_bg_image', array(
118
+ 'label' => __('Background Image', LOGINCUST_TEXTDOMAIN),
119
+ 'section' => 'logincust_background_section',
120
+ 'priority' => 5,
121
+ 'settings' => 'logincust_bg_image'
122
+ )));
123
+
124
+ $wp_customize->add_setting('logincust_bg_color', array(
125
+ 'default' => '#F1F1F1',
126
+ 'type' => 'option',
127
+ 'capability' => 'edit_theme_options',
128
+ ));
129
+
130
+ $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'logincust_bg_color', array(
131
+ 'label' => __('Background Color', LOGINCUST_TEXTDOMAIN),
132
+ 'section' => 'logincust_background_section',
133
+ 'priority' => 10,
134
+ 'settings' => 'logincust_bg_color'
135
+ )));
136
+
137
+ $wp_customize->add_setting('logincust_bg_size', array(
138
+ 'type' => 'option',
139
+ 'capability' => 'edit_theme_options',
140
+ ));
141
+
142
+ $wp_customize->add_control('logincust_bg_size', array(
143
+ 'label' => __('Background Size', LOGINCUST_TEXTDOMAIN),
144
+ 'section' => 'logincust_background_section',
145
+ 'priority' => 15,
146
+ 'settings' => 'logincust_bg_size'
147
+ ));
148
+
149
+ $wp_customize->add_setting('logincust_form_bg_image', array(
150
+ 'type' => 'option',
151
+ 'capability' => 'edit_theme_options',
152
+ ));
153
+
154
+ $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'logincust_form_bg_image', array(
155
+ 'label' => __('Background Image', LOGINCUST_TEXTDOMAIN),
156
+ 'section' => 'logincust_form_bg_section',
157
+ 'priority' => 5,
158
+ 'settings' => 'logincust_form_bg_image'
159
+ )));
160
+
161
+ $wp_customize->add_setting('logincust_form_bg_color', array(
162
+ 'default' => '#FFF',
163
+ 'type' => 'option',
164
+ 'capability' => 'edit_theme_options',
165
+ ));
166
+
167
+ $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'logincust_form_bg_color', array(
168
+ 'label' => __('Background Color', LOGINCUST_TEXTDOMAIN),
169
+ 'section' => 'logincust_form_bg_section',
170
+ 'priority' => 10,
171
+ 'settings' => 'logincust_form_bg_color'
172
+ )));
173
+
174
+ $wp_customize->add_setting('logincust_form_width', array(
175
+ 'default' => '320px',
176
+ 'type' => 'option',
177
+ 'capability' => 'edit_theme_options',
178
+ ));
179
+
180
+ $wp_customize->add_control('logincust_form_width', array(
181
+ 'label' => __('Width', LOGINCUST_TEXTDOMAIN),
182
+ 'section' => 'logincust_form_section',
183
+ 'priority' => 15,
184
+ 'settings' => 'logincust_form_width'
185
+ ));
186
+
187
+ $wp_customize->add_setting('logincust_form_height', array(
188
+ 'default' => '194px',
189
+ 'type' => 'option',
190
+ 'capability' => 'edit_theme_options',
191
+ ));
192
+
193
+ $wp_customize->add_control('logincust_form_height', array(
194
+ 'label' => __('Height', LOGINCUST_TEXTDOMAIN),
195
+ 'section' => 'logincust_form_section',
196
+ 'priority' => 20,
197
+ 'settings' => 'logincust_form_height'
198
+ ));
199
+
200
+ $wp_customize->add_setting('logincust_form_padding', array(
201
+ 'default' => '26px 24px 46px',
202
+ 'type' => 'option',
203
+ 'capability' => 'edit_theme_options',
204
+ ));
205
+
206
+ $wp_customize->add_control('logincust_form_padding', array(
207
+ 'label' => __('Padding', LOGINCUST_TEXTDOMAIN),
208
+ 'section' => 'logincust_form_section',
209
+ 'priority' => 25,
210
+ 'settings' => 'logincust_form_padding'
211
+ ));
212
+
213
+ $wp_customize->add_setting('logincust_form_border', array(
214
+ 'type' => 'option',
215
+ 'capability' => 'edit_theme_options',
216
+ ));
217
+
218
+ $wp_customize->add_control('logincust_form_border', array(
219
+ 'label' => __('Border (Example: 2px dotted black) ', LOGINCUST_TEXTDOMAIN),
220
+ 'section' => 'logincust_form_section',
221
+ 'priority' => 30,
222
+ 'settings' => 'logincust_form_border'
223
+ ));
224
+
225
+ $wp_customize->add_setting('logincust_field_width', array(
226
+ 'default' => '100%',
227
+ 'type' => 'option',
228
+ 'capability' => 'edit_theme_options',
229
+ ));
230
+
231
+ $wp_customize->add_control('logincust_field_width', array(
232
+ 'label' => __('Input Field Width', LOGINCUST_TEXTDOMAIN),
233
+ 'section' => 'logincust_field_section',
234
+ 'priority' => 5,
235
+ 'settings' => 'logincust_field_width'
236
+ ));
237
+
238
+ $wp_customize->add_setting('logincust_field_margin', array(
239
+ 'default' => '2px 6px 16px 0px',
240
+ 'type' => 'option',
241
+ 'capability' => 'edit_theme_options',
242
+ ));
243
+
244
+ $wp_customize->add_control('logincust_field_margin', array(
245
+ 'label' => __('Input Field Margin', LOGINCUST_TEXTDOMAIN),
246
+ 'section' => 'logincust_field_section',
247
+ 'priority' => 10,
248
+ 'settings' => 'logincust_field_margin'
249
+ ));
250
+
251
+ $wp_customize->add_setting('logincust_field_bg', array(
252
+ 'default' => '#FFF',
253
+ 'type' => 'option',
254
+ 'capability' => 'edit_theme_options',
255
+ ));
256
+
257
+ $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'logincust_field_bg', array(
258
+ 'label' => __('Input Field Background', LOGINCUST_TEXTDOMAIN),
259
+ 'section' => 'logincust_field_section',
260
+ 'priority' => 15,
261
+ 'settings' => 'logincust_field_bg'
262
+ )));
263
+
264
+ $wp_customize->add_setting('logincust_field_color', array(
265
+ 'default' => '#333',
266
+ 'type' => 'option',
267
+ 'capability' => 'edit_theme_options',
268
+ ));
269
+
270
+ $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'logincust_field_color', array(
271
+ 'label' => __('Input Field Color', LOGINCUST_TEXTDOMAIN),
272
+ 'section' => 'logincust_field_section',
273
+ 'priority' => 20,
274
+ 'settings' => 'logincust_field_color'
275
+ )));
276
+
277
+ $wp_customize->add_setting('logincust_field_label', array(
278
+ 'default' => '#777',
279
+ 'type' => 'option',
280
+ 'capability' => 'edit_theme_options',
281
+ ));
282
+
283
+ $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'logincust_field_label', array(
284
+ 'label' => __('Label Color', LOGINCUST_TEXTDOMAIN),
285
+ 'section' => 'logincust_field_section',
286
+ 'priority' => 25,
287
+ 'settings' => 'logincust_field_label'
288
+ )));
289
+
290
+ $wp_customize->add_setting('logincust_button_bg', array(
291
+ 'default' => '#2EA2CC',
292
+ 'type' => 'option',
293
+ 'capability' => 'edit_theme_options',
294
+ ));
295
+
296
+ $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'logincust_button_bg', array(
297
+ 'label' => __('Button Background', LOGINCUST_TEXTDOMAIN),
298
+ 'section' => 'logincust_button_section',
299
+ 'priority' => 5,
300
+ 'settings' => 'logincust_button_bg'
301
+ )));
302
+
303
+ $wp_customize->add_setting('logincust_button_border', array(
304
+ 'default' => '#0074A2',
305
+ 'type' => 'option',
306
+ 'capability' => 'edit_theme_options',
307
+ ));
308
+
309
+ $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'logincust_button_border', array(
310
+ 'label' => __('Button Border', LOGINCUST_TEXTDOMAIN),
311
+ 'section' => 'logincust_button_section',
312
+ 'priority' => 10,
313
+ 'settings' => 'logincust_button_border'
314
+ )));
315
+
316
+ $wp_customize->add_setting('logincust_button_hover_bg', array(
317
+ 'default' => '#1E8CBE',
318
+ 'type' => 'option',
319
+ 'capability' => 'edit_theme_options',
320
+ ));
321
+
322
+ $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'logincust_button_hover_bg', array(
323
+ 'label' => __('Button Background (Hover)', LOGINCUST_TEXTDOMAIN),
324
+ 'section' => 'logincust_button_section',
325
+ 'priority' => 15,
326
+ 'settings' => 'logincust_button_hover_bg'
327
+ )));
328
+
329
+ $wp_customize->add_setting('logincust_button_hover_border', array(
330
+ 'default' => '#0074A2',
331
+ 'type' => 'option',
332
+ 'capability' => 'edit_theme_options',
333
+ ));
334
+
335
+ $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'logincust_button_hover_border', array(
336
+ 'label' => __('Button Border (Hover)', LOGINCUST_TEXTDOMAIN),
337
+ 'section' => 'logincust_button_section',
338
+ 'priority' => 20,
339
+ 'settings' => 'logincust_button_hover_border'
340
+ )));
341
+
342
+ $wp_customize->add_setting('logincust_button_shadow', array(
343
+ 'default' => '#78C8E6',
344
+ 'type' => 'option',
345
+ 'capability' => 'edit_theme_options',
346
+ ));
347
+
348
+ $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'logincust_button_shadow', array(
349
+ 'label' => __('Button Box Shadow', LOGINCUST_TEXTDOMAIN),
350
+ 'section' => 'logincust_button_section',
351
+ 'priority' => 25,
352
+ 'settings' => 'logincust_button_shadow'
353
+ )));
354
+
355
+ $wp_customize->add_setting('logincust_button_color', array(
356
+ 'default' => '#FFF',
357
+ 'type' => 'option',
358
+ 'capability' => 'edit_theme_options',
359
+ ));
360
+
361
+ $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'logincust_button_color', array(
362
+ 'label' => __('Button Color', LOGINCUST_TEXTDOMAIN),
363
+ 'section' => 'logincust_button_section',
364
+ 'priority' => 30,
365
+ 'settings' => 'logincust_button_color'
366
+ )));
367
+
368
+ $wp_customize->add_setting('logincust_other_color', array(
369
+ 'default' => '#999',
370
+ 'type' => 'option',
371
+ 'capability' => 'edit_theme_options',
372
+ ));
373
+
374
+ $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'logincust_other_color', array(
375
+ 'label' => __('Text Color', LOGINCUST_TEXTDOMAIN),
376
+ 'section' => 'logincust_other_section',
377
+ 'priority' => 5,
378
+ 'settings' => 'logincust_other_color'
379
+ )));
380
+
381
+ $wp_customize->add_setting('logincust_other_color_hover', array(
382
+ 'default' => '#2EA2CC',
383
+ 'type' => 'option',
384
+ 'capability' => 'edit_theme_options',
385
+ ));
386
+
387
+ $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'logincust_other_color_hover', array(
388
+ 'label' => __('Text Color (Hover)', LOGINCUST_TEXTDOMAIN),
389
+ 'section' => 'logincust_other_section',
390
+ 'priority' => 10,
391
+ 'settings' => 'logincust_other_color_hover'
392
+ )));
393
+
394
+ $wp_customize->add_setting('logincust_other_css', array(
395
+ 'type' => 'option',
396
+ 'capability' => 'edit_theme_options',
397
+ ));
398
+
399
+ $wp_customize->add_control('logincust_other_css', array(
400
+ 'label' => __('Custom CSS', LOGINCUST_TEXTDOMAIN),
401
+ 'type' => 'textarea',
402
+ 'section' => 'logincust_other_section',
403
+ 'priority' => 15,
404
+ 'settings' => 'logincust_other_css'
405
+ ));
406
+
407
+ }
408
+ add_action('customize_register', 'logincust_customize_register');
409
+
410
+ function logincust_customizer() {
411
+ $logo_url = get_option('logincust_logo');
412
+ $logo_width = get_option('logincust_logo_width');
413
+ $logo_height = get_option('logincust_logo_height');
414
+ $logo_padding = get_option('logincust_logo_padding');
415
+ $bg_img = get_option('logincust_bg_image');
416
+ $bg_color = get_option('logincust_bg_color');
417
+ $bg_size = get_option('logincust_bg_size');
418
+ $form_bg_image = get_option('logincust_form_bg_image');
419
+ $form_bg_color = get_option('logincust_form_bg_color');
420
+ $form_width = get_option('logincust_form_width');
421
+ $form_height = get_option('logincust_form_height');
422
+ $form_padding = get_option('logincust_form_padding');
423
+ $form_border = get_option('logincust_form_border');
424
+ $field_width = get_option('logincust_field_width');
425
+ $field_margin = get_option('logincust_field_margin');
426
+ $field_bg = get_option('logincust_field_bg');
427
+ $field_color = get_option('logincust_field_color');
428
+ $field_label = get_option('logincust_field_label');
429
+ $button_bg = get_option('logincust_button_bg');
430
+ $button_border = get_option('logincust_button_border');
431
+ $button_shadow = get_option('logincust_button_shadow');
432
+ $button_color = get_option('logincust_button_color');
433
+ $button_hover_bg = get_option('logincust_button_hover_bg');
434
+ $button_hover_border = get_option('logincust_button_hover_border');
435
+ $other_color = get_option('logincust_other_color');
436
+ $other_color_hover = get_option('logincust_other_color_hover');
437
+ $other_css = get_option('logincust_other_css');
438
+ ?>
439
+ <style type="text/css">
440
+ html, body {
441
+ <?php if( !empty($bg_img)) : ?>
442
+ background-image: url(<?php echo $bg_img; ?>) !important;
443
+ <?php endif; ?>
444
+ <?php if( !empty($bg_color)) : ?>
445
+ background-color: <?php echo $bg_color; ?> !important;
446
+ <?php endif; ?>
447
+ <?php if( !empty($bg_url)) : ?>
448
+ background-size: <?php echo $bg_size; ?> !important;
449
+ <?php endif; ?>
450
+ }
451
+ body.login div#login h1 a {
452
+ <?php if( !empty($logo_url)) : ?>
453
+ background-image: url(<?php echo $logo_url; ?>) !important;
454
+ <?php endif; ?>
455
+ <?php if( !empty($logo_width)) : ?>
456
+ width: <?php echo $logo_width; ?> !important;
457
+ <?php endif; ?>
458
+ <?php if( !empty($logo_height)) : ?>
459
+ height: <?php echo $logo_height; ?> !important;
460
+ <?php endif; ?>
461
+ <?php if( !empty($logo_width) || !empty($logo_height)) : ?>
462
+ background-size: <?php echo $logo_width; ?> <?php echo $logo_height; ?> !important;
463
+ <?php endif; ?>
464
+ <?php if( !empty($logo_padding)) : ?>
465
+ padding-bottom: <?php echo $logo_padding; ?> !important;
466
+ <?php endif; ?>
467
+ }
468
+ #loginform {
469
+ <?php if( !empty($form_bg_image)) : ?>
470
+ background-image: url(<?php echo $form_bg_image; ?>) !important;
471
+ <?php endif; ?>
472
+ <?php if( !empty($form_bg_color)) : ?>
473
+ background-color: <?php echo $form_bg_color; ?> !important;
474
+ <?php endif; ?>
475
+ <?php if( !empty($form_height)) : ?>
476
+ height: <?php echo $form_height; ?> !important;
477
+ <?php endif; ?>
478
+ <?php if( !empty($form_padding)) : ?>
479
+ padding: <?php echo $form_padding; ?> !important;
480
+ <?php endif; ?>
481
+ <?php if( !empty($form_border)) : ?>
482
+ border: <?php echo $form_border; ?> !important;
483
+ <?php endif; ?>
484
+ }
485
+ #login {
486
+ <?php if( !empty($form_width)) : ?>
487
+ width: <?php echo $form_width; ?> !important;
488
+ <?php endif; ?>
489
+ }
490
+ .login form .input, .login input[type="text"] {
491
+ <?php if( !empty($field_width)) : ?>
492
+ width: <?php echo $field_width; ?> !important;
493
+ <?php endif; ?>
494
+ <?php if( !empty($field_margin)) : ?>
495
+ margin: <?php echo $field_margin; ?> !important;
496
+ <?php endif; ?>
497
+ <?php if( !empty($field_bg)) : ?>
498
+ background: <?php echo $field_bg; ?> !important;
499
+ <?php endif; ?>
500
+ <?php if( !empty($field_color)) : ?>
501
+ color: <?php echo $field_color; ?> !important;
502
+ <?php endif; ?>
503
+ }
504
+ .login label {
505
+ <?php if( !empty($field_label)) : ?>
506
+ color: <?php echo $field_label; ?> !important;
507
+ <?php endif; ?>
508
+ }
509
+ .wp-core-ui .button-primary {
510
+ <?php if( !empty($button_bg)) : ?>
511
+ background: <?php echo $button_bg; ?> !important;
512
+ <?php endif; ?>
513
+ <?php if( !empty($button_border)) : ?>
514
+ border-color: <?php echo $button_border; ?> !important;
515
+ <?php endif; ?>
516
+ <?php if( !empty($button_shadow)) : ?>
517
+ box-shadow: 0px 1px 0px <?php echo $button_shadow; ?> inset, 0px 1px 0px rgba(0, 0, 0, 0.15);
518
+ <?php endif; ?>
519
+ <?php if( !empty($button_color)) : ?>
520
+ color: <?php echo $button_color; ?> !important;
521
+ <?php endif; ?>
522
+ }
523
+ .wp-core-ui .button-primary.focus, .wp-core-ui .button-primary.hover, .wp-core-ui .button-primary:focus, .wp-core-ui .button-primary:hover {
524
+ <?php if( !empty($button_hover_bg)) : ?>
525
+ background: <?php echo $button_hover_bg; ?> !important;
526
+ <?php endif; ?>
527
+ <?php if( !empty($button_hover_border)) : ?>
528
+ border-color: <?php echo $button_hover_border; ?> !important;
529
+ <?php endif; ?>
530
+ }
531
+ .login #backtoblog a, .login #nav a {
532
+ <?php if( !empty($other_color)) : ?>
533
+ color: <?php echo $other_color; ?> !important;
534
+ <?php endif; ?>
535
+ }
536
+ .login #backtoblog a:hover, .login #nav a:hover, .login h1 a:hover {
537
+ <?php if( !empty($other_color_hover)) : ?>
538
+ color: <?php echo $other_color_hover; ?> !important;
539
+ <?php endif; ?>
540
+ }
541
+ <?php if( !empty($other_css)) : ?>
542
+ <?php echo $other_css; ?>
543
+ <?php endif; ?>
544
+ </style>
545
+ <?php
546
+ }
547
+
548
+ add_action( 'login_enqueue_scripts', 'logincust_customizer' );
549
+
550
+ function logincust_login_logo_url() {
551
+ return get_bloginfo( 'url' );
552
+ }
553
+ add_filter( 'login_headerurl', 'logincust_login_logo_url' );
554
+
555
+ function logincust_login_logo_url_title() {
556
+ $title = get_bloginfo( 'name', 'display' );
557
+ return $title;
558
+ }
559
+ add_filter( 'login_headertitle', 'logincust_login_logo_url_title' );
560
+
561
+ ?>
includes/class-remote-notification-client.php ADDED
@@ -0,0 +1,381 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Remote Dashobard Notifications.
4
+ *
5
+ * This class is part of the Remote Dashboard Notifications plugin.
6
+ * This plugin allows you to send notifications to your client's
7
+ * WordPress dashboard easily.
8
+ *
9
+ * Notification you send will be displayed as admin notifications
10
+ * using the standard WordPress hooks. A "dismiss" option is added
11
+ * in order to let the user hide the notification.
12
+ *
13
+ * @package Remote Dashboard Notifications
14
+ * @author ThemeAvenue <web@themeavenue.net>
15
+ * @license GPL-2.0+
16
+ * @link http://themeavenue.net
17
+ * @link http://wordpress.org/plugins/remote-dashboard-notifications/
18
+ * @link https://github.com/ThemeAvenue/Remote-Dashboard-Notifications
19
+ * @copyright 2014 ThemeAvenue
20
+ */
21
+
22
+ // If this file is called directly, abort.
23
+ if ( ! defined( 'WPINC' ) ) {
24
+ die;
25
+ }
26
+
27
+ class TAV_Remote_Notification_Client {
28
+
29
+ /**
30
+ * Class version.
31
+ *
32
+ * @since 0.1.0
33
+ *
34
+ * @var string
35
+ */
36
+ protected static $version = '0.1.2';
37
+
38
+ public function __construct( $channel_id = false, $channel_key = false, $server = false, $debug = false ) {
39
+
40
+ /* Don't continue during Ajax process */
41
+ if( !is_admin() || defined( 'DOING_AJAX' ) && DOING_AJAX )
42
+ return;
43
+
44
+ $this->id = intval( $channel_id );
45
+ $this->key = sanitize_key( $channel_key );
46
+ $this->server = esc_url( $server );
47
+ $this->notice = false;
48
+ $this->cache = apply_filters( 'rn_notice_caching_time', 6 );
49
+ $this->debug = $debug;
50
+ $this->error = null;
51
+
52
+ /* The plugin can't work without those 2 parameters */
53
+ if( false === ( $this->id || $this->key || $this->server ) )
54
+ return;
55
+
56
+ /* Call the dismiss method before testing for Ajax */
57
+ if( isset( $_GET['rn'] ) && isset( $_GET['notification'] ) )
58
+ add_action( 'init', array( $this, 'dismiss' ) );
59
+
60
+ add_action( 'init', array( $this, 'request_server' ) );
61
+
62
+ }
63
+
64
+ /**
65
+ * Send a request to notification server
66
+ *
67
+ * The distant WordPress notification server is
68
+ * queried using the WordPress HTTP API.
69
+ *
70
+ * @since 0.1.0
71
+ */
72
+ public function request_server() {
73
+
74
+ /* Current channel ID */
75
+ $channel_id = $this->id;
76
+
77
+ /* Current channel key */
78
+ $channel_key = $this->key;
79
+
80
+ /* Generate a unique identifyer used for the transient */
81
+ $uniqid = $channel_id . substr( $channel_key, 0, 5 );
82
+
83
+ /* Prepare the payload to send to server */
84
+ $payload = base64_encode( json_encode( array( 'channel' => $channel_id, 'key' => $channel_key ) ) );
85
+
86
+ /* Get the endpoint URL ready */
87
+ $url = add_query_arg( array( 'payload' => $payload ), $this->server );
88
+
89
+ /* Content is false at first */
90
+ $content = get_transient( "rn_last_notification_$uniqid" );
91
+
92
+ /* Set the request response to null */
93
+ $request = null;
94
+
95
+ /* If no notice is present in DB we query the server */
96
+ if( false === $content || defined( 'RDN_DEV' ) && RDN_DEV ) {
97
+
98
+ /* Query the server */
99
+ $request = wp_remote_get( $url, array( 'timeout' => apply_filters( 'rn_http_request_timeout', 5 ) ) );
100
+
101
+ /* If we have a WP_Error object we abort */
102
+ if( is_wp_error( $request ) )
103
+ return;
104
+
105
+ /* Check if we have a valid response */
106
+ if( is_array( $request ) && isset( $request['response']['code'] ) && 200 === intval( $request['response']['code'] ) ) {
107
+
108
+ /* Get the response body */
109
+ if( isset( $request['body'] ) ) {
110
+
111
+ /**
112
+ * Decode the response JSON string
113
+ */
114
+ $content = json_decode( $request['body'] );
115
+
116
+ /**
117
+ * Check if the payload is in a usable JSON format
118
+ */
119
+ if( version_compare( phpversion(), '5.3.0', '>=' ) ) {
120
+
121
+ if( ! ( json_last_error() == JSON_ERROR_NONE ) )
122
+ return false;
123
+
124
+ } else {
125
+
126
+ if( $content == NULL )
127
+ return false;
128
+
129
+ }
130
+
131
+ set_transient( "rn_last_notification_$uniqid", $content, $this->cache*60*60*5 );
132
+
133
+ }
134
+
135
+ }
136
+
137
+ }
138
+
139
+ /**
140
+ * If the JSON string has been decoded we can go ahead
141
+ */
142
+ if( is_object( $content ) ) {
143
+
144
+ if( isset( $content->error ) ) {
145
+
146
+ /* Display debug info in the admin footer */
147
+ if( true === $this->debug ) {
148
+
149
+ /* Save the error message */
150
+ $this->error = $content->error;
151
+
152
+ /* Display it commented in the footer */
153
+ add_action( 'admin_footer', array( $this, 'debug_info' ) );
154
+
155
+ }
156
+
157
+ /* Stop */
158
+ return;
159
+
160
+ }
161
+
162
+ $this->notice = $content;
163
+
164
+ /**
165
+ * Check if notice has already been dismissed
166
+ */
167
+ $dismissed = get_option( '_rn_dismissed' );
168
+
169
+ if( is_array( $dismissed ) && in_array( $content->slug, $dismissed ) )
170
+ return;
171
+
172
+ /**
173
+ * Add the notice style
174
+ */
175
+ add_action( 'admin_print_styles', array( $this, 'style' ), 100 );
176
+
177
+ /**
178
+ * Add the notice to WP dashboard
179
+ */
180
+ add_action( 'admin_notices', array( $this, 'show_notice' ) );
181
+
182
+ } else {
183
+
184
+ return false;
185
+
186
+ }
187
+
188
+ }
189
+
190
+ /**
191
+ * Display the admin notice
192
+ *
193
+ * The function will do some checks to verify if
194
+ * the notice can be displayed on the current page.
195
+ * If all the checks are passed, the notice
196
+ * is added to the page.
197
+ *
198
+ * @since 0.1.0
199
+ */
200
+ public function show_notice() {
201
+
202
+ $content = $this->notice;
203
+
204
+ /* If there is no content we abort */
205
+ if( false === $content )
206
+ return;
207
+
208
+ /* If the type array isn't empty we have a limitation */
209
+ if( isset( $content->type ) && is_array( $content->type ) && !empty( $content->type ) ) {
210
+
211
+ /* Get current post type */
212
+ $pt = get_post_type();
213
+
214
+ /**
215
+ * If the current post type can't be retrieved
216
+ * or if it's not in the allowed post types,
217
+ * then we don't display the admin notice.
218
+ */
219
+ if( false === $pt || !in_array( $pt, $content->type ) )
220
+ return;
221
+
222
+ }
223
+
224
+ /* Prepare alert class */
225
+ $style = isset( $content->style ) ? $content->style : 'updated';
226
+
227
+ if( 'updated' == $style )
228
+ $class = $style;
229
+
230
+ elseif( 'error' == $style )
231
+ $class = 'updated error';
232
+
233
+ else
234
+ $class = "updated rn-alert rn-alert-$style";
235
+
236
+ /**
237
+ * Prepare the dismiss URL
238
+ *
239
+ * @var (string) URL
240
+ * @todo get a more accurate URL of the current page
241
+ */
242
+ $args = array();
243
+ $nonce = wp_create_nonce( 'rn-dismiss' );
244
+ $slug = $content->slug;
245
+
246
+ array_push( $args, "rn=$nonce" );
247
+ array_push( $args, "notification=$slug" );
248
+
249
+ foreach( $_GET as $key => $value ) {
250
+
251
+ array_push( $args, "$key=$value" );
252
+
253
+ }
254
+
255
+ $args = implode( '&', $args );
256
+ $url = "?$args";
257
+ ?>
258
+
259
+ <div class="<?php echo $class; ?>">
260
+ <?php if( !in_array( $style, array( 'updated', 'error' ) ) ): ?><a href="<?php echo $url; ?>" id="rn-dismiss" class="rn-dismiss-btn" title="<?php _e( 'Dismiss notification', 'remote-notifications' ); ?>">&times;</a><?php endif; ?>
261
+ <p><?php echo html_entity_decode( $content->message ); ?></p>
262
+ <?php if( in_array( $style, array( 'updated', 'error' ) ) ): ?><p><a href="<?php echo $url; ?>" id="rn-dismiss" class="rn-dismiss-button button-secondary"><?php _e( 'Dismiss', 'remote-notifications' ); ?></a></p><?php endif; ?>
263
+ </div>
264
+ <?php
265
+
266
+ }
267
+
268
+ /**
269
+ * Dismiss notice
270
+ *
271
+ * When the user dismisses a notice, its slug
272
+ * is added to the _rn_dismissed entry in the DB options table.
273
+ * This entry is then used to check if a notie has been dismissed
274
+ * before displaying it on the dashboard.
275
+ *
276
+ * @since 0.1.0
277
+ */
278
+ public function dismiss() {
279
+
280
+ /* Check if we have all the vars */
281
+ if( !isset( $_GET['rn'] ) || !isset( $_GET['notification'] ) )
282
+ return;
283
+
284
+ /* Validate nonce */
285
+ if( !wp_verify_nonce( sanitize_key( $_GET['rn'] ), 'rn-dismiss' ) )
286
+ return;
287
+
288
+ /* Get dismissed list */
289
+ $dismissed = get_option( '_rn_dismissed', array() );
290
+
291
+ /* Add the current notice to the list if needed */
292
+ if( is_array( $dismissed ) && !in_array( $_GET['notification'], $dismissed ) )
293
+ array_push( $dismissed, $_GET['notification'] );
294
+
295
+ /* Update option */
296
+ update_option( '_rn_dismissed', $dismissed );
297
+
298
+ /* Get redirect URL */
299
+ $args = array();
300
+
301
+ /* Get URL args */
302
+ foreach( $_GET as $key => $value ) {
303
+
304
+ if( in_array( $key, array( 'rn', 'notification' ) ) )
305
+ continue;
306
+
307
+ array_push( $args, "$key=$value" );
308
+
309
+ }
310
+
311
+ $args = implode( '&', $args );
312
+ $url = "?$args";
313
+
314
+ /* Redirect */
315
+ wp_redirect( $url );
316
+
317
+ }
318
+
319
+ /**
320
+ * Adds inline style for non standard notices
321
+ *
322
+ * This function will only be called if the notice style is not standard.
323
+ *
324
+ * @since 0.1.0
325
+ */
326
+ public function style() { ?>
327
+
328
+ <style type="text/css">div.rn-alert{padding:15px;padding-right:35px;margin-bottom:20px;border:1px solid transparent;-webkit-box-shadow:none;box-shadow:none}div.rn-alert p:empty{display:none}div.rn-alert ul,div.rn-alert ul li,div.rn-alert ol,div.rn-alert ol li{list-style:inherit !important}div.rn-alert ul,div.rn-alert ol{padding-left:30px}div.rn-alert hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0;margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}div.rn-alert h1,h2,h3,h4,h5,h6{margin-top:0;color:inherit}div.rn-alert a{font-weight:700}div.rn-alert a:hover{text-decoration:underline}div.rn-alert>p{margin:0;padding:0;line-height:1}div.rn-alert>p,div.rn-alert>ul{margin-bottom:0}div.rn-alert>p+p{margin-top:5px}div.rn-alert .rn-dismiss-btn{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;position:relative;top:-2px;right:-21px;padding:0;cursor:pointer;background:0;border:0;-webkit-appearance:none;float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20);text-decoration:none}div.rn-alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#3c763d}div.rn-alert-success hr{border-top-color:#c9e2b3}div.rn-alert-success a{color:#2b542c}div.rn-alert-info{background-color:#d9edf7;border-color:#bce8f1;color:#31708f}div.rn-alert-info hr{border-top-color:#a6e1ec}div.rn-alert-info a{color:#245269}div.rn-alert-warning{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}div.rn-alert-warning hr{border-top-color:#f7e1b5}div.rn-alert-warning a{color:#66512c}div.rn-alert-danger{background-color:#f2dede;border-color:#ebccd1;color:#a94442}div.rn-alert-danger hr{border-top-color:#e4b9c0}div.rn-alert-danger a{color:#843534}</style>
329
+
330
+ <?php }
331
+
332
+ /**
333
+ * Dismiss notice using Ajax
334
+ *
335
+ * This function is NOT used. Testing only.
336
+ */
337
+ public function script() {
338
+
339
+ $url = admin_url();
340
+ ?>
341
+
342
+ <script type="text/javascript">
343
+ jQuery(document).ready(function($) {
344
+
345
+ var prout = 'prout';
346
+
347
+ $('#rn-dismiss').on('click', function(event) {
348
+ event.preventDefault();
349
+ $.ajax({
350
+ type: "GET",
351
+ url: <?php echo $url; ?>,
352
+ data: prout
353
+ });
354
+ console.log('clicked');
355
+ });
356
+
357
+ return false;
358
+
359
+ });
360
+ </script>
361
+
362
+ <?php
363
+
364
+ }
365
+
366
+ /**
367
+ * Debug info.
368
+ *
369
+ * Display an error message commented in the admin footer.
370
+ *
371
+ * @since 0.1.2
372
+ */
373
+ public function debug_info() {
374
+
375
+ $error = $this->error;
376
+
377
+ echo "<!-- RDN Debug Info: $error -->";
378
+
379
+ }
380
+
381
+ }
js/admin.js ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ (function($) {
2
+ console.log("loading test.js");
3
+ wp.customize( login_cust.name, function( value ) {
4
+ console.log("in customize with variable name " + login_cust.name + " value = " + value);
5
+ value.bind( function( to ) {
6
+ console.log("in bind with value " + to);
7
+ $( 'html, body' ).css('background-color', to);
8
+ } );
9
+ } );
10
+ })( jQuery, login_cust );
login-customizer.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Plugin loader
4
+ *
5
+ * @package LOGINCUST
6
+ * @author Themeisle
7
+ * @since 1.0.0
8
+ */
9
+
10
+ /**
11
+ * Plugin Name: Custom Login Page Customizer
12
+ * Plugin URI: https://themeisle.com/plugins/login-customizer/
13
+ * Description: Custom Login Customizer plugin allows you to easily customize your login page straight from your WordPress Customizer! Awesome, right?
14
+ * Author: Hardeep Asrani
15
+ * Author URI: https://themeisle.com/
16
+ * Version: 1.0.7
17
+ */
18
+
19
+ define( 'LOGINCUST_VERSION','1.0.7' );
20
+ define( 'LOGINCUST_FREE_PATH', plugin_dir_path( __FILE__ ) );
21
+ define( 'LOGINCUST_FREE_URL', plugin_dir_url( __FILE__ ) );
22
+ if ( ! defined( 'LOGINCUST_TEXTDOMAIN' ) ) {
23
+ define( 'LOGINCUST_TEXTDOMAIN','login-customizer' );
24
+ }
25
+ define( 'LOGINCUST_PRO_TEXT',__( '<p class="logincust_pro_text">You need to buy the <a href="http://themeisle.com/plugins/custom-login-customizer-security-addon/" target="_blank">SECURITY ADDON</a> to have this options. </p>',LOGINCUST_TEXTDOMAIN ) );
26
+
27
+ /**
28
+ * Check if security addon is active
29
+ * @package LOGINCUST
30
+ * @since 1.0.2
31
+ * @version 1.0.0
32
+ * @return bool
33
+ */
34
+ function logincust_check_security() {
35
+ return ( defined( 'LOGINCUST_SECURITY_VERSION' ) );
36
+ }
37
+ if (!class_exists('TAV_Remote_Notification_Client')) {
38
+ require( LOGINCUST_FREE_PATH.'/includes/class-remote-notification-client.php' );
39
+ }
40
+
41
+ include( LOGINCUST_FREE_PATH . 'customizer.php' );
42
+ include( LOGINCUST_FREE_PATH . 'option-panel.php' );
43
+ $notification = new TAV_Remote_Notification_Client( 48, '0f7b61c2420ea7ec', 'http://themeisle.com?post_type=notification' );
mailin.php ADDED
@@ -0,0 +1,939 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * SendinBlue REST client
5
+ */
6
+
7
+ class Mailin
8
+ {
9
+ public $api_key;
10
+ public $base_url;
11
+ public $curl_opts = array();
12
+ public function __construct($base_url,$api_key)
13
+ {
14
+ if(!function_exists('curl_init'))
15
+ {
16
+ throw new Exception('Mailin requires CURL module');
17
+ }
18
+ $this->base_url = $base_url;
19
+ $this->api_key = $api_key;
20
+ }
21
+ /**
22
+ * Do CURL request with authorization
23
+ */
24
+ private function do_request($resource,$method,$input)
25
+ {
26
+ $called_url = $this->base_url."/".$resource;
27
+ $ch = curl_init($called_url);
28
+ $auth_header = 'api-key:'.$this->api_key;
29
+ $content_header = "Content-Type:application/json";
30
+ if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
31
+ // Windows only over-ride
32
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
33
+ }
34
+ curl_setopt($ch, CURLOPT_HTTPHEADER, array($auth_header,$content_header));
35
+ curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
36
+ curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
37
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
38
+ curl_setopt($ch, CURLOPT_HEADER, 0);
39
+ curl_setopt($ch, CURLOPT_POSTFIELDS, $input);
40
+ $data = curl_exec($ch);
41
+ if(curl_errno($ch))
42
+ {
43
+ echo 'Curl error: ' . curl_error($ch). '\n';
44
+ }
45
+ curl_close($ch);
46
+ return json_decode($data,true);
47
+ }
48
+ public function get($resource,$input)
49
+ {
50
+ return $this->do_request($resource,"GET",$input);
51
+ }
52
+ public function put($resource,$input)
53
+ {
54
+ return $this->do_request($resource,"PUT",$input);
55
+ }
56
+ public function post($resource,$input)
57
+ {
58
+ return $this->do_request($resource,"POST",$input);
59
+ }
60
+ public function delete($resource,$input)
61
+ {
62
+ return $this->do_request($resource,"DELETE",$input);
63
+ }
64
+
65
+ /*
66
+ Get Account.
67
+ No input required
68
+ */
69
+ public function get_account()
70
+ {
71
+ return $this->get("account","");
72
+ }
73
+
74
+ /*
75
+ Get SMTP details.
76
+ No input required
77
+ */
78
+ public function get_smtp_details()
79
+ {
80
+ return $this->get("account/smtpdetail","");
81
+ }
82
+
83
+ /*
84
+ Create Child Account.
85
+ @param {Array} data contains php array with key value pair.
86
+ @options data {String} child_email: Email address of Reseller child [Mandatory]
87
+ @options data {String} password: Password of Reseller child to login [Mandatory]
88
+ @options data {String} company_org: Name of Reseller child’s company [Mandatory]
89
+ @options data {String} first_name: First name of Reseller child [Mandatory]
90
+ @options data {String} last_name: Last name of Reseller child [Mandatory]
91
+ @options data {Array} credits: Number of email & sms credits respectively, which will be assigned to the Reseller child’s account [Optional]
92
+ - email_credit {Integer} number of email credits
93
+ - sms_credit {Integer} Number of sms credts
94
+ @options data {Array} associate_ip: Associate dedicated IPs to reseller child. You can use commas to separate multiple IPs [Optional]
95
+ */
96
+ public function create_child_account($data)
97
+ {
98
+ return $this->post("account",json_encode($data));
99
+ }
100
+
101
+ /*
102
+ Update Child Account.
103
+ @param {Array} data contains php array with key value pair.
104
+ @options data {String} auth_key: 16 character authorization key of Reseller child to be modified [Mandatory]
105
+ @options data {String} company_org: Name of Reseller child’s company [Optional]
106
+ @options data {String} first_name: First name of Reseller child [Optional]
107
+ @options data {String} last_name: Last name of Reseller child [Optional]
108
+ @options data {String} password: Password of Reseller child to login [Optional]
109
+ @options data {Array} associate_ip: Associate dedicated IPs to reseller child. You can use commas to separate multiple IPs [Optional]
110
+ @options data {Array} disassociate_ip: Disassociate dedicated IPs from reseller child. You can use commas to separate multiple IPs [Optional]
111
+ */
112
+ public function update_child_account($data)
113
+ {
114
+ return $this->put("account",json_encode($data));
115
+ }
116
+
117
+ /*
118
+ Delete Child Account.
119
+ @param {Array} data contains php array with key value pair.
120
+ @options data {String} auth_key: 16 character authorization key of Reseller child to be deleted [Mandatory]
121
+ */
122
+ public function delete_child_account($data)
123
+ {
124
+ return $this->delete("account/".$data['auth_key'],"");
125
+ }
126
+
127
+ /*
128
+ Get Reseller child Account.
129
+ @param {Array} data contains php array with key value pair.
130
+ @options data {String} auth_key: 16 character authorization key of Reseller child. Example : To get the details of more than one child account, use, {"key1":"abC01De2fGHI3jkL","key2":"mnO45Pq6rSTU7vWX"} [Mandatory]
131
+ */
132
+ public function get_reseller_child($data)
133
+ {
134
+ return $this->post("account/getchildv2",json_encode($data));
135
+ }
136
+
137
+ /*
138
+ Add/Remove Reseller child's Email/Sms credits.
139
+ @param {Array} data contains php array with key value pair.
140
+ @options data {String} auth_key: 16 character authorization key of Reseller child to modify credits [Mandatory]
141
+ @options data {Array} add_credit: Number of email & sms credits to be added. You can assign either email or sms credits, one at a time other will remain 0. [Mandatory: if rmv_credit is empty]
142
+ - email_credit {Integer} number of email credits
143
+ - sms_credit {Integer} Number of sms credts
144
+ @options data {Array} rmv_credit: Number of email & sms credits to be removed. You can assign either email or sms credits, one at a time other will remain 0. [Mandatory: if add_credits is empty]
145
+ - email_credit {Integer} number of email credits
146
+ - sms_credit {Integer} Number of sms credts
147
+ */
148
+ public function add_remove_child_credits($data)
149
+ {
150
+ return $this->post("account/addrmvcredit",json_encode($data));
151
+ }
152
+
153
+ /*
154
+ Get a particular campaign detail.
155
+ @param {Array} data contains php array with key value pair.
156
+ @options data {Integer} id: Unique Id of the campaign [Mandatory]
157
+ */
158
+ public function get_campaign_v2($data)
159
+ {
160
+ return $this->get("campaign/".$data['id']."/detailsv2","");
161
+ }
162
+
163
+ /*
164
+ Get all campaigns detail.
165
+ @param {Array} data contains php array with key value pair.
166
+ @options data {String} type: Type of campaign. Possible values – classic, trigger, sms, template ( case sensitive ) [Optional]
167
+ @options data {String} status: Status of campaign. Possible values – draft, sent, archive, queued, suspended, in_process, temp_active, temp_inactive ( case sensitive ) [Optional]
168
+ @options data {Integer} page: Maximum number of records per request is 500, if there are more than 500 campaigns then you can use this parameter to get next 500 results [Optional]
169
+ @options data {Integer} page_limit: This should be a valid number between 1-500 [Optional]
170
+ */
171
+ public function get_campaigns_v2($data)
172
+ {
173
+ return $this->get("campaign/detailsv2",json_encode($data));
174
+ }
175
+
176
+ /*
177
+ Create and Schedule your campaigns. It returns the ID of the created campaign.
178
+ @param {Array} data contains php array with key value pair.
179
+ @options data {String} category: Tag name of the campaign [Optional]
180
+ @options data {String} from_name: Sender name from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists]
181
+ @options data {String} name: Name of the campaign [Mandatory]
182
+ @options data {String} bat: Email address for test mail [Optional]
183
+ @options data {String} html_content: Body of the content. The HTML content field must have more than 10 characters [Mandatory: if html_url is empty]
184
+ @options data {String} html_url: Url which content is the body of content [Mandatory: if html_content is empty]
185
+ @options data {Array} listid: These are the lists to which the campaign has been sent [Mandatory: if scheduled_date is not empty]
186
+ @options data {String} scheduled_date: The day on which the campaign is supposed to run[Optional]
187
+ @options data {String} subject: Subject of the campaign [Mandatory]
188
+ @options data {String} from_email: Sender email from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists]
189
+ @options data {String} reply_to: The reply to email in the campaign emails [Optional]
190
+ @options data {String} to_field: This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add [PRENOM] [NOM] To use the contact attributes here, these should already exist in SendinBlue account [Optional]
191
+ @options data {Array} exclude_list: These are the lists which must be excluded from the campaign [Optional]
192
+ @options data {String} attachment_url: Provide the absolute url of the attachment [Optional]
193
+ @options data {Integer} inline_image: Status of inline image. Possible values = 0 (default) & 1. inline_image = 0 means image can’t be embedded, & inline_image = 1 means image can be embedded, in the email [Optional]
194
+ @options data {Integer} mirror_active: Status of mirror links in campaign. Possible values = 0 & 1 (default). mirror_active = 0 means mirror links are deactivated, & mirror_active = 1 means mirror links are activated, in the campaign [Optional]
195
+ @options data {Integer} send_now: Flag to send campaign now. Possible values = 0 (default) & 1. send_now = 0 means campaign can’t be send now, & send_now = 1 means campaign ready to send now [Optional]
196
+
197
+ */
198
+ public function create_campaign($data)
199
+ {
200
+ return $this->post("campaign",json_encode($data));
201
+ }
202
+
203
+ /*
204
+ Update your campaign.
205
+ @param {Array} data contains php array with key value pair.
206
+ @options data {Integer} id: Id of campaign to be modified [Mandatory]
207
+ @options data {String} category: Tag name of the campaign [Optional]
208
+ @options data {String} from_name: Sender name from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists]
209
+ @options data {String} name: Name of the campaign [Optional]
210
+ @options data {String} bat: Email address for test mail [Optional]
211
+ @options data {String} html_content: Body of the content. The HTML content field must have more than 10 characters [Optional]
212
+ @options data {String} html_url: Url which content is the body of content [Optional]
213
+ @options data {Array} listid These are the lists to which the campaign has been sent [Mandatory: if scheduled_date is not empty]
214
+ @options data {String} scheduled_date: The day on which the campaign is supposed to run[Optional]
215
+ @options data {String} subject: Subject of the campaign.
216
+ @options data {String} from_email: Sender email from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists]
217
+ @options data {String} reply_to: The reply to email in the campaign emails [Optional]
218
+ @options data {String} to_field: This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add [PRENOM] [NOM]. To use the contact attributes here, these should already exist in SendinBlue account [Optional]
219
+ @options data {Array} exclude_list: These are the lists which must be excluded from the campaign [Optional]
220
+ @options data {String} attachment_url: Provide the absolute url of the attachment [Optional]
221
+ @options data {Integer} inline_image: Status of inline image. Possible values = 0 (default) & 1. inline_image = 0 means image can’t be embedded, & inline_image = 1 means image can be embedded, in the email [Optional]
222
+ @options data {Integer} mirror_active: Status of mirror links in campaign. Possible values = 0 & 1 (default). mirror_active = 0 means mirror links are deactivated, & mirror_active = 1 means mirror links are activated, in the campaign [Optional]
223
+ @options data {Integer} send_now: Flag to send campaign now. Possible values = 0 (default) & 1. send_now = 0 means campaign can’t be send now, & send_now = 1 means campaign ready to send now [Optional]
224
+ */
225
+ public function update_campaign($data)
226
+ {
227
+ $id = $data['id'];
228
+ unset($data['id']);
229
+ return $this->put("campaign/".$id,json_encode($data));
230
+ }
231
+
232
+ /*
233
+ Delete your campaigns.
234
+ @param {Array} data contains php array with key value pair.
235
+ @options data {Integer} id: Id of campaign to be deleted [Mandatory]
236
+ */
237
+ public function delete_campaign($data)
238
+ {
239
+ return $this->delete("campaign/".$data['id'],"");
240
+ }
241
+
242
+ /*
243
+ Send report of Sent and Archived campaign.
244
+ @param {Array} data contains php array with key value pair.
245
+ @options data {Integer} id: Id of campaign to send its report [Mandatory]
246
+ @options data {String} lang: Language of email content. Possible values – fr (default), en, es, it & pt [Optional]
247
+ @options data {String} email_subject: Message subject [Mandatory]
248
+ @options data {Array} email_to: Email address of the recipient(s). Example: "test@example.net". You can use commas to separate multiple recipients [Mandatory]
249
+ @options data {String} email_content_type: Body of the message in text/HTML version. Possible values – text & html [Mandatory]
250
+ @options data {Array} email_bcc: Same as email_to but for Bcc [Optional]
251
+ @options data {Array} email_cc: Same as email_to but for Cc [Optional]
252
+ @options data {String} email_body: Body of the message [Mandatory]
253
+ */
254
+ public function campaign_report_email($data)
255
+ {
256
+ $id = $data['id'];
257
+ unset($data['id']);
258
+ return $this->post("campaign/".$id."/report",json_encode($data));
259
+ }
260
+
261
+ /*
262
+ Export the recipients of a specified campaign.
263
+ @param {Array} data contains php array with key value pair.
264
+ @options data {Integer} id: Id of campaign to export its recipients [Mandatory]
265
+ @options data {String} notify_url: URL that will be called once the export process is finished [Mandatory]
266
+ @options data {String} type: Type of recipients. Possible values – all, non_clicker, non_opener, clicker, opener, soft_bounces, hard_bounces & unsubscribes [Mandatory]
267
+ */
268
+ public function campaign_recipients_export($data)
269
+ {
270
+ $id = $data['id'];
271
+ unset($data['id']);
272
+ return $this->post("campaign/".$id."/recipients",json_encode($data));
273
+ }
274
+
275
+ /*
276
+ Get the Campaign name, subject and share link of the classic type campaigns only which are sent, for those which are not sent and the rest of campaign types like trigger, template & sms, will return an error message of share link not available.
277
+ @param {Array} data contains php array with key value pair.
278
+ @options data {Array} camp_ids: Id of campaign to get share link. You can use commas to separate multiple ids [Mandatory]
279
+ */
280
+
281
+ public function share_campaign($data)
282
+ {
283
+ return $this->post("campaign/sharelinkv2",json_encode($data));
284
+ }
285
+
286
+ /*
287
+ Send a Test Campaign.
288
+ @param {Array} data contains php array with key value pair.
289
+ @options data {Integer} id: Id of the campaign [Mandatory]
290
+ @options data {Array} emails: Email address of recipient(s) existing in the one of the lists & should not be blacklisted. Example: "test@example.net". You can use commas to separate multiple recipients [Mandatory]
291
+ */
292
+ public function send_bat_email($data)
293
+ {
294
+ $id = $data['id'];
295
+ unset($data['id']);
296
+ return $this->post("campaign/".$id."/test",json_encode($data));
297
+ }
298
+
299
+ /*
300
+ Update the Campaign status.
301
+ @param {Array} data contains php array with key value pair.
302
+ @options data {Integer} id: Id of campaign to update its status [Mandatory]
303
+ @options data {String} status: Types of status. Possible values – suspended, archive, darchive, sent, queued, replicate and replicate_template ( case sensitive ) [Mandatory]
304
+ */
305
+ public function update_campaign_status($data)
306
+ {
307
+ $id = $data['id'];
308
+ unset($data['id']);
309
+ return $this->put("campaign/".$id."/updatecampstatus",json_encode($data));
310
+ }
311
+
312
+ /*
313
+ Create and schedule your Trigger campaigns.
314
+ @param {Array} data contains php array with key value pair.
315
+ @options data {String} category: Tag name of the campaign [Optional]
316
+ @options data {String} from_name: Sender name from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists]
317
+ @options data {String} trigger_name: Name of the campaign [Mandatory]
318
+ @options data {String} bat: Email address for test mail [Optional]
319
+ @options data {String} html_content: Body of the content. The HTML content field must have more than 10 characters [Mandatory: if html_url is empty]
320
+ @options data {String} html_url: Url which content is the body of content [Mandatory: if html_content is empty]
321
+ @options data {Array} listid: These are the lists to which the campaign has been sent [Mandatory: if scheduled_date is not empty]
322
+ @options data {String} scheduled_date: The day on which the campaign is supposed to run[Optional]
323
+ @options data {String} subject: Subject of the campaign [Mandatory]
324
+ @options data {String} from_email: Sender email from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists]
325
+ @options data {String} reply_to: The reply to email in the campaign emails [Optional]
326
+ @options data {String} to_field: This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add [PRENOM] [NOM]. To use the contact attributes here, these should already exist in SendinBlue account [Optional]
327
+ @options data {Array} exclude_list: These are the lists which must be excluded from the campaign [Optional]
328
+ @options data {Integer} recurring: Type of trigger campaign. Possible values = 0 (default) & 1. recurring = 0 means contact can receive the same Trigger campaign only once, & recurring = 1 means contact can receive the same Trigger campaign several times [Optional]
329
+ @options data {String} attachment_url: Provide the absolute url of the attachment [Optional]
330
+ @options data {Integer} inline_image: Status of inline image. Possible values = 0 (default) & 1. inline_image = 0 means image can’t be embedded, & inline_image = 1 means image can be embedded, in the email [Optional]
331
+ @options data {Integer} mirror_active: Status of mirror links in campaign. Possible values = 0 & 1 (default). mirror_active = 0 means mirror links are deactivated, & mirror_active = 1 means mirror links are activated, in the campaign [Optional]
332
+ @options data {Integer} send_now: Flag to send campaign now. Possible values = 0 (default) & 1. send_now = 0 means campaign can’t be send now, & send_now = 1 means campaign ready to send now [Optional]
333
+ */
334
+ public function create_trigger_campaign($data)
335
+ {
336
+ return $this->post("campaign",json_encode($data));
337
+ }
338
+
339
+ /*
340
+ Update and schedule your Trigger campaigns.
341
+ @param {Array} data contains php array with key value pair.
342
+ @options data {Integer} id: Id of Trigger campaign to be modified [Mandatory]
343
+ @options data {String} category: Tag name of the campaign [Optional]
344
+ @options data {String} from_name: Sender name from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists]
345
+ @options data {String} trigger_name: Name of the campaign [Mandatory]
346
+ @options data {String} bat Email address for test mail [Optional]
347
+ @options data {String} html_content: Body of the content. The HTML content field must have more than 10 characters [Mandatory: if html_url is empty]
348
+ @options data {String} html_url: Url which content is the body of content [Mandatory: if html_content is empty]
349
+ @options data {Array} listid: These are the lists to which the campaign has been sent [Mandatory: if scheduled_date is not empty]
350
+ @options data {String} scheduled_date: The day on which the campaign is supposed to run[Optional]
351
+ @options data {String} subject: Subject of the campaign [Mandatory]
352
+ @options data {String} from_email: Sender email from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists]
353
+ @options data {String} reply_to: The reply to email in the campaign emails [Optional]
354
+ @options data {String} to_field: This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add [PRENOM] [NOM]. To use the contact attributes here, these should already exist in SendinBlue account [Optional]
355
+ @options data {Array} exclude_list: These are the lists which must be excluded from the campaign [Optional]
356
+ @options data {Integer} recurring: Type of trigger campaign. Possible values = 0 (default) & 1. recurring = 0 means contact can receive the same Trigger campaign only once, & recurring = 1 means contact can receive the same Trigger campaign several times [Optional]
357
+ @options data {String} attachment_url: Provide the absolute url of the attachment [Optional]
358
+ @options data {Integer} inline_image: Status of inline image. Possible values = 0 (default) & 1. inline_image = 0 means image can’t be embedded, & inline_image = 1 means image can be embedded, in the email [Optional]
359
+ @options data {Integer} mirror_active: Status of mirror links in campaign. Possible values = 0 & 1 (default). mirror_active = 0 means mirror links are deactivated, & mirror_active = 1 means mirror links are activated, in the campaign [Optional]
360
+ @options data {Integer} send_now: Flag to send campaign now. Possible values = 0 (default) & 1. send_now = 0 means campaign can’t be send now, & send_now = 1 means campaign ready to send now [Optional]
361
+ */
362
+ public function update_trigger_campaign($data)
363
+ {
364
+ $id = $data['id'];
365
+ unset($data['id']);
366
+ return $this->put("campaign/".$id,json_encode($data));
367
+ }
368
+
369
+ /*
370
+ Get all folders detail.
371
+ @param {Array} data contains php array with key value pair.
372
+ @options data {Integer} page: Maximum number of records per request is 50, if there are more than 50 folders then you can use this parameter to get next 50 results [Mandatory]
373
+ @options data {Integer} page_limit: This should be a valid number between 1-50 [Mandatory]
374
+ */
375
+ public function get_folders($data)
376
+ {
377
+ return $this->get("folder",json_encode($data));
378
+ }
379
+
380
+ /*
381
+ Get a particular folder detail.
382
+ @param {Array} data contains php array with key value pair.
383
+ @options data {Integer} id: Id of folder to get details [Mandatory]
384
+ */
385
+ public function get_folder($data)
386
+ {
387
+ return $this->get("folder/".$data['id'],"");
388
+ }
389
+
390
+ /*
391
+ Create a new folder.
392
+ @param {Array} data contains php array with key value pair.
393
+ @options data {String} name: Desired name of the folder to be created [Mandatory]
394
+ */
395
+ public function create_folder($data)
396
+ {
397
+ return $this->post("folder",json_encode($data));
398
+ }
399
+
400
+ /*
401
+ Delete a specific folder information.
402
+ @param {Array} data contains php array with key value pair.
403
+ @options data {Integer} id: Id of folder to be deleted [Mandatory]
404
+ */
405
+ public function delete_folder($data)
406
+ {
407
+ return $this->delete("folder/".$data['id'],"");
408
+ }
409
+
410
+ /*
411
+ Update an existing folder.
412
+ @param {Array} data contains php array with key value pair.
413
+ @options data {Integer} id: Id of folder to be modified [Mandatory]
414
+ @options data {String} name: Desired name of the folder to be modified [Mandatory]
415
+ */
416
+ public function update_folder($data)
417
+ {
418
+ $id = $data['id'];
419
+ unset($data['id']);
420
+ return $this->put("folder/".$id,json_encode($data));
421
+ }
422
+
423
+ /*
424
+ Get all lists detail.
425
+ @param {Array} data contains php array with key value pair.
426
+ @options data {Integer} list_parent: This is the existing folder id & can be used to get all lists belonging to it [Optional]
427
+ @options data {Integer} page: Maximum number of records per request is 50, if there are more than 50 processes then you can use this parameter to get next 50 results [Mandatory]
428
+ @options data {Integer} page_limit: This should be a valid number between 1-50 [Mandatory]
429
+ */
430
+ public function get_lists($data)
431
+ {
432
+ return $this->get("list",json_encode($data));
433
+ }
434
+
435
+ /*
436
+ Get a particular list detail.
437
+ @param {Array} data contains php array with key value pair.
438
+ @options data {Integer} id: Id of list to get details [Mandatory]
439
+ */
440
+ public function get_list($data)
441
+ {
442
+ return $this->get("list/".$data['id'],"");
443
+ }
444
+
445
+ /*
446
+ Create a new list.
447
+ @param {Array} data contains php array with key value pair.
448
+ @options data {String} list_name: Desired name of the list to be created [Mandatory]
449
+ @options data {Integer} list_parent: Folder ID [Mandatory]
450
+ */
451
+ public function create_list($data)
452
+ {
453
+ return $this->post("list",json_encode($data));
454
+ }
455
+
456
+ /*
457
+ Update a list.
458
+ @param {Array} data contains php array with key value pair.
459
+ @options data {Integer} id: Id of list to be modified [Mandatory]
460
+ @options data {String} list_name: Desired name of the list to be modified [Optional]
461
+ @options data {Integer} list_parent: Folder ID [Mandatory]
462
+ */
463
+ public function update_list($data)
464
+ {
465
+ $id = $data['id'];
466
+ unset($data['id']);
467
+ return $this->put("list/".$id,json_encode($data));
468
+ }
469
+
470
+ /*
471
+ Delete a specific list.
472
+ @param {Array} data contains php array with key value pair.
473
+ @options data {Integer} id: Id of list to be deleted [Mandatory]
474
+ */
475
+ public function delete_list($data)
476
+ {
477
+ return $this->delete("list/".$data['id'],"");
478
+ }
479
+
480
+ /*
481
+ Display details of all users for the given lists.
482
+ @param {Array} data contains php array with key value pair.
483
+ @options data {Array} listids: These are the list ids to get their data. The ids found will display records [Mandatory]
484
+ @options data {String} timestamp: This is date-time filter to fetch modified user records >= this time. Valid format Y-m-d H:i:s. Example: "2015-05-22 14:30:00" [Optional]
485
+ @options data {Integer} page: Maximum number of records per request is 500, if in your list there are more than 500 users then you can use this parameter to get next 500 results [Optional]
486
+ @options data {Integer} page_limit: This should be a valid number between 1-500 [Optional]
487
+ */
488
+ public function display_list_users($data)
489
+ {
490
+ return $this->post("list/display",json_encode($data));
491
+ }
492
+
493
+ /*
494
+ Add already existing users in the SendinBlue contacts to the list.
495
+ @param {Array} data contains php array with key value pair.
496
+ @options data {Integer} id: Id of list to link users in it [Mandatory]
497
+ @options data {Array} users: Email address of the already existing user(s) in the SendinBlue contacts. Example: "test@example.net". You can use commas to separate multiple users [Mandatory]
498
+ */
499
+
500
+ public function add_users_list($data)
501
+ {
502
+ $id = $data['id'];
503
+ unset($data['id']);
504
+ return $this->post("list/".$id."/users",json_encode($data));
505
+ }
506
+
507
+ /*
508
+ Delete already existing users in the SendinBlue contacts from the list.
509
+ @param {Array} data contains php array with key value pair.
510
+ @options data {Integer} id: Id of list to unlink users from it [Mandatory]
511
+ @options data {Array} users: Email address of the already existing user(s) in the SendinBlue contacts to be modified. Example: "test@example.net". You can use commas to separate multiple users [Mandatory]
512
+ */
513
+ public function delete_users_list($data)
514
+ {
515
+ $id = $data['id'];
516
+ unset($data['id']);
517
+ return $this->delete("list/".$id."/delusers",json_encode($data));
518
+ }
519
+
520
+ /*
521
+ Access all the attributes information under the account.
522
+ No input required
523
+ */
524
+ public function get_attributes()
525
+ {
526
+ return $this->get("attribute","");
527
+ }
528
+
529
+ /*
530
+ Access the specific type of attribute information.
531
+ @param {Array} data contains php array with key value pair.
532
+ @options data {String} type: Type of attribute. Possible values – normal, transactional, category, calculated & global [Optional]
533
+ */
534
+ public function get_attribute($data)
535
+ {
536
+ return $this->get("attribute/".$data['type'],"");
537
+ }
538
+
539
+ /*
540
+ Create an Attribute.
541
+ @param {Array} data contains php array with key value pair.
542
+ @options data {String} type: Type of attribute. Possible values – normal, transactional, category, calculated & global ( case sensitive ) [Mandatory]
543
+ @options data {Array} data: The name and data type of ‘normal’ & ‘transactional’ attribute to be created in your SendinBlue account. It should be sent as an associative array. Example: array(‘ATTRIBUTE_NAME1′ => ‘DATA_TYPE1′, ‘ATTRIBUTE_NAME2’=> ‘DATA_TYPE2′).
544
+ The name and data value of ‘category’, ‘calculated’ & ‘global’, should be sent as JSON string. Example: ‘[{ "name":"ATTRIBUTE_NAME1", "value":"Attribute_value1" }, { "name":"ATTRIBUTE_NAME2", "value":"Attribute_value2" }]’. You can use commas to separate multiple attributes [Mandatory]
545
+ */
546
+ public function create_attribute($data)
547
+ {
548
+ return $this->post("attribute/",json_encode($data));
549
+ }
550
+
551
+ /*
552
+ Delete a specific type of attribute information.
553
+ @param {Array} data contains php array with key value pair.
554
+ @options data {Integer} type: Type of attribute to be deleted [Mandatory]
555
+ */
556
+ public function delete_attribute($type,$data)
557
+ {
558
+ $type = $data['type'];
559
+ unset($data['type']);
560
+ return $this->post("attribute/".$type,json_encode($data));
561
+ }
562
+
563
+ /*
564
+ Create a new user if an email provided as input, doesn’t exists in the contact list of your SendinBlue account, otherwise it will update the existing user.
565
+ @param {Array} data contains php array with key value pair.
566
+ @options data {String} email: Email address of the user to be created in SendinBlue contacts. Already existing email address of user in the SendinBlue contacts to be modified [Mandatory]
567
+ @options data {Array} attributes: The name of attribute present in your SendinBlue account. It should be sent as an associative array. Example: array("NAME"=>"name"). You can use commas to separate multiple attributes [Optional]
568
+ @options data {Integer} blacklisted: This is used to blacklist/ Unblacklist a user. Possible values – 0 & 1. blacklisted = 1 means user has been blacklisted [Optional]
569
+ @options data {Array} listid: The list id(s) to be linked from user [Optional]
570
+ @options data {Array} listid_unlink: The list id(s) to be unlinked from user [Optional]
571
+ @options data {Array} blacklisted_sms: This is used to blacklist/ Unblacklist a user’s SMS number. Possible values – 0 & 1. blacklisted_sms = 1 means user’s SMS number has been blacklisted [Optional]
572
+ */
573
+ public function create_update_user($data)
574
+ {
575
+ return $this->post("user/createdituser",json_encode($data));
576
+ }
577
+
578
+ /*
579
+ Get Access a specific user Information.
580
+ @param {Array} data contains php array with key value pair.
581
+ @options data {String} email: Email address of the already existing user in the SendinBlue contacts [Mandatory]
582
+ */
583
+ public function get_user($data)
584
+ {
585
+ return $this->get("user/".$data['email'],"");
586
+ }
587
+
588
+ /*
589
+ Unlink existing user from all lists.
590
+ @param {Array} data contains php array with key value pair.
591
+ @options data {String} email: Email address of the already existing user in the SendinBlue contacts to be unlinked from all lists [Mandatory]
592
+ */
593
+ public function delete_user($data)
594
+ {
595
+ return $this->delete("user/".$data['email'],"");
596
+ }
597
+
598
+ /*
599
+ Import Users Information.
600
+ @param {Array} data contains php array with key value pair.
601
+ @options data {String} url: The URL of the file to be imported. Possible file types – .txt, .csv [Mandatory: if body is empty]
602
+ @options data {String} body: The Body with csv content to be imported. Example: ‘NAME;SURNAME;EMAIL\n"Name1";"Surname1";"example1@example.net"\n"Name2";"Surname2";"example2@example.net"‘, where \n separates each user data. You can use semicolon to separate multiple attributes [Mandatory: if url is empty]
603
+ @options data {Array} listids: These are the list ids in which the the users will be imported [Mandatory: if name is empty]
604
+ @options data {String} notify_url: URL that will be called once the import process is finished [Optional] In notify_url, we are sending the content using POST method
605
+ @options data {String} name: This is new list name which will be created first & then users will be imported in it [Mandatory: if listids is empty]
606
+ @options data {Integer} list_parent: This is the existing folder id & can be used with name parameter to make newly created list’s desired parent [Optional]
607
+ */
608
+ public function import_users($data)
609
+ {
610
+ return $this->post("user/import",json_encode($data));
611
+ }
612
+
613
+ /*
614
+ Export Users Information.
615
+ @param {Array} data contains php array with key value pair.
616
+ @options data {String} export_attrib: The name of attribute present in your SendinBlue account. You can use commas to separate multiple attributes. Example: "EMAIL,NAME,SMS" [Optional]
617
+ @options data {String} filter: Filter can be added to export users. Example: "{\"blacklisted\":1}", will export all blacklisted users [Mandatory]
618
+ @options data {String} notify_url: URL that will be called once the export process is finished [Optional]
619
+ */
620
+ public function export_users($data)
621
+ {
622
+ return $this->post("user/export",json_encode($data));
623
+ }
624
+
625
+ /*
626
+ Get all the processes information under the account.
627
+ @param {Array} data contains php array with key value pair.
628
+ @options data {Integer} page: Maximum number of records per request is 50, if there are more than 50 processes then you can use this parameter to get next 50 results [Mandatory]
629
+ @options data {Integer} page_limit: This should be a valid number between 1-50 [Mandatory]
630
+ */
631
+ public function get_processes($data)
632
+ {
633
+ return $this->get("process",json_encode($data));
634
+ }
635
+
636
+ /*
637
+ Get the process information.
638
+ @param {Array} data contains php array with key value pair.
639
+ @options data {Integer} id: Id of process to get details [Mandatory]
640
+ */
641
+ public function get_process($data)
642
+ {
643
+ return $this->get("process/".$data['id'],"");
644
+ }
645
+
646
+ /*
647
+ To retrieve details of all webhooks.
648
+ @param {Array} data contains php array with key value pair.
649
+ @options data {String} is_plat: Flag to get webhooks. Possible values – 0 & 1. Example: to get Transactional webhooks, use $is_plat=0, to get Marketing webhooks, use $is_plat=1, & to get all webhooks, use $is_plat="" [Optional]
650
+ */
651
+ public function get_webhooks($data)
652
+ {
653
+ return $this->get("webhook",json_encode($data));
654
+ }
655
+
656
+ /*
657
+ To retrieve details of any particular webhook.
658
+ @param {Array} data contains php array with key value pair.
659
+ @options data {Integer} id: Id of webhook to get details [Mandatory]
660
+ */
661
+ public function get_webhook($data)
662
+ {
663
+ return $this->get("webhook/".$data['id'],"");
664
+ }
665
+
666
+ /*
667
+ Create a Webhook.
668
+ @param {Array} data contains php array with key value pair.
669
+ @options data {String} url: URL that will be triggered by a webhook [Mandatory]
670
+ @options data {String} description: Webook description [Optional]
671
+ @options data {Array} events: Set of events. You can use commas to separate multiple events. Possible values for Transcational webhook – request, delivered, hard_bounce, soft_bounce, blocked, spam, invalid_email, deferred, click, & opened and Possible Values for Marketing webhook – spam, opened, click, hard_bounce, unsubscribe, soft_bounce & list_addition ( case sensitive ) [Mandatory]
672
+ @options data {Integer} is_plat: Flag to create webhook type. Possible values – 0 (default) & 1. Example: to create Transactional webhooks, use $is_plat=0, & to create Marketing webhooks, use $is_plat=1 [Optional]
673
+ */
674
+ public function create_webhook($data)
675
+ {
676
+ return $this->post("webhook",json_encode($data));
677
+ }
678
+
679
+ /*
680
+ Delete a webhook.
681
+ @param {Array} data contains php array with key value pair.
682
+ @options data {Integer} id: Id of webhook to be deleted [Mandatory]
683
+ */
684
+ public function delete_webhook($data)
685
+ {
686
+ return $this->delete("webhook/".$data['id'],"");
687
+ }
688
+
689
+ /*
690
+ Update a webhook.
691
+ @param {Array} data contains php array with key value pair.
692
+ @options data {Integer} id: Id of webhook to be modified [Mandatory]
693
+ @options data {String} url: URL that will be triggered by a webhook [Mandatory]
694
+ @options data {String} description: Webook description [Optional]
695
+ @options data {Array} events: Set of events. You can use commas to separate multiple events. Possible values for Transcational webhook – request, delivered, hard_bounce, soft_bounce, blocked, spam, invalid_email, deferred, click, & opened and Possible Values for Marketing webhook – spam, opened, click, hard_bounce, unsubscribe, soft_bounce & list_addition ( case sensitive ) [Mandatory]
696
+ */
697
+ public function update_webhook($data)
698
+ {
699
+ $id = $data['id'];
700
+ unset($data['id']);
701
+ return $this->put("webhook/".$id,json_encode($data));
702
+ }
703
+
704
+ /*
705
+ Get Access of created senders information.
706
+ @param {Array} data contains php array with key value pair.
707
+ @options data {String} option: Options to get senders. Possible options – IP-wise, & Domain-wise ( only for dedicated IP clients ). Example: to get senders with specific IP, use $option=’1.2.3.4′, to get senders with specific domain use, $option=’domain.com’, & to get all senders, use $option="" [Optional]
708
+ */
709
+ public function get_senders($data)
710
+ {
711
+ return $this->get("advanced",json_encode($data));
712
+ }
713
+
714
+ /*
715
+ Create your Senders.
716
+ @param {Array} data contains php array with key value pair.
717
+ @options data {String} name: Name of the sender [Mandatory]
718
+ @options data {String} email: Email address of the sender [Mandatory]
719
+ @options data {Array} ip_domain: Pass pipe ( | ) separated Dedicated IP and its associated Domain. Example: "1.2.3.4|mydomain.com". You can use commas to separate multiple ip_domain’s [Mandatory: Only for Dedicated IP clients, for Shared IP clients, it should be kept blank]
720
+ */
721
+ public function create_sender($data)
722
+ {
723
+ return $this->post("advanced",json_encode($data));
724
+ }
725
+
726
+ /*
727
+ Update your Senders.
728
+ @param {Array} data contains php array with key value pair.
729
+ @options data {Integer} id: Id of sender to be modified [Mandatory]
730
+ @options data {String} name: Name of the sender [Mandatory]
731
+ @options data {Array} ip_domain: Pass pipe ( | ) separated Dedicated IP and its associated Domain. Example: "1.2.3.4|mydomain.com". You can use commas to separate multiple ip_domain’s [Mandatory: Only for Dedicated IP clients, for Shared IP clients, it should be kept blank]
732
+ */
733
+ public function update_sender($data)
734
+ {
735
+ $id = $data['id'];
736
+ unset($data['id']);
737
+ return $this->put("advanced/".$id,json_encode($data));
738
+ }
739
+
740
+ /*
741
+ Delete your Sender Information.
742
+ @param {Array} data contains php array with key value pair.
743
+ @options data {Integer} id: Id of sender to be deleted [Mandatory]
744
+ */
745
+ public function delete_sender($data)
746
+ {
747
+ return $this->delete("advanced/".$data['id'],"");
748
+ }
749
+
750
+ /*
751
+ Send Transactional Email.
752
+ @param {Array} data contains php array with key value pair.
753
+ @options data {Array} to: Email address of the recipient(s). It should be sent as an associative array. Example: array("to@example.net"=>"to whom"). You can use commas to separate multiple recipients [Mandatory]
754
+ @options data {String} subject: Message subject [Mandatory]
755
+ @options data {Array} from Email address for From header. It should be sent as an array. Example: array("from@email.com","from email") [Mandatory]
756
+ @options data {String} html: Body of the message. (HTML version) [Mandatory]. To send inline images, use <img src="{YourFileName.Extension}" alt="image" border="0" >, the 'src' attribute value inside {} (curly braces) should be same as the filename used in 'inline_image' parameter
757
+ @options data {String} text: Body of the message. (text version) [Optional]
758
+ @options data {Array} cc: Same as to but for Cc. Example: array("cc@example.net","cc whom") [Optional]
759
+ @options data {Array} bcc: Same as to but for Bcc. Example: array("bcc@example.net","bcc whom") [Optional]
760
+ @options data {Array} replyto: Same as from but for Reply To. Example: array("from@email.com","from email") [Optional]
761
+ @options data {Array} attachment: Provide the absolute url of the attachment/s. Possible extension values = gif, png, bmp, cgm, jpg, jpeg, txt, css, shtml, html, htm, csv, zip, pdf, xml, doc, xls, ppt, tar, and ez. To send attachment/s generated on the fly you have to pass your attachment/s filename & its base64 encoded chunk data as an associative array. Example: array("YourFileName.Extension"=>"Base64EncodedChunkData"). You can use commas to separate multiple attachments [Optional]
762
+ @options data {Array} headers: The headers will be sent along with the mail headers in original email. Example: array("Content-Type"=>"text/html; charset=iso-8859-1"). You can use commas to separate multiple headers [Optional]
763
+ @options data {Array} inline_image: Pass your inline image/s filename & its base64 encoded chunk data as an associative array. Example: array("YourFileName.Extension"=>"Base64EncodedChunkData"). You can use commas to separate multiple inline images [Optional]
764
+ */
765
+ public function send_email($data)
766
+ {
767
+ return $this->post("email",json_encode($data));
768
+ }
769
+
770
+ /*
771
+ Aggregate / date-wise report of the SendinBlue SMTP account.
772
+ @param {Array} data contains php array with key value pair.
773
+ @options data {Integer} aggregate: This is used to indicate, you are interested in all-time totals. Possible values – 0 & 1. aggregate = 0 means it will not aggregate records, and will show stats per day/date wise [Optional]
774
+ @options data {String} start_date: The start date to look up statistics. Date must be in YYYY-MM-DD format and should be before the end_date [Optional]
775
+ @options data {String} end_date: The end date to look up statistics. Date must be in YYYY-MM-DD format and should be after the start_date [Optional]
776
+ @options data {Integer} days: Number of days in the past to include statistics ( Includes today ). It must be an integer greater than 0 [Optional]
777
+ @options data {String} tag: The tag you will specify to retrieve detailed stats. It must be an existing tag that has statistics [Optional]
778
+ */
779
+ public function get_statistics($data)
780
+ {
781
+ return $this->post("statistics",json_encode($data));
782
+ }
783
+
784
+ /*
785
+ Get Email Event report.
786
+ @param {Array} data contains php array with key value pair.
787
+ @options data {Integer} limit: To limit the number of results returned. It should be an integer [Optional]
788
+ @options data {String} start_date: The start date to get report from. Date must be in YYYY-MM-DD format and should be before the end_date [Optional]
789
+ @options data {String} end_date: The end date to get report till date. Date must be in YYYY-MM-DD format and should be after the start_date [Optional]
790
+ @options data {Integer} offset: Beginning point in the list to retrieve from. It should be an integer [Optional]
791
+ @options data {String} date: Specific date to get its report. Date must be in YYYY-MM-DD format and should be earlier than todays date [Optional]
792
+ @options data {Integer} days: Number of days in the past (includes today). If specified, must be an integer greater than 0 [Optional]
793
+ @options data {String} email: Email address to search report for [Optional]
794
+ */
795
+ public function get_report($data)
796
+ {
797
+ return $this->post("report",json_encode($data));
798
+ }
799
+
800
+ /*
801
+ Delete any hardbounce, which actually would have been blocked due to some temporary ISP failures.
802
+ @param {Array} data contains php array with key value pair.
803
+ @options data {String} start_date: The start date to get report from. Date must be in YYYY-MM-DD format and should be before the end_date [Optional]
804
+ @options data {String} end_date: The end date to get report till date. Date must be in YYYY-MM-DD format and should be after the start_date [Optional]
805
+ @options data {String} email: Email address to delete its bounces [Optional]
806
+ */
807
+ public function delete_bounces($data)
808
+ {
809
+ return $this->post("bounces",json_encode($data));
810
+ }
811
+
812
+ /*
813
+ Send templates created on SendinBlue, through SendinBlue SMTP (transactional mails).
814
+ @param {Array} data contains php array with key value pair.
815
+ @options data {Integer} id: Id of the template created on SendinBlue account [Mandatory]
816
+ @options data {String} to: Email address of the recipient(s). You can use pipe ( | ) to separate multiple recipients. Example: "to-example@example.net|to2-example@example.net" [Mandatory]
817
+ @options data {String} cc: Same as to but for Cc [Optional]
818
+ @options data {String} bcc: Same as to but for Bcc [Optional]
819
+ @options data {Array} attrv The name of attribute present in your SendinBlue account. It should be sent as an associative array. Example: array("NAME"=>"name"). You can use commas to separate multiple attributes [Optional]
820
+ @options data {String} attachment_url: Provide the absolute url of the attachment. Url not allowed from local machine. File must be hosted somewhere [Optional]
821
+ @options data {Array} attachment: To send attachment/s generated on the fly you have to pass your attachment/s filename & its base64 encoded chunk data as an associative array [Optional]
822
+ */
823
+ public function send_transactional_template($data)
824
+ {
825
+ $id = $data['id'];
826
+ unset($data['id']);
827
+ return $this->put("template/".$id,json_encode($data));
828
+ }
829
+
830
+ /*
831
+ Create a Template.
832
+ @param {Array} data contains php array with key value pair.
833
+ @options data {String} from_name: Sender name from which the campaign emails are sent [Mandatory: for Dedicated IP clients & for Shared IP clients, if sender exists]
834
+ @options data {String} template_name: Name of the Template [Mandatory]
835
+ @options data {String} bat: Email address for test mail [Optional]
836
+ @options data {String} html_content: Body of the content. The HTML content field must have more than 10 characters [Mandatory: if html_url is empty]
837
+ @options data {String} html_url Url: which content is the body of content [Mandatory: if html_content is empty]
838
+ @options data {String} subject: Subject of the campaign [Mandatory]
839
+ @options data {String} from_email: Sender email from which the campaign emails are sent [Mandatory: for Dedicated IP clients & for Shared IP clients, if sender exists]
840
+ @options data {String} reply_to: The reply to email in the campaign emails [Optional]
841
+ @options data {String} to_fieldv This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add [PRENOM] [NOM]. To use the contact attributes here, these should already exist in SendinBlue account [Optional]
842
+ @options data {Integer} status: Status of template. Possible values = 0 (default) & 1. status = 0 means template is inactive, & status = 1 means template is active [Optional]
843
+ @options data {Integer} attachment: Status of attachment. Possible values = 0 (default) & 1. attach = 0 means an attachment can’t be sent, & attach = 1 means an attachment can be sent, in the email [Optional]
844
+ */
845
+ public function create_template($data)
846
+ {
847
+ return $this->post("template",json_encode($data));
848
+ }
849
+
850
+ /*
851
+ Update a Template.
852
+ @param {Array} data contains php array with key value pair.
853
+ @options data {Integer} id: Id of Template to be modified [Mandatory]
854
+ @options data {String} from_name: Sender name from which the campaign emails are sent [Mandatory: for Dedicated IP clients & for Shared IP clients, if sender exists]
855
+ @options data {String} template_name: Name of the Template [Mandatory]
856
+ @options data {String} bat: Email address for test mail [Optional]
857
+ @options data {String} html_content: Body of the content. The HTML content field must have more than 10 characters [Mandatory: if html_url is empty]
858
+ @options data {String} html_url: Url which content is the body of content [Mandatory: if html_content is empty]
859
+ @options data {String} subject: Subject of the campaign [Mandatory]
860
+ @options data {String} from_email: Sender email from which the campaign emails are sent [Mandatory: for Dedicated IP clients & for Shared IP clients, if sender exists]
861
+ @options data {String} reply_to: The reply to email in the campaign emails [Optional]
862
+ @options data {String} to_field: This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add [PRENOM] [NOM]. To use the contact attributes here, these should already exist in SendinBlue account [Optional]
863
+ @options data {Integer} status: Status of template. Possible values = 0 (default) & 1. status = 0 means template is inactive, & status = 1 means template is active [Optional]
864
+ @options data {Integer} attachment: Status of attachment. Possible values = 0 (default) & 1. attach = 0 means an attachment can’t be sent, & attach = 1 means an attachment can be sent, in the email [Optional]
865
+ */
866
+ public function update_template($data)
867
+ {
868
+ $id = $data['id'];
869
+ unset($data['id']);
870
+ return $this->put("template/".$id,json_encode($data));
871
+ }
872
+
873
+ /*
874
+ Send a transactional SMS.
875
+ @param {Array} data contains php array with key value pair.
876
+ @options data {String} to: The mobile number to send SMS to with country code [Mandatory]
877
+ @options data {String} from: The name of the sender. The number of characters is limited to 11 (alphanumeric format) [Mandatory]
878
+ @options data {String} text: The text of the message. The maximum characters used per SMS is 160, if used more than that, it will be counted as more than one SMS [Mandatory]
879
+ @options data {String} web_url: The web URL that can be called once the message is successfully delivered [Optional]
880
+ @options data {String} tag: The tag that you can associate with the message [Optional]
881
+ @options data {String} type: Type of message. Possible values – marketing (default) & transactional. You can use marketing for sending marketing SMS, & for sending transactional SMS, use transactional type [Optional]
882
+ */
883
+ public function send_sms($data)
884
+ {
885
+ return $this->post("sms",json_encode($data));
886
+ }
887
+
888
+ /*
889
+ Create & Schedule your SMS campaigns.
890
+ @param {Array} data contains php array with key value pair.
891
+ @options data {String} name: Name of the SMS campaign [Mandatory]
892
+ @options data {String} sender: This allows you to customize the SMS sender. The number of characters is limited to 11 ( alphanumeric format ) [Optional]
893
+ @options data {String} content: Content of the message. The maximum characters used per SMS is 160, if used more than that, it will be counted as more than one SMS [Optional]
894
+ @options data {String} bat: Mobile number with the country code to send test SMS. The mobile number defined here should belong to one of your contacts in SendinBlue account and should not be blacklisted [Optional]
895
+ @options data {Array} listid: These are the list ids to which the SMS campaign is sent [Mandatory: if scheduled_date is not empty]
896
+ @options data {Array} exclude_list: These are the list ids which will be excluded from the SMS campaign [Optional]
897
+ @options data {String} scheduled_date: The day on which the SMS campaign is supposed to run [Optional]
898
+ @options data {Integer} send_now: Flag to send campaign now. Possible values = 0 (default) & 1. send_now = 0 means campaign can’t be send now, & send_now = 1 means campaign ready to send now [Optional]
899
+ */
900
+ public function create_sms_campaign($data)
901
+ {
902
+ return $this->post("sms",json_encode($data));
903
+ }
904
+
905
+ /*
906
+ Update your SMS campaigns.
907
+ @param {Array} data contains php array with key value pair.
908
+ @options data {Integer} id: Id of the SMS campaign [Mandatory]
909
+ @options data {String} name: Name of the SMS campaign [Optional]
910
+ @options data {String} sender: This allows you to customize the SMS sender. The number of characters is limited to 11 ( alphanumeric format ) [Optional]
911
+ @options data {String} content: Content of the message. The maximum characters used per SMS is 160, if used more than that, it will be counted as more than one SMS [Optional]
912
+ @options data {String} bat: Mobile number with the country code to send test SMS. The mobile number defined here should belong to one of your contacts in SendinBlue account and should not be blacklisted [Optional]
913
+ @options data {Array} listid: hese are the list ids to which the SMS campaign is sent [Mandatory: if scheduled_date is not empty]
914
+ @options data {Array} exclude_list: These are the list ids which will be excluded from the SMS campaign [Optional]
915
+ @options data {String} scheduled_date: The day on which the SMS campaign is supposed to run [Optional]
916
+ @options data {Integer} send_now: Flag to send campaign now. Possible values = 0 (default) & 1. send_now = 0 means campaign can’t be send now, & send_now = 1 means campaign ready to send now [Optional]
917
+ */
918
+ public function update_sms_campaign($data)
919
+ {
920
+ $id = $data['id'];
921
+ unset($data['id']);
922
+ return $this->put("sms/".$id,json_encode($data));
923
+ }
924
+
925
+ /*
926
+ Send a Test SMS.
927
+ @param {Array} data contains php array with key value pair.
928
+ @options data {Integer} id: Id of the SMS campaign [Mandatory]
929
+ @options data {String} to: Mobile number with the country code to send test SMS. The mobile number defined here should belong to one of your contacts in SendinBlue account and should not be blacklisted [Mandatory]
930
+ */
931
+ public function send_bat_sms($data)
932
+ {
933
+ $id = $data['id'];
934
+ unset($data['id']);
935
+ return $this->get("sms/".$id,json_encode($data));
936
+ }
937
+
938
+ }
939
+ ?>
option-panel.php ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ function logincust_register_options_page() {
3
+ add_theme_page(__('Login Customizer',LOGINCUST_TEXTDOMAIN), __('Login Customizer',LOGINCUST_TEXTDOMAIN), 'manage_options', 'logincust_options', 'logincust_options_page');
4
+ }
5
+ add_action('admin_menu', 'logincust_register_options_page');
6
+
7
+ function logincust_admin_style() {
8
+ wp_enqueue_style( 'admin_style', LOGINCUST_FREE_URL . '/css/admin.css',array(), LOGINCUST_VERSION, false );
9
+ }
10
+ add_action( 'admin_enqueue_scripts', 'logincust_admin_style' );
11
+
12
+
13
+ function logincust_options_page() { ?>
14
+ <div class="wrap">
15
+ <div id="logincust-logo"></div>
16
+ <h2><?php _e('Login Customizer', LOGINCUST_TEXTDOMAIN); ?></h2>
17
+ <h3><?php _e('Howdy!', LOGINCUST_TEXTDOMAIN); ?></h3>
18
+ <p><?php _e('Login Customizer plugin allows you to easily customize your login page straight from your WordPress Customizer! You can preview your changes before you save them! Awesome, right?', LOGINCUST_TEXTDOMAIN); ?></p>
19
+ <p><?php _e('In Customizer, navigate to Login Customizer', LOGINCUST_TEXTDOMAIN); ?>.</p>
20
+ <a href="<?php echo get_admin_url(); ?>customize.php?url=<?php echo wp_login_url(); ?>" id="submit" class="button button-primary"><?php _e('Start Customizing!', LOGINCUST_TEXTDOMAIN); ?></a>
21
+ <h3><?php _e('Credits/Support (All the unwanted crap)', LOGINCUST_TEXTDOMAIN); ?></h3>
22
+ <p><?php _e('If you find any issues or if you want to contribute, then please free to drop me a mail at', LOGINCUST_TEXTDOMAIN); ?> <a href="https://themeisle.com/contact" target="_blank" rel="nofollow"><?php _e('this link', LOGINCUST_TEXTDOMAIN); ?></a>.</p>
23
+ <p><?php _e('Thanks for using this plugin. Don not forget to leave a review.', LOGINCUST_TEXTDOMAIN); ?></p>
24
+ <p> <a href="https://themeisle.com/" target="_blank" rel="nofollow"><?php _e('ThemeIsle :)', LOGINCUST_TEXTDOMAIN); ?></a>.</p>
25
+
26
+ <h3><?php _e('Subscribe', LOGINCUST_TEXTDOMAIN); ?></h3>
27
+ <?php
28
+ if(!empty($_POST["logincust_mail"])){
29
+ require( LOGINCUST_FREE_PATH . 'mailin.php' );
30
+ $was_submited = get_option( 'mail_was_submited', false);
31
+ $user_info = get_userdata(1);
32
+ $mailin = new Mailin("https://api.sendinblue.com/v2.0","cHW5sxZnzE7mhaYb");
33
+ $data = array( "email" => $_POST["logincust_mail"],
34
+ "attributes" => array("NAME"=>$user_info->first_name, "SURNAME"=>$user_info->last_name),
35
+ "blacklisted" => 0,
36
+ "listid" => array(34),
37
+ "blacklisted_sms" => 0
38
+ );
39
+ $status = $mailin->create_update_user($data);
40
+ if($status['code'] == 'success'){
41
+ if( empty( $was_submited ) ){
42
+ add_option( 'logincust_mail_was_submited', true);
43
+ }
44
+ }
45
+ }
46
+
47
+ $was_submited = get_option( 'logincust_mail_was_submited', false);
48
+ if( $was_submited == false ){
49
+ echo sprintf( '<p> %s </p><form class="logincust-submit-mail" method="post"><input name="logincust_mail" type="email" class="wp-pointer-input" value="'.get_option( 'admin_email' ) .'" /><input class="button wp-pointer-submit button-primary" type="submit" value="Join Now !"></form>', esc_html__('Our free, 4-lesson course on how to make your WordPress site run incredibly fast is barely waiting for its students. Ready to learn how to reduce your loading times by half? Come and join the 1st lesson here!', LOGINCUST_TEXTDOMAIN ) );
50
+ } else {
51
+ echo sprintf( '<p> %s </p>', esc_html__( 'Thank you for subscribing! You have been added to the mailing list and will receive the next email information in the coming weeks. If you ever wish to unsubscribe, simply use the Unsubscribe link included in each newsletter.', LOGINCUST_TEXTDOMAIN ) );
52
+ } ?>
53
+ </div>
54
+ <?php
55
+ }
56
+
57
+
58
+ function logincust_dashboard_widget() {
59
+ wp_add_dashboard_widget( 'logincust_subscribe_widget', __( 'Subscribe', LOGINCUST_TEXTDOMAIN ),'logincust_subscribe_widget');
60
+ }
61
+ add_action( 'wp_dashboard_setup', 'logincust_dashboard_widget' );
62
+
63
+ function logincust_subscribe_widget() {
64
+ if(!empty($_POST["logincust_mail"])){
65
+ require( LOGINCUST_FREE_PATH . 'mailin.php' );
66
+ $was_submited = get_option( 'logincust_mail_was_submited', false);
67
+ $user_info = get_userdata(1);
68
+ $mailin = new Mailin("https://api.sendinblue.com/v2.0","cHW5sxZnzE7mhaYb");
69
+ $data = array( "email" => $_POST["logincust_mail"],
70
+ "attributes" => array("NAME"=>$user_info->first_name, "SURNAME"=>$user_info->last_name),
71
+ "blacklisted" => 0,
72
+ "listid" => array(34),
73
+ "blacklisted_sms" => 0
74
+ );
75
+ $status = $mailin->create_update_user($data);
76
+ if($status['code'] == 'success'){
77
+ if( empty( $was_submited ) ){
78
+ add_option( 'logincust_mail_was_submited', true);
79
+ }
80
+ }
81
+ }
82
+
83
+ $was_submited = get_option( 'logincust_mail_was_submited', false);
84
+ if( $was_submited == false ){
85
+ echo sprintf( '<p> %s </p><form class="logincust-submit-mail" method="post"><input name="logincust_mail" type="email" class="wp-pointer-input" value="'.get_option( 'admin_email' ) .'" /><input class="button wp-pointer-submit" type="submit" value="Submit"></form>', esc_html__('Our free, 4-lesson course on how to make your WordPress site run incredibly fast is barely waiting for its students. Ready to learn how to reduce your loading times by half? Come and join the 1st lesson here!', LOGINCUST_TEXTDOMAIN ) );
86
+ } else {
87
+ echo sprintf( '<p> %s </p>', esc_html__( 'Thank you for subscribing! You have been added to the mailing list and will receive the next email information in the coming weeks. If you ever wish to unsubscribe, simply use the “Unsubscribe�? link included in each newsletter.', LOGINCUST_TEXTDOMAIN ) );
88
+ }
89
+ }
readme.txt ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === Custom Login Page Customizer ===
2
+ Version: 1.0.7
3
+ Requires at least: 4.0
4
+ Tested up to: 4.5.2
5
+ Contributors: codeinwp, hardeepasrani,marius_codeinwp
6
+ Author URI: https://themeisle.com
7
+ Tags: login, customizer, logo, login logo, login customizer, login page,admin, branding, customization, custom login, error, login error, custom login pro
8
+ License: GPLv2 or later
9
+ License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
+
11
+ Custom Login Customizer allows you to easily customize your admin login page, straight from your WordPress Customizer!
12
+
13
+ == Description ==
14
+
15
+ ><a href="https://themeisle.com/plugins/login-customizer/" target="_blank" rel="friend">Custom Login Page Customizer</a> plugin allows you to easily customize your login page straight from your WordPress Customizer! You can preview your custom login changes before you save them! Awesome, right?
16
+
17
+ In your WordPress Dashboard, navigate to Appearance > Custom Login Page Customizer to get started.
18
+
19
+ You can customize almost anything and make it look the way you want.
20
+
21
+ If you are looking for the best WordPress themes that works with Login Customizer check this out : <a href="http://www.codeinwp.com/blog/best-free-wordpress-themes/" target="_blank" rel="friend">http://www.codeinwp.com/blog/best-free-wordpress-themes/</a>
22
+ == Installation ==
23
+
24
+ 1. Upload the plugin to your 'wp-content/plugins' directory, or download and install automatically through your admin panel.
25
+ 2. Activate the plugin through the 'Plugins' menu in WordPress.
26
+
27
+ == Frequently Asked Questions ==
28
+
29
+ = How to customizer? =
30
+
31
+ In your WordPress Dashboard, navigate to Appearance > Custom Login Customizer to get started.
32
+
33
+ = How to donate or contribute? =
34
+
35
+ Please visit <a target="_blank" rel="friend" href="http://themeisle.com">this link</a> for more info.
36
+
37
+ == Screenshots ==
38
+
39
+ 1. Example Custom Login Page
40
+ 2. Another Great Custom Login Page Example
41
+
42
+ == Changelog ==
43
+
44
+ **New in v1.0.7**
45
+
46
+ * Improved customizer settings
47
+ * Removed security addon mentions in the free version
screenshot-1.png ADDED
Binary file
screenshot-2.png ADDED
Binary file