popup_panel.php
36.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
<?php
if (!defined('ABSPATH'))
exit;
if (!class_exists('CF7POPUP_menu')) {
class CF7POPUP_menu {
protected static $instance;
function CF7POPUP_wpcf7_editor_panels( $panels ) {
$panels_popup = array(
'popup-panel' => array(
'title' => __( 'Popup Setting', 'contact-form-7' ),
'callback' => array( $this, 'CF7POPUP_wpcf7_editor_panel_popup'),
),
);
$panels = array_merge($panels,$panels_popup);
return $panels;
}
function CF7POPUP_wpcf7_editor_panel_popup() {
$formid = $_REQUEST['post'];
// POPUP ADMINPANEL FORMAT
?>
<h2>Success Message Settings</h2>
<fieldset>
<legend>You can Enable/Disable this Form popup and also you can other setting related to popup.</legend>
<p>
<label>
<input type="checkbox" name="enabled_popup_val" value="popupenable" <?php if (isset($_REQUEST['post'])){if (get_post_meta( $formid, 'enabled-popup', true ) == $formid) {echo ' checked="checked"';}} ?>>Enable/Disable this Form popup
</label>
</p>
<table class="form-table tbl_main">
<tbody>
<tr>
<th scope="row">
<label>Popup Text</label>
</th>
<td>
<input type="text" name="popup_message" class="regular-text" id="popup_message" value="<?php echo get_post_meta( $formid, 'popup_message', true );?>">
</td>
</tr>
<tr>
<th scope="row">
<label>Popup Width</label>
</th>
<td>
<input type="text" name="m_popup_width" class="small-text" value="<?php echo get_post_meta( $formid, 'm_popup_width', true );?>">
<span class="description">Value must be like: 500px / auto / 50%</span>
</td>
</tr>
<tr>
<th scope="row">
<label>Popup Border Radius</label>
</th>
<td>
<input type="number" name="m_popup_radius" class="small-text" value="<?php echo get_post_meta( $formid, 'm_popup_radius', true );?>">
</td>
</tr>
<tr>
<th scope="row">
<label>Auto Hide after</label>
</th>
<td>
<input type="text" name="m_popup_duration" class="medium-text" value="<?php echo get_post_meta( $formid, 'm_popup_duration', true );?>">
<span class="description">Duration in milliseconds eg. 5000 (Popup will hide after 5 Seconds).</span>
</td>
</tr>
<tr>
<th scope="row">
<label>Select Template</label>
</th>
<td>
<?php
if(empty(get_post_meta( $formid, 'popup_templet', true ))){
$templet_sel = 'templet1';
} else {
$templet_sel = get_post_meta( $formid, 'popup_templet', true );
}
?>
<input type="radio" id="t1" name="popup_templet" value="templet1" <?php if($templet_sel == 'templet1'){echo "checked";} ?>><label for="t1">Template 1</label>
<input type="radio" id="t2" name="popup_templet" value="templet2" <?php if($templet_sel == 'templet2'){echo "checked";}?>><label for="t2">Template 2</label>
<input type="radio" id="t3" name="popup_templet" value="templet3" <?php if($templet_sel == 'templet3'){echo "checked";}?>><label for="t3">Template 3</label>
<input type="radio" id="t4" name="popup_templet" value="templet4" <?php if($templet_sel == 'templet4'){echo "checked";}?>><label for="t4">Template 4</label>
<input type="radio" id="t5" name="popup_templet" value="templet5" <?php if($templet_sel == 'templet5'){echo "checked";}?>><label for="t5">Template 5</label>
<input type="radio" id="ct" name="popup_templet" value="custom_templet" <?php if($templet_sel == 'custom_templet'){echo "checked";}?>><label for="ct">Custom Template (<a href="https://www.xeeshop.com/#pricing" target="_blank">Go Pro</a>)</label>
</td>
</tr>
<tr class="custom_templet_1">
<th scope="row" colspan="2">
<label>Template 1 :</label>
</th>
</tr>
<tr class="custom_templet_1">
<th scope="row">
</th>
<td>
<img src="<?php echo plugins_url( 'popup-message-for-contact-form-7-pro/images/theme_1.png'); ?>"/>
</td>
</tr>
<tr class="custom_templet_2">
<th scope="row" colspan="2">
<label>Template 2 :</label>
</th>
</tr>
<tr class="custom_templet_2">
<th scope="row">
</th>
<td>
<img src="<?php echo plugins_url( 'popup-message-for-contact-form-7-pro/images/theme_2.png'); ?>"/>
</td>
</tr>
<tr class="custom_templet_3">
<th scope="row" colspan="2">
<label>Template 3 :</label>
</th>
</tr>
<tr class="custom_templet_3">
<th scope="row">
</th>
<td>
<img src="<?php echo plugins_url( 'popup-message-for-contact-form-7-pro/images/theme_3.png'); ?>"/>
</td>
</tr>
<tr class="custom_templet_4">
<th scope="row" colspan="2">
<label>Template 4 :</label>
</th>
</tr>
<tr class="custom_templet_4">
<th scope="row">
</th>
<td>
<img src="<?php echo plugins_url( 'popup-message-for-contact-form-7-pro/images/theme_4.png'); ?>"/>
</td>
</tr>
<tr class="custom_templet_5">
<th scope="row" colspan="2">
<label>Template 5 :</label>
</th>
</tr>
<tr class="custom_templet_5">
<th scope="row">
</th>
<td>
<img src="<?php echo plugins_url( 'popup-message-for-contact-form-7-pro/images/theme_5.png'); ?>"/>
</td>
</tr>
<tr class="tr_custom_templet failure_popup">
<th scope="row" colspan="2">
<label>Select Popup Background :</label>
</th>
</tr>
<tr class="tr_custom_templet failure_popup">
<th scope="row">
</th>
<td>
<table class="tbl_child">
<tr>
<td>
<label>
<input type="radio" name="popup_background_option" value="bg_color" <?php echo "checked"; ?>>Background Color
</label>
</td>
<td>
<input class="jscolor" name="popup_background_color" value="<?php echo get_post_meta( $formid, 'popup_background_color', true );?>">
</td>
</tr>
<tr>
<td>
<label>
<input type="radio" name="popup_background_option" value="image">Background Image
</label>
</td>
<td>
<?php
echo $this->CF7POPUP_image_uploader_field( 'image1', get_post_meta($formid, 'hidden_img_count', true ) );
?>
</td>
<td>
<?php if(!empty(get_post_meta($formid, 'popup_image_color', true ))){ ?>
<img src="<?php echo get_post_meta($formid, 'popup_image_color', true ); ?>" width="50px" height="50px">
<?php } ?>
<input type="hidden" name="popup_image_color" class="hidden_img" >
</td>
</tr>
<tr>
<td>
<label>
<input type="radio" name="popup_background_option" value="gradient_color">Gradient Color
</label>
</td>
<td>
<input class="jscolor" name="popup_gradient_color" value="">
</td>
<td>
<input class="jscolor gra_box" name="popup_gradient_color1" value="">
</td>
</tr>
<tr>
<td>
<label>Popup Text Color</label>
</td>
<td>
<input class="jscolor" name="popup_text_color" id="popup_text_color" value="">
</td>
</tr>
<tr>
<td>
<label>Button background color</label>
</td>
<td>
<input class="jscolor" name="popup_button_background_color" value="">
</td>
</tr>
</table>
</td>
</tr>
<tr class="failure_popup">
<th scope="row">
<label>Button Text</label>
</th>
<td>
<input type="text" name="popup_button_text" class="regular-text" value="ok">
</td>
</tr>
<tr><td><a href="https://www.xeeshop.com/#pricing" target="_blank">Go Pro</a></td></tr>
</tbody>
</table>
</fieldset>
<h2>Failure message Settings <a href="https://www.xeeshop.com/#pricing" target="_blank">Go Pro</a></h2>
<fieldset class="failure_popup">
<legend>You can Enable/Disable this Failure popup and also you can you other setting related to Failure popup.</legend>
<p>
<label>
<input type="checkbox" name="enabled_failure_popup_val" value="failurepopupenable" <?php if (isset($_REQUEST['post'])){if (get_post_meta( $formid, 'enabled-popup-failure', true ) == $formid) {echo ' checked="checked"';}} ?>>Enable/Disable this Failure popup
</label>
</p>
<table class="form-table">
<tbody>
<tr>
<th scope="row">
<label>Failure Popup Width</label>
</th>
<td>
<input type="text" name="failure_popup_width" class="small-text" value="<?php echo get_post_meta( $formid, 'failure_popup_width', true );?>">
<span class="description">Value must be like: 500px / auto / 50%</span>
</td>
</tr>
<tr>
<th scope="row">
<label>failure Popup Border Radius</label>
</th>
<td>
<input type="number" name="failure_popup_radius" class="small-text" value="<?php echo get_post_meta( $formid, 'failure_popup_radius', true );?>">
</td>
</tr>
<tr>
<th scope="row">
<label>Auto Hide after(Failure)</label>
</th>
<td>
<input type="text" name="failure_popup_duration" class="medium-text" value="<?php echo get_post_meta( $formid, 'failure_popup_duration', true );?>">
<span class="description">Duration in milliseconds eg. 5000 (Popup will hide after 5 Seconds).</span>
</td>
</tr>
<tr>
<th scope="row">
<label>Select Template</label>
</th>
<td>
<?php
if(empty(get_post_meta( $formid, 'failure_popup_templet', true ))){
$templet_sel = 'templet1';
} else {
$templet_sel = get_post_meta( $formid, 'failure_popup_templet', true );
}
?>
<input type="radio" id="fpt1" name="failure_popup_templet" value="templet1" <?php if($templet_sel == 'templet1'){echo "checked";} ?>><label for="fpt1">Template 1</label>
<input type="radio" id="fpt2" name="failure_popup_templet" value="templet2" <?php if($templet_sel == 'templet2'){echo "checked";}?>><label for="fpt2">Template 2</label>
<input type="radio" id="fpt3" name="failure_popup_templet" value="templet3" <?php if($templet_sel == 'templet3'){echo "checked";}?>><label for="fpt3">Template 3</label>
<input type="radio" id="fpt4" name="failure_popup_templet" value="templet4" <?php if($templet_sel == 'templet4'){echo "checked";}?>><label for="fpt4">Template 4</label>
<input type="radio" id="fpt5" name="failure_popup_templet" value="templet5" <?php if($templet_sel == 'templet5'){echo "checked";}?>><label for="fpt5">Template 5</label>
<input type="radio" id="fptct" name="failure_popup_templet" value="custom_templet" <?php if($templet_sel == 'custom_templet'){echo "checked";}?>><label for="fptct">Custom Template</label>
</td>
</tr>
<tr class="failuretr_custom_templet_1">
<th scope="row" colspan="2">
<label>Template 1 :</label>
</th>
</tr>
<tr class="failuretr_custom_templet_1">
<th scope="row">
</th>
<td>
<img src="<?php echo plugins_url( 'popup-message-for-contact-form-7-pro/images/f_theme_1.png'); ?>"/>
</td>
</tr>
<tr class="failuretr_custom_templet_2">
<th scope="row" colspan="2">
<label>Template 2 :</label>
</th>
</tr>
<tr class="failuretr_custom_templet_2">
<th scope="row">
</th>
<td>
<img src="<?php echo plugins_url( 'popup-message-for-contact-form-7-pro/images/f_theme_2.png'); ?>"/>
</td>
</tr>
<tr class="failuretr_custom_templet_3">
<th scope="row" colspan="2">
<label>Template 3 :</label>
</th>
</tr>
<tr class="failuretr_custom_templet_3">
<th scope="row">
</th>
<td>
<img src="<?php echo plugins_url( 'popup-message-for-contact-form-7-pro/images/f_theme_3.png'); ?>"/>
</td>
</tr>
<tr class="failuretr_custom_templet_4">
<th scope="row" colspan="2">
<label>Template 4 :</label>
</th>
</tr>
<tr class="failuretr_custom_templet_4">
<th scope="row">
</th>
<td>
<img src="<?php echo plugins_url( 'popup-message-for-contact-form-7-pro/images/f_theme_4.png'); ?>"/>
</td>
</tr>
<tr class="failuretr_custom_templet_5">
<th scope="row" colspan="2">
<label>Template 5 :</label>
</th>
</tr>
<tr class="failuretr_custom_templet_5">
<th scope="row">
</th>
<td>
<img src="<?php echo plugins_url( 'popup-message-for-contact-form-7-pro/images/f_theme_5.png'); ?>"/>
</td>
</tr>
<tr class="failuretr_custom_templet">
<th scope="row" colspan="2">
<label>Select Popup Background :</label>
</th>
</tr>
<tr class="failuretr_custom_templet">
<th scope="row">
</th>
<td>
<table class="tbl_child">
<tr>
<td>
<?php
if(empty(get_post_meta( $formid, 'failure_popup_background_option', true ))){
$val = 'bg_color';
} else {
$val = get_post_meta( $formid, 'failure_popup_background_option', true );
}
?>
<label>
<input type="radio" name="failure_popup_background_option" value="bg_color" <?php if($val == 'bg_color'){echo "checked";}?>>Background Color
</label>
</td>
<td>
<input class="jscolor" name="failure_popup_background_color" value="<?php echo get_post_meta( $formid, 'failure_popup_background_color', true );?>">
</td>
</tr>
<tr>
<td>
<label>
<input type="radio" name="failure_popup_background_option" value="image" <?php if($val == 'image'){echo "checked";}?>>Background Image
</label>
</td>
<td>
<?php
echo $this->CF7POPUP_image_uploader_field_failer ( 'image_failure', get_post_meta($formid, 'failure_hidden_img_count', true ) );
?>
</td>
<td>
<?php if(!empty(get_post_meta($formid, 'failure_popup_image_color', true ))){ ?>
<img src="<?php echo get_post_meta($formid, 'failure_popup_image_color', true ); ?>" width="50px" height="50px">
<?php } ?>
<input type="hidden" name="failure_popup_image_color" class="failure_hidden_img" >
</td>
</tr>
<tr>
<td>
<label>
<input type="radio" name="failure_popup_background_option" value="gradient_color" <?php if($val == 'gradient_color'){echo "checked";}?>>Gradient Color
</label>
</td>
<td>
<input class="jscolor" name="failure_popup_gradient_color" value="<?php echo get_post_meta( $formid, 'failure_popup_gradient_color', true );?>">
</td>
<td>
<input class="jscolor gra_box" name="failure_popup_gradient_color1" value="<?php echo get_post_meta( $formid, 'failure_popup_gradient_color1', true );?>">
</td>
</tr>
<tr>
<td>
<label>Failure Popup Text Color</label>
</td>
<td>
<input class="jscolor" name="failure_popup_text_color" id="failure_popup_text_color" value="<?php echo get_post_meta( $formid, 'failure_popup_text_color', true );?>">
</td>
</tr>
<tr>
<td>
<label>Button background color</label>
</td>
<td>
<input class="jscolor" name="failure_popup_button_background_color" value="<?php echo get_post_meta( $formid, 'failure_popup_button_background_color', true );?>">
</td>
</tr>
</table>
</td>
</tr>
<tr >
<th scope="row">
<label>Failure Button Text</label>
</th>
<td>
<input type="text" name="failure_popup_button_text" class="regular-text" value="<?php echo get_post_meta( $formid, 'failure_popup_button_text', true );?>">
</td>
</tr>
</tbody>
</table>
</fieldset>
<?php
}
function CF7POPUP_wpcf7_admin_script() {
?>
<script type="text/javascript">
jQuery( document ).ready(function() {
var radioValue = jQuery("input[name='popup_templet']:checked").val();
if(radioValue == "templet1"){
jQuery('.custom_templet_1').css("display", "table-row");
}
if(radioValue == "templet2"){
jQuery('.custom_templet_2').css("display", "table-row");
}
if(radioValue == "templet3"){
jQuery('.custom_templet_3').css("display", "table-row");
}
if(radioValue == "templet4"){
jQuery('.custom_templet_4').css("display", "table-row");
}
if(radioValue == "templet5"){
jQuery('.custom_templet_5').css("display", "table-row");
}
if(radioValue == "custom_templet"){
jQuery('.tr_custom_templet').css("display", "table-row");
}
var f_radioValue = jQuery("input[name='failure_popup_templet']:checked").val();
if(f_radioValue == "templet1"){
jQuery('.failuretr_custom_templet_1').css("display", "table-row");
}
if(f_radioValue == "templet2"){
jQuery('.failuretr_custom_templet_2').css("display", "table-row");
}
if(f_radioValue == "templet3"){
jQuery('.failuretr_custom_templet_3').css("display", "table-row");
}
if(f_radioValue == "templet4"){
jQuery('.failuretr_custom_templet_4').css("display", "table-row");
}
if(f_radioValue == "templet5"){
jQuery('.failuretr_custom_templet_5').css("display", "table-row");
}
if(f_radioValue == "custom_templet"){
jQuery('.failuretr_custom_templet').css("display", "table-row");
}
jQuery("input[name='popup_templet']").click(function(){
var radioValue = jQuery("input[name='popup_templet']:checked").val();
if(radioValue == "custom_templet"){
jQuery('.tr_custom_templet').css("display", "table-row");
}else{
jQuery('.tr_custom_templet').css("display", "none");
}
if(radioValue == "templet1"){
jQuery('.custom_templet_1').css("display", "table-row");
}else{
jQuery('.custom_templet_1').css("display", "none");
}
if(radioValue == "templet2"){
jQuery('.custom_templet_2').css("display", "table-row");
}else{
jQuery('.custom_templet_2').css("display", "none");
}
if(radioValue == "templet3"){
jQuery('.custom_templet_3').css("display", "table-row");
}else{
jQuery('.custom_templet_3').css("display", "none");
}
if(radioValue == "templet4"){
jQuery('.custom_templet_4').css("display", "table-row");
}else{
jQuery('.custom_templet_4').css("display", "none");
}
if(radioValue == "templet5"){
jQuery('.custom_templet_5').css("display", "table-row");
}else{
jQuery('.custom_templet_5').css("display", "none");
}
});
jQuery("input[name='failure_popup_templet']").click(function(){
var radioValue = jQuery("input[name='failure_popup_templet']:checked").val();
if(radioValue == "custom_templet"){
jQuery('.failuretr_custom_templet').css("display", "table-row");
}else{
jQuery('.failuretr_custom_templet').css("display", "none");
}
if(radioValue == "templet1"){
jQuery('.failuretr_custom_templet_1').css("display", "table-row");
}else{
jQuery('.failuretr_custom_templet_1').css("display", "none");
}
if(radioValue == "templet2"){
jQuery('.failuretr_custom_templet_2').css("display", "table-row");
}else{
jQuery('.failuretr_custom_templet_2').css("display", "none");
}
if(radioValue == "templet3"){
jQuery('.failuretr_custom_templet_3').css("display", "table-row");
}else{
jQuery('.failuretr_custom_templet_3').css("display", "none");
}
if(radioValue == "templet4"){
jQuery('.failuretr_custom_templet_4').css("display", "table-row");
}else{
jQuery('.failuretr_custom_templet_4').css("display", "none");
}
if(radioValue == "templet5"){
jQuery('.failuretr_custom_templet_5').css("display", "table-row");
}else{
jQuery('.failuretr_custom_templet_5').css("display", "none");
}
});
});
</script>
<style type="text/css">
.form-group.smartcat-uploader {
display: inline-block;
}
table.tbl_child td {
padding: 0px 6px;
}
.form-table td {
padding: 0px;
}
.tr_custom_templet,.failuretr_custom_templet,.custom_templet_1,.custom_templet_2,.custom_templet_3,.custom_templet_4,.custom_templet_5,.failuretr_custom_templet_1,.failuretr_custom_templet_2,.failuretr_custom_templet_3,.failuretr_custom_templet_4,.failuretr_custom_templet_5{
display: none;
}
.failure_popup {
pointer-events: none;
opacity: 0.7;
}
</style>
<?php
}
function CF7POPUP_image_uploader_field( $name, $value = '') {
$image = ' button">Upload image';
$image_size = 'full'; // it would be better to use thumbnail size here (150x150 or so)
$display = 'none'; // display state ot the "Remove image" button
if( $image_attributes = wp_get_attachment_image_src( $value, $image_size ) ) {
// $image_attributes[0] - image URL
// $image_attributes[1] - image width
// $image_attributes[2] - image height
$image = '"><img src="' . $image_attributes[0] . '" style="max-width:95%;display:block;" />';
$display = 'inline-block';
}
return '
<div>
<a href="#" class="misha_upload_image_button' . $image . '</a>
<input type="hidden" name="' . $name . '" id="' . $name . '" value="' . $value . '" />
</div>';
}
function CF7POPUP_image_uploader_field_failer( $name, $value = '') {
$image = ' button">Upload image';
$image_size = 'full'; // it would be better to use thumbnail size here (150x150 or so)
$display = 'none'; // display state ot the "Remove image" button
if( $image_attributes = wp_get_attachment_image_src( $value, $image_size ) ) {
// $image_attributes[0] - image URL
// $image_attributes[1] - image width
// $image_attributes[2] - image height
$image = '"><img src="' . $image_attributes[0] . '" style="max-width:95%;display:block;" />';
$display = 'inline-block';
}
return '
<div>
<a href="#" class="misha_upload_image_button_failer' . $image . '</a>
<input type="hidden" name="' . $name . '" id="' . $name . '" value="' . $value . '" />
</div>';
}
function init() {
add_filter( 'wpcf7_editor_panels', array( $this, 'CF7POPUP_wpcf7_editor_panels'), 10, 1 );
add_action('admin_footer', array( $this, 'CF7POPUP_wpcf7_admin_script'));
}
public static function instance() {
if (!isset(self::$instance)) {
self::$instance = new self();
self::$instance->init();
}
return self::$instance;
}
}
CF7POPUP_menu::instance();
}