Version Description
Download this release
Release Info
Developer | yuvalsabar |
Plugin | Contact Form 7 Redirection |
Version | 2.3.0 |
Comparing to | |
See all releases |
Code changes from version 2.2.8 to 2.3.0
- build/js/wpcf7-redirect-backend-script.js +50 -6
- build/js/wpcf7-redirect-frontend-script.js +0 -98
- classes/actions/class-wpcf7r-action-redirect.php +10 -0
- classes/actions/class-wpcf7r-action-save-lead.php +47 -2
- classes/class-wpcf7r-action.php +38 -11
- classes/class-wpcf7r-actions.php +5 -3
- classes/class-wpcf7r-base.php +4 -0
- classes/class-wpcf7r-extensions.php +1 -1
- classes/class-wpcf7r-form-helper.php +22 -10
- classes/class-wpcf7r-form.php +8 -5
- classes/class-wpcf7r-html.php +45 -32
- classes/class-wpcf7r-leads-manager.php +199 -9
- classes/class-wpcf7r-mailchimp-helper.php +5 -2
- classes/class-wpcf7r-submission.php +10 -13
- classes/class-wpcf7r-user.php +7 -2
- classes/class-wpcf7r-utils.php +53 -22
- modules/index.php +0 -0
- readme.txt +12 -3
- templates/blank-popup-template.php +0 -33
- templates/default-settings.php +1 -1
- templates/fields/field-leads-mapping.php +19 -18
- templates/fields/field-select.php +6 -2
- templates/fields/field-tags-map.php +33 -27
- templates/popups/template-1.css +0 -1
- templates/popups/template-1.php +0 -27
- templates/popups/template-1.scss +0 -148
- templates/popups/template-2.css +0 -1
- templates/popups/template-2.php +0 -33
- templates/popups/template-2.scss +0 -125
- templates/popups/template-3.css +0 -1
- templates/popups/template-3.php +0 -28
- templates/popups/template-3.scss +0 -115
- templates/popups/template-4.css +0 -289
- templates/popups/template-4.php +0 -26
- templates/popups/template-4.scss +0 -301
- templates/popups/wpcfr-popup-wrap-default.php +0 -13
- wpcf7-redirect.php +6 -6
- wpcf7r-functions.php +17 -3
build/js/wpcf7-redirect-backend-script.js
CHANGED
@@ -115,7 +115,7 @@ var wpcf7_redirect_admin;
|
|
115 |
this.renumber_rows();
|
116 |
this.admin_validations = new Wpcf7_admin_validations($);
|
117 |
this.init_select2();
|
118 |
-
|
119 |
this.init_media_field();
|
120 |
this.init_colorpickers();
|
121 |
this.mark_default_select_fields();
|
@@ -132,8 +132,8 @@ var wpcf7_redirect_admin;
|
|
132 |
})
|
133 |
}
|
134 |
|
135 |
-
this.init_editors = function($editor_action_wrap){
|
136 |
-
if(
|
137 |
editor_id = $editor_action_wrap.find('textarea').prop('id');
|
138 |
|
139 |
tinymce.init(tinyMCEPreInit.mceInit[editor_id]);
|
@@ -171,6 +171,7 @@ var wpcf7_redirect_admin;
|
|
171 |
this.open_tab_selector = '#redirect-panel h3[data-tab-target]';
|
172 |
this.show_action_selector = '.actions-list .edit a';
|
173 |
this.move_action_to_trash_selector = '.actions-list .row-actions .trash a';
|
|
|
174 |
this.move_lead_to_trash_selector = '.leads-list .trash a';
|
175 |
this.add_new_action_selector = '.wpcf7-add-new-action';
|
176 |
this.custom_checkbox_selector = '.wpcf7r-checkbox input';
|
@@ -183,6 +184,7 @@ var wpcf7_redirect_admin;
|
|
183 |
this.remove_repeater_field_selector = '.qs-repeater-action .dashicons-minus';
|
184 |
this.api_test_button_selector = '.wpcf7-redirect-test_button-fields';
|
185 |
this.toggler_handler_selector = '.actions-list [data-toggle] input';
|
|
|
186 |
this.mailchimp_get_lists = '.wpcf7-redirect-get_mailchimp_lists-fields';
|
187 |
this.mailchimp_create_list = '.wpcf7-redirect-create_list-fields';
|
188 |
this.mailchimp_list_selector = '.field-wrap-mailchimp_list_id select';
|
@@ -395,9 +397,10 @@ var wpcf7_redirect_admin;
|
|
395 |
$(document.body).on('click', this.remove_repeater_field_selector, this.remove_repeating_field.bind(this));
|
396 |
//make API test
|
397 |
$(document.body).on('click', this.api_test_button_selector, this.make_api_test_call.bind(this));
|
398 |
-
|
399 |
//data toggler function
|
400 |
$(document.body).on('change', this.toggler_handler_selector, this.data_toggler.bind(this));
|
|
|
|
|
401 |
//get mailchimp lists
|
402 |
$(document.body).on('click', this.mailchimp_get_lists, this.mailchimp_get_lists_handler.bind(this));
|
403 |
//create mailchimp list
|
@@ -422,6 +425,9 @@ var wpcf7_redirect_admin;
|
|
422 |
$(document.body).on('click', this.debug_import_button_selector, this.import_debug.bind(this));
|
423 |
//send debug info
|
424 |
$(document.body).on('click', this.debug_send_button_selector, this.send_debug_info.bind(this));
|
|
|
|
|
|
|
425 |
}
|
426 |
|
427 |
/**
|
@@ -553,6 +559,23 @@ var wpcf7_redirect_admin;
|
|
553 |
this.show_loader($inner_element.parents('.hidden-action').first());
|
554 |
}
|
555 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
556 |
this.data_toggler = function (e) {
|
557 |
//prevent checkbox input from firing duplicated event but keep its original functionality
|
558 |
var $clicked_button = $(e.currentTarget);
|
@@ -728,7 +751,7 @@ var wpcf7_redirect_admin;
|
|
728 |
* @param {[type]} [action== 'wpcf7r_add_action'] [description]
|
729 |
* @return {[type]} [description]
|
730 |
*/
|
731 |
-
if ('wpcf7r_add_action' === action) {
|
732 |
$('[data-wrapid=' + params.rule_id + '] #the_list').append(response.action_row);
|
733 |
|
734 |
$new_action_wrap = $('[data-wrapid=' + params.rule_id + '] #the_list tr:last-child').prev();
|
@@ -738,6 +761,7 @@ var wpcf7_redirect_admin;
|
|
738 |
_this.init_colorpickers();
|
739 |
_this.init_editors($new_action_wrap);
|
740 |
}
|
|
|
741 |
if ('wpcf7r_reset_settings' === action) {
|
742 |
window.location.reload();
|
743 |
}
|
@@ -787,13 +811,30 @@ var wpcf7_redirect_admin;
|
|
787 |
this.hide_loader();
|
788 |
}
|
789 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
790 |
this.move_post_to_trash = function (e) {
|
791 |
e.preventDefault();
|
792 |
$clicked_button = $(e.currentTarget);
|
793 |
this.show_loader($clicked_button.parents('td'));
|
|
|
794 |
params = [{
|
795 |
'post_id': $clicked_button.data('id')
|
796 |
}];
|
|
|
797 |
this.make_ajax_call('wpcf7r_delete_action', params, 'ater_ajax_delete');
|
798 |
}
|
799 |
|
@@ -867,7 +908,9 @@ var wpcf7_redirect_admin;
|
|
867 |
*/
|
868 |
this.add_new_block = function (e) {
|
869 |
this.new_block_counter++;
|
|
|
870 |
$clicked_button = $(e.currentTarget);
|
|
|
871 |
action_id = this.get_block_action_id($clicked_button);
|
872 |
html_block_template = wpcfr_template.block_html;
|
873 |
block_title_html = wpcfr_template.block_title_html;
|
@@ -875,6 +918,7 @@ var wpcf7_redirect_admin;
|
|
875 |
html_block_template = this.replaceAll(html_block_template, 'action_id', action_id);
|
876 |
block_title_html = this.replaceAll(block_title_html, 'new_block', 'block_' + this.new_block_counter);
|
877 |
block_title_html = this.replaceAll(block_title_html, 'action_id', action_id);
|
|
|
878 |
$(this.tab_title_all_selector).last().after(block_title_html);
|
879 |
$(this.blocks_container_selector).append(html_block_template);
|
880 |
$(this.tab_title_all_selector).last().click();
|
@@ -1075,7 +1119,7 @@ var wpcf7_redirect_admin;
|
|
1075 |
});
|
1076 |
}
|
1077 |
|
1078 |
-
this.reset_all_settings = function(e){
|
1079 |
e.preventDefault();
|
1080 |
var action = 'wpcf7r_reset_settings';
|
1081 |
var params = [];
|
115 |
this.renumber_rows();
|
116 |
this.admin_validations = new Wpcf7_admin_validations($);
|
117 |
this.init_select2();
|
118 |
+
|
119 |
this.init_media_field();
|
120 |
this.init_colorpickers();
|
121 |
this.mark_default_select_fields();
|
132 |
})
|
133 |
}
|
134 |
|
135 |
+
this.init_editors = function ($editor_action_wrap) {
|
136 |
+
if ('undefined' !== typeof tinymce) {
|
137 |
editor_id = $editor_action_wrap.find('textarea').prop('id');
|
138 |
|
139 |
tinymce.init(tinyMCEPreInit.mceInit[editor_id]);
|
171 |
this.open_tab_selector = '#redirect-panel h3[data-tab-target]';
|
172 |
this.show_action_selector = '.actions-list .edit a';
|
173 |
this.move_action_to_trash_selector = '.actions-list .row-actions .trash a';
|
174 |
+
this.dupicate_action_selector = '.actions-list .row-actions .duplicate a';
|
175 |
this.move_lead_to_trash_selector = '.leads-list .trash a';
|
176 |
this.add_new_action_selector = '.wpcf7-add-new-action';
|
177 |
this.custom_checkbox_selector = '.wpcf7r-checkbox input';
|
184 |
this.remove_repeater_field_selector = '.qs-repeater-action .dashicons-minus';
|
185 |
this.api_test_button_selector = '.wpcf7-redirect-test_button-fields';
|
186 |
this.toggler_handler_selector = '.actions-list [data-toggle] input';
|
187 |
+
this.select_toggler_selector = '[data-toggler-name]';
|
188 |
this.mailchimp_get_lists = '.wpcf7-redirect-get_mailchimp_lists-fields';
|
189 |
this.mailchimp_create_list = '.wpcf7-redirect-create_list-fields';
|
190 |
this.mailchimp_list_selector = '.field-wrap-mailchimp_list_id select';
|
397 |
$(document.body).on('click', this.remove_repeater_field_selector, this.remove_repeating_field.bind(this));
|
398 |
//make API test
|
399 |
$(document.body).on('click', this.api_test_button_selector, this.make_api_test_call.bind(this));
|
|
|
400 |
//data toggler function
|
401 |
$(document.body).on('change', this.toggler_handler_selector, this.data_toggler.bind(this));
|
402 |
+
//display content according to select field
|
403 |
+
$(document.body).on('change', this.select_toggler_selector, this.select_toggler.bind(this));
|
404 |
//get mailchimp lists
|
405 |
$(document.body).on('click', this.mailchimp_get_lists, this.mailchimp_get_lists_handler.bind(this));
|
406 |
//create mailchimp list
|
425 |
$(document.body).on('click', this.debug_import_button_selector, this.import_debug.bind(this));
|
426 |
//send debug info
|
427 |
$(document.body).on('click', this.debug_send_button_selector, this.send_debug_info.bind(this));
|
428 |
+
//duplicate action
|
429 |
+
$(document.body).on('click', this.dupicate_action_selector, this.duplicate_action.bind(this));
|
430 |
+
|
431 |
}
|
432 |
|
433 |
/**
|
559 |
this.show_loader($inner_element.parents('.hidden-action').first());
|
560 |
}
|
561 |
|
562 |
+
/**
|
563 |
+
* Handle toggling display view according to select field.
|
564 |
+
* @param {*} e
|
565 |
+
*/
|
566 |
+
this.select_toggler = function (e) {
|
567 |
+
var $select = $(e.currentTarget);
|
568 |
+
|
569 |
+
var toggler_name = $select.data('toggler-name');
|
570 |
+
var selected_value = $select.val();
|
571 |
+
|
572 |
+
$( '.' + toggler_name ).hide();
|
573 |
+
|
574 |
+
if( selected_value ){
|
575 |
+
$( '.' + toggler_name + '_' + selected_value).show();
|
576 |
+
}
|
577 |
+
}
|
578 |
+
|
579 |
this.data_toggler = function (e) {
|
580 |
//prevent checkbox input from firing duplicated event but keep its original functionality
|
581 |
var $clicked_button = $(e.currentTarget);
|
751 |
* @param {[type]} [action== 'wpcf7r_add_action'] [description]
|
752 |
* @return {[type]} [description]
|
753 |
*/
|
754 |
+
if ('wpcf7r_add_action' === action || 'wpcf7r_duplicate_action' == action) {
|
755 |
$('[data-wrapid=' + params.rule_id + '] #the_list').append(response.action_row);
|
756 |
|
757 |
$new_action_wrap = $('[data-wrapid=' + params.rule_id + '] #the_list tr:last-child').prev();
|
761 |
_this.init_colorpickers();
|
762 |
_this.init_editors($new_action_wrap);
|
763 |
}
|
764 |
+
|
765 |
if ('wpcf7r_reset_settings' === action) {
|
766 |
window.location.reload();
|
767 |
}
|
811 |
this.hide_loader();
|
812 |
}
|
813 |
|
814 |
+
this.duplicate_action = function (e) {
|
815 |
+
e.preventDefault();
|
816 |
+
$clicked_button = $(e.currentTarget);
|
817 |
+
|
818 |
+
this.show_loader($clicked_button.parents('td'));
|
819 |
+
|
820 |
+
params = {
|
821 |
+
'post_id': $clicked_button.data('id'),
|
822 |
+
'form_id': $('#post_ID').val(),
|
823 |
+
'rule_id': $clicked_button.data('ruleid'),
|
824 |
+
};
|
825 |
+
|
826 |
+
this.make_ajax_call('wpcf7r_duplicate_action', params, 'after_ajax_call');
|
827 |
+
}
|
828 |
+
|
829 |
this.move_post_to_trash = function (e) {
|
830 |
e.preventDefault();
|
831 |
$clicked_button = $(e.currentTarget);
|
832 |
this.show_loader($clicked_button.parents('td'));
|
833 |
+
|
834 |
params = [{
|
835 |
'post_id': $clicked_button.data('id')
|
836 |
}];
|
837 |
+
|
838 |
this.make_ajax_call('wpcf7r_delete_action', params, 'ater_ajax_delete');
|
839 |
}
|
840 |
|
908 |
*/
|
909 |
this.add_new_block = function (e) {
|
910 |
this.new_block_counter++;
|
911 |
+
|
912 |
$clicked_button = $(e.currentTarget);
|
913 |
+
|
914 |
action_id = this.get_block_action_id($clicked_button);
|
915 |
html_block_template = wpcfr_template.block_html;
|
916 |
block_title_html = wpcfr_template.block_title_html;
|
918 |
html_block_template = this.replaceAll(html_block_template, 'action_id', action_id);
|
919 |
block_title_html = this.replaceAll(block_title_html, 'new_block', 'block_' + this.new_block_counter);
|
920 |
block_title_html = this.replaceAll(block_title_html, 'action_id', action_id);
|
921 |
+
|
922 |
$(this.tab_title_all_selector).last().after(block_title_html);
|
923 |
$(this.blocks_container_selector).append(html_block_template);
|
924 |
$(this.tab_title_all_selector).last().click();
|
1119 |
});
|
1120 |
}
|
1121 |
|
1122 |
+
this.reset_all_settings = function (e) {
|
1123 |
e.preventDefault();
|
1124 |
var action = 'wpcf7r_reset_settings';
|
1125 |
var params = [];
|
build/js/wpcf7-redirect-frontend-script.js
CHANGED
@@ -3,9 +3,7 @@ var wpcf7_redirect;
|
|
3 |
(function ($) {
|
4 |
function Wpcf7_redirect() {
|
5 |
this.init = function () {
|
6 |
-
|
7 |
this.wpcf7_redirect_mailsent_handler();
|
8 |
-
|
9 |
};
|
10 |
|
11 |
this.wpcf7_redirect_mailsent_handler = function () {
|
@@ -17,79 +15,48 @@ var wpcf7_redirect;
|
|
17 |
$(document.body).trigger('wpcf7r-mailsent', [event]);
|
18 |
|
19 |
if (typeof event.detail.apiResponse != 'undefined' && event.detail.apiResponse) {
|
20 |
-
|
21 |
var apiResponse = event.detail.apiResponse;
|
22 |
-
|
23 |
var actionDelay = 0;
|
24 |
|
25 |
//handle api response
|
26 |
-
|
27 |
if (typeof apiResponse.api_url_request != 'undefined' && apiResponse.api_url_request) {
|
28 |
-
|
29 |
wpcf7_redirect.handle_api_action(apiResponse.api_url_request);
|
30 |
-
|
31 |
}
|
32 |
|
33 |
//handle api response
|
34 |
-
|
35 |
if (typeof apiResponse.api_json_xml_request != 'undefined' && apiResponse.api_json_xml_request) {
|
36 |
-
|
37 |
wpcf7_redirect.handle_api_action(apiResponse.api_json_xml_request);
|
38 |
-
|
39 |
}
|
40 |
|
41 |
//handle fire javascript action
|
42 |
-
|
43 |
if (typeof apiResponse.FireScript != 'undefined' && apiResponse.FireScript) {
|
44 |
-
|
45 |
actionDelay = typeof apiResponse.FireScript.delay_redirect != 'undefined' ? apiResponse.FireScript.delay_redirect : actionDelay;
|
46 |
-
|
47 |
window.setTimeout(function () {
|
48 |
-
|
49 |
wpcf7_redirect.handle_javascript_action(apiResponse.FireScript);
|
50 |
-
|
51 |
}, actionDelay);
|
52 |
-
|
53 |
}
|
54 |
|
55 |
//catch and handle popup action
|
56 |
-
|
57 |
if (typeof apiResponse.popup != 'undefined' && apiResponse.popup) {
|
58 |
-
|
59 |
wpcf7_redirect.handle_popups(apiResponse.popup);
|
60 |
-
|
61 |
}
|
62 |
|
63 |
//catch redirect to paypal
|
64 |
-
|
65 |
if (typeof apiResponse.redirect_to_paypal != 'undefined' && apiResponse.redirect_to_paypal) {
|
66 |
-
|
67 |
actionDelay = typeof apiResponse.redirect_to_paypal.delay_redirect != 'undefined' ? apiResponse.redirect_to_paypal.delay_redirect : actionDelay;
|
68 |
-
|
69 |
window.setTimeout(function () {
|
70 |
-
|
71 |
wpcf7_redirect.handle_redirect_action(apiResponse.redirect_to_paypal);
|
72 |
-
|
73 |
}, actionDelay);
|
74 |
-
|
75 |
}
|
76 |
|
77 |
//catch redirect action
|
78 |
-
|
79 |
if (typeof apiResponse.redirect != 'undefined' && apiResponse.redirect) {
|
80 |
-
|
81 |
actionDelay = typeof apiResponse.redirect.delay_redirect != 'undefined' ? apiResponse.redirect.delay_redirect : actionDelay;
|
82 |
-
|
83 |
window.setTimeout(function () {
|
84 |
-
|
85 |
wpcf7_redirect.handle_redirect_action(apiResponse.redirect);
|
86 |
-
|
87 |
}, actionDelay);
|
88 |
-
|
89 |
}
|
90 |
-
|
91 |
}
|
92 |
-
|
93 |
}, false);
|
94 |
|
95 |
document.addEventListener('wpcf7invalid', function (event) {
|
@@ -99,21 +66,13 @@ var wpcf7_redirect;
|
|
99 |
$(document.body).trigger('wpcf7r-invalid', [event]);
|
100 |
|
101 |
if (typeof event.detail.apiResponse != 'undefined' && event.detail.apiResponse) {
|
102 |
-
|
103 |
response = event.detail.apiResponse;
|
104 |
-
|
105 |
if (response.invalidFields) {
|
106 |
-
|
107 |
//support for multistep by ninja
|
108 |
-
|
109 |
wpcf7_redirect.ninja_multistep_mov_to_invalid_tab(event, response);
|
110 |
-
|
111 |
}
|
112 |
-
|
113 |
}
|
114 |
-
|
115 |
});
|
116 |
-
|
117 |
};
|
118 |
|
119 |
this.handle_popups = function (popups) {
|
@@ -125,15 +84,11 @@ var wpcf7_redirect;
|
|
125 |
var $new_elem = $(popup['popup-template']);
|
126 |
|
127 |
$(document.body).append($new_elem);
|
128 |
-
|
129 |
$(document.body).addClass(popup['template-name']);
|
130 |
|
131 |
window.setTimeout(function () {
|
132 |
-
|
133 |
$(document.body).addClass('modal-popup-open');
|
134 |
-
|
135 |
$new_elem.addClass('is-open');
|
136 |
-
|
137 |
}, 1000);
|
138 |
|
139 |
$new_elem.find('.close-button').on('click', function () {
|
@@ -143,17 +98,12 @@ var wpcf7_redirect;
|
|
143 |
$(document.body).removeClass('modal-popup-open');
|
144 |
|
145 |
window.setTimeout(function () {
|
146 |
-
|
147 |
$('.wpcf7r-modal').remove();
|
148 |
-
|
149 |
$(document.body).trigger('wpcf7r-popup-removed', [$new_elem]);
|
150 |
-
|
151 |
}, 4000);
|
152 |
-
|
153 |
});
|
154 |
|
155 |
$(document.body).trigger('wpcf7r-popup-appended', [$new_elem]);
|
156 |
-
|
157 |
});
|
158 |
|
159 |
}
|
@@ -161,47 +111,29 @@ var wpcf7_redirect;
|
|
161 |
this.handle_api_action = function (send_to_api_result, request) {
|
162 |
|
163 |
$.each(send_to_api_result, function (k, v) {
|
164 |
-
|
165 |
if (!v.result_javascript) {
|
166 |
-
|
167 |
return;
|
168 |
-
|
169 |
}
|
170 |
-
|
171 |
response = typeof v.api_response != 'undefined' ? v.api_response : '';
|
172 |
-
|
173 |
request = typeof v.request != 'undefined' ? v.request : '';
|
174 |
-
|
175 |
eval(v.result_javascript);
|
176 |
-
|
177 |
});
|
178 |
-
|
179 |
};
|
180 |
|
181 |
this.ninja_multistep_mov_to_invalid_tab = function (event, response) {
|
182 |
|
183 |
if ($('.fieldset-cf7mls-wrapper').length) {
|
184 |
-
|
185 |
var form = $(event.target);
|
186 |
-
|
187 |
var first_invalid_field = response.invalidFields[0];
|
188 |
-
|
189 |
var parent_step = $(first_invalid_field.into).parents('fieldset');
|
190 |
|
191 |
form.find('.fieldset-cf7mls').removeClass('cf7mls_current_fs');
|
192 |
-
|
193 |
parent_step.addClass('cf7mls_current_fs').removeClass('cf7mls_back_fs');
|
194 |
-
|
195 |
if (form.find('.cf7mls_progress_bar').length) {
|
196 |
-
|
197 |
form.find('.cf7mls_progress_bar li').eq(form.find("fieldset.fieldset-cf7mls").index(previous_fs)).addClass("current");
|
198 |
-
|
199 |
form.find('.cf7mls_progress_bar li').eq(form.find("fieldset.fieldset-cf7mls").index(current_fs)).removeClass("active current");
|
200 |
-
|
201 |
}
|
202 |
-
|
203 |
}
|
204 |
-
|
205 |
}
|
206 |
|
207 |
this.handle_redirect_action = function (redirect) {
|
@@ -209,37 +141,25 @@ var wpcf7_redirect;
|
|
209 |
$(document.body).trigger('wpcf7r-handle_redirect_action', [redirect]);
|
210 |
|
211 |
$.each(redirect, function (k, v) {
|
212 |
-
|
213 |
var delay = typeof v.delay != 'undefined' && v.delay ? v.delay : '';
|
214 |
|
215 |
delay = delay * 1000;
|
216 |
|
217 |
window.setTimeout(function (v) {
|
218 |
-
|
219 |
var redirect_url = typeof v.redirect_url != 'undefined' && v.redirect_url ? v.redirect_url : '';
|
220 |
-
|
221 |
var type = typeof v.type != 'undefined' && v.type ? v.type : '';
|
222 |
|
223 |
if (typeof v.form != 'undefined' && v.form) {
|
224 |
-
|
225 |
$('body').append(v.form);
|
226 |
-
|
227 |
$('#cf7r-result-form').submit();
|
228 |
-
|
229 |
} else {
|
230 |
|
231 |
if (redirect_url && type == 'redirect') {
|
232 |
-
|
233 |
window.location = redirect_url;
|
234 |
-
|
235 |
} else if (redirect_url && type == 'new_tab') {
|
236 |
-
|
237 |
window.open(redirect_url);
|
238 |
-
|
239 |
}
|
240 |
-
|
241 |
}
|
242 |
-
|
243 |
}, delay, v);
|
244 |
|
245 |
});
|
@@ -251,9 +171,7 @@ var wpcf7_redirect;
|
|
251 |
$(document.body).trigger('wpcf7r-handle_javascript_action', [scripts]);
|
252 |
|
253 |
$.each(scripts, function (k, script) {
|
254 |
-
|
255 |
eval(script); //not using user input
|
256 |
-
|
257 |
});
|
258 |
|
259 |
};
|
@@ -261,41 +179,25 @@ var wpcf7_redirect;
|
|
261 |
this.htmlspecialchars_decode = function (string) {
|
262 |
|
263 |
var map = {
|
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 |
return string.replace(/\&[\w\d\#]{2,5}\;/g, function (m) { return map[m]; });
|
292 |
-
|
293 |
};
|
294 |
|
295 |
this.init();
|
296 |
-
|
297 |
}
|
298 |
|
299 |
wpcf7_redirect = new Wpcf7_redirect();
|
300 |
-
|
301 |
})(jQuery);
|
3 |
(function ($) {
|
4 |
function Wpcf7_redirect() {
|
5 |
this.init = function () {
|
|
|
6 |
this.wpcf7_redirect_mailsent_handler();
|
|
|
7 |
};
|
8 |
|
9 |
this.wpcf7_redirect_mailsent_handler = function () {
|
15 |
$(document.body).trigger('wpcf7r-mailsent', [event]);
|
16 |
|
17 |
if (typeof event.detail.apiResponse != 'undefined' && event.detail.apiResponse) {
|
|
|
18 |
var apiResponse = event.detail.apiResponse;
|
|
|
19 |
var actionDelay = 0;
|
20 |
|
21 |
//handle api response
|
|
|
22 |
if (typeof apiResponse.api_url_request != 'undefined' && apiResponse.api_url_request) {
|
|
|
23 |
wpcf7_redirect.handle_api_action(apiResponse.api_url_request);
|
|
|
24 |
}
|
25 |
|
26 |
//handle api response
|
|
|
27 |
if (typeof apiResponse.api_json_xml_request != 'undefined' && apiResponse.api_json_xml_request) {
|
|
|
28 |
wpcf7_redirect.handle_api_action(apiResponse.api_json_xml_request);
|
|
|
29 |
}
|
30 |
|
31 |
//handle fire javascript action
|
|
|
32 |
if (typeof apiResponse.FireScript != 'undefined' && apiResponse.FireScript) {
|
|
|
33 |
actionDelay = typeof apiResponse.FireScript.delay_redirect != 'undefined' ? apiResponse.FireScript.delay_redirect : actionDelay;
|
|
|
34 |
window.setTimeout(function () {
|
|
|
35 |
wpcf7_redirect.handle_javascript_action(apiResponse.FireScript);
|
|
|
36 |
}, actionDelay);
|
|
|
37 |
}
|
38 |
|
39 |
//catch and handle popup action
|
|
|
40 |
if (typeof apiResponse.popup != 'undefined' && apiResponse.popup) {
|
|
|
41 |
wpcf7_redirect.handle_popups(apiResponse.popup);
|
|
|
42 |
}
|
43 |
|
44 |
//catch redirect to paypal
|
|
|
45 |
if (typeof apiResponse.redirect_to_paypal != 'undefined' && apiResponse.redirect_to_paypal) {
|
|
|
46 |
actionDelay = typeof apiResponse.redirect_to_paypal.delay_redirect != 'undefined' ? apiResponse.redirect_to_paypal.delay_redirect : actionDelay;
|
|
|
47 |
window.setTimeout(function () {
|
|
|
48 |
wpcf7_redirect.handle_redirect_action(apiResponse.redirect_to_paypal);
|
|
|
49 |
}, actionDelay);
|
|
|
50 |
}
|
51 |
|
52 |
//catch redirect action
|
|
|
53 |
if (typeof apiResponse.redirect != 'undefined' && apiResponse.redirect) {
|
|
|
54 |
actionDelay = typeof apiResponse.redirect.delay_redirect != 'undefined' ? apiResponse.redirect.delay_redirect : actionDelay;
|
|
|
55 |
window.setTimeout(function () {
|
|
|
56 |
wpcf7_redirect.handle_redirect_action(apiResponse.redirect);
|
|
|
57 |
}, actionDelay);
|
|
|
58 |
}
|
|
|
59 |
}
|
|
|
60 |
}, false);
|
61 |
|
62 |
document.addEventListener('wpcf7invalid', function (event) {
|
66 |
$(document.body).trigger('wpcf7r-invalid', [event]);
|
67 |
|
68 |
if (typeof event.detail.apiResponse != 'undefined' && event.detail.apiResponse) {
|
|
|
69 |
response = event.detail.apiResponse;
|
|
|
70 |
if (response.invalidFields) {
|
|
|
71 |
//support for multistep by ninja
|
|
|
72 |
wpcf7_redirect.ninja_multistep_mov_to_invalid_tab(event, response);
|
|
|
73 |
}
|
|
|
74 |
}
|
|
|
75 |
});
|
|
|
76 |
};
|
77 |
|
78 |
this.handle_popups = function (popups) {
|
84 |
var $new_elem = $(popup['popup-template']);
|
85 |
|
86 |
$(document.body).append($new_elem);
|
|
|
87 |
$(document.body).addClass(popup['template-name']);
|
88 |
|
89 |
window.setTimeout(function () {
|
|
|
90 |
$(document.body).addClass('modal-popup-open');
|
|
|
91 |
$new_elem.addClass('is-open');
|
|
|
92 |
}, 1000);
|
93 |
|
94 |
$new_elem.find('.close-button').on('click', function () {
|
98 |
$(document.body).removeClass('modal-popup-open');
|
99 |
|
100 |
window.setTimeout(function () {
|
|
|
101 |
$('.wpcf7r-modal').remove();
|
|
|
102 |
$(document.body).trigger('wpcf7r-popup-removed', [$new_elem]);
|
|
|
103 |
}, 4000);
|
|
|
104 |
});
|
105 |
|
106 |
$(document.body).trigger('wpcf7r-popup-appended', [$new_elem]);
|
|
|
107 |
});
|
108 |
|
109 |
}
|
111 |
this.handle_api_action = function (send_to_api_result, request) {
|
112 |
|
113 |
$.each(send_to_api_result, function (k, v) {
|
|
|
114 |
if (!v.result_javascript) {
|
|
|
115 |
return;
|
|
|
116 |
}
|
|
|
117 |
response = typeof v.api_response != 'undefined' ? v.api_response : '';
|
|
|
118 |
request = typeof v.request != 'undefined' ? v.request : '';
|
|
|
119 |
eval(v.result_javascript);
|
|
|
120 |
});
|
|
|
121 |
};
|
122 |
|
123 |
this.ninja_multistep_mov_to_invalid_tab = function (event, response) {
|
124 |
|
125 |
if ($('.fieldset-cf7mls-wrapper').length) {
|
|
|
126 |
var form = $(event.target);
|
|
|
127 |
var first_invalid_field = response.invalidFields[0];
|
|
|
128 |
var parent_step = $(first_invalid_field.into).parents('fieldset');
|
129 |
|
130 |
form.find('.fieldset-cf7mls').removeClass('cf7mls_current_fs');
|
|
|
131 |
parent_step.addClass('cf7mls_current_fs').removeClass('cf7mls_back_fs');
|
|
|
132 |
if (form.find('.cf7mls_progress_bar').length) {
|
|
|
133 |
form.find('.cf7mls_progress_bar li').eq(form.find("fieldset.fieldset-cf7mls").index(previous_fs)).addClass("current");
|
|
|
134 |
form.find('.cf7mls_progress_bar li').eq(form.find("fieldset.fieldset-cf7mls").index(current_fs)).removeClass("active current");
|
|
|
135 |
}
|
|
|
136 |
}
|
|
|
137 |
}
|
138 |
|
139 |
this.handle_redirect_action = function (redirect) {
|
141 |
$(document.body).trigger('wpcf7r-handle_redirect_action', [redirect]);
|
142 |
|
143 |
$.each(redirect, function (k, v) {
|
|
|
144 |
var delay = typeof v.delay != 'undefined' && v.delay ? v.delay : '';
|
145 |
|
146 |
delay = delay * 1000;
|
147 |
|
148 |
window.setTimeout(function (v) {
|
|
|
149 |
var redirect_url = typeof v.redirect_url != 'undefined' && v.redirect_url ? v.redirect_url : '';
|
|
|
150 |
var type = typeof v.type != 'undefined' && v.type ? v.type : '';
|
151 |
|
152 |
if (typeof v.form != 'undefined' && v.form) {
|
|
|
153 |
$('body').append(v.form);
|
|
|
154 |
$('#cf7r-result-form').submit();
|
|
|
155 |
} else {
|
156 |
|
157 |
if (redirect_url && type == 'redirect') {
|
|
|
158 |
window.location = redirect_url;
|
|
|
159 |
} else if (redirect_url && type == 'new_tab') {
|
|
|
160 |
window.open(redirect_url);
|
|
|
161 |
}
|
|
|
162 |
}
|
|
|
163 |
}, delay, v);
|
164 |
|
165 |
});
|
171 |
$(document.body).trigger('wpcf7r-handle_javascript_action', [scripts]);
|
172 |
|
173 |
$.each(scripts, function (k, script) {
|
|
|
174 |
eval(script); //not using user input
|
|
|
175 |
});
|
176 |
|
177 |
};
|
179 |
this.htmlspecialchars_decode = function (string) {
|
180 |
|
181 |
var map = {
|
|
|
182 |
'&': '&',
|
|
|
183 |
'&': "&",
|
|
|
184 |
'<': '<',
|
|
|
185 |
'>': '>',
|
|
|
186 |
'"': '"',
|
|
|
187 |
''': "'",
|
|
|
188 |
'’': "’",
|
|
|
189 |
'‘': "‘",
|
|
|
190 |
'–': "–",
|
|
|
191 |
'—': "—",
|
|
|
192 |
'…': "…",
|
|
|
193 |
'”': '”'
|
|
|
194 |
};
|
195 |
|
196 |
return string.replace(/\&[\w\d\#]{2,5}\;/g, function (m) { return map[m]; });
|
|
|
197 |
};
|
198 |
|
199 |
this.init();
|
|
|
200 |
}
|
201 |
|
202 |
wpcf7_redirect = new Wpcf7_redirect();
|
|
|
203 |
})(jQuery);
|
classes/actions/class-wpcf7r-action-redirect.php
CHANGED
@@ -112,6 +112,14 @@ class WPCF7R_Action_Redirect extends WPCF7R_Action {
|
|
112 |
'show_selector' => '.field-wrap-http_build_query_selectively_fields,.field-wrap-get_param_shortcode',
|
113 |
'value' => $this->get( 'http_build_query_selectively' ),
|
114 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
array(
|
116 |
'name' => 'http_build_query_selectively_fields',
|
117 |
'type' => 'text',
|
@@ -189,6 +197,8 @@ class WPCF7R_Action_Redirect extends WPCF7R_Action {
|
|
189 |
foreach ( $this->posted_data as $posted_data_key => $posted_data_value ) {
|
190 |
if ( is_array( $posted_data_value ) ) {
|
191 |
$this->posted_data[ $posted_data_key ] = implode( ',', $posted_data_value );
|
|
|
|
|
192 |
}
|
193 |
}
|
194 |
|
112 |
'show_selector' => '.field-wrap-http_build_query_selectively_fields,.field-wrap-get_param_shortcode',
|
113 |
'value' => $this->get( 'http_build_query_selectively' ),
|
114 |
),
|
115 |
+
array(
|
116 |
+
'name' => 'url_encode',
|
117 |
+
'type' => 'checkbox',
|
118 |
+
'label' => __( 'Encode passed query parameters', 'wpcf7-redirect' ),
|
119 |
+
'sub_title' => '',
|
120 |
+
'placeholder' => '',
|
121 |
+
'value' => $this->get( 'url_encode' ),
|
122 |
+
),
|
123 |
array(
|
124 |
'name' => 'http_build_query_selectively_fields',
|
125 |
'type' => 'text',
|
197 |
foreach ( $this->posted_data as $posted_data_key => $posted_data_value ) {
|
198 |
if ( is_array( $posted_data_value ) ) {
|
199 |
$this->posted_data[ $posted_data_key ] = implode( ',', $posted_data_value );
|
200 |
+
} elseif ( $this->get( 'url_encode' ) ) {
|
201 |
+
$this->posted_data[ $posted_data_key ] = rawurlencode( $posted_data_value );
|
202 |
}
|
203 |
}
|
204 |
|
classes/actions/class-wpcf7r-action-save-lead.php
CHANGED
@@ -76,6 +76,51 @@ class WPCF7R_Action_Save_Lead extends WPCF7R_Action {
|
|
76 |
|
77 |
}
|
78 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
/**
|
80 |
* Handle a simple redirect rule
|
81 |
*
|
@@ -84,7 +129,7 @@ class WPCF7R_Action_Save_Lead extends WPCF7R_Action {
|
|
84 |
public function process( $submission ) {
|
85 |
$contact_form = $submission->get_contact_form();
|
86 |
|
87 |
-
//insert the lead to the DB
|
88 |
$files = $submission->uploaded_files();
|
89 |
|
90 |
$submitted_files = array();
|
@@ -106,7 +151,7 @@ class WPCF7R_Action_Save_Lead extends WPCF7R_Action {
|
|
106 |
}
|
107 |
}
|
108 |
|
109 |
-
$lead = WPCF7R_Leads_Manager::insert_lead( $contact_form->id(), $posted_values, $submitted_files
|
110 |
|
111 |
self::set_lead_id( $lead->post_id );
|
112 |
|
76 |
|
77 |
}
|
78 |
|
79 |
+
/**
|
80 |
+
* Connected to manage_columns hooks.
|
81 |
+
*
|
82 |
+
* @param [string] $column - key of the column.
|
83 |
+
* @param [int] $lead_id - the id of the relevant post.
|
84 |
+
* @return void
|
85 |
+
*/
|
86 |
+
public function display_action_column_content( $column, $lead_id ) {
|
87 |
+
switch ( $column ) {
|
88 |
+
case 'form':
|
89 |
+
echo $this->get_cf7_link_html();
|
90 |
+
break;
|
91 |
+
case 'data_preview':
|
92 |
+
echo $this->display_columns_values( $lead_id );
|
93 |
+
break;
|
94 |
+
}
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Display the values that were selected on the action.
|
99 |
+
*
|
100 |
+
* @return void
|
101 |
+
*/
|
102 |
+
private function display_columns_values( $lead_id ) {
|
103 |
+
$mapped_fields = maybe_unserialize( $this->get( 'leads_map' ) );
|
104 |
+
$none_selected = true;
|
105 |
+
if ( $mapped_fields ) {
|
106 |
+
foreach ( $mapped_fields as $field_key => $mapped_field ) {
|
107 |
+
if ( isset( $mapped_field['appear'] ) && $mapped_field['appear'] ) {
|
108 |
+
$label = $mapped_field['tag'] ? $mapped_field['tag'] : $field_key;
|
109 |
+
|
110 |
+
$string = $label . ': ' . get_post_meta( $lead_id, $field_key, true );
|
111 |
+
|
112 |
+
echo sprintf( "<div class='preview-data'>%s</div>", $string );
|
113 |
+
|
114 |
+
$none_selected = false;
|
115 |
+
}
|
116 |
+
}
|
117 |
+
}
|
118 |
+
|
119 |
+
if ( $none_selected ) {
|
120 |
+
echo __( 'No preview defined', 'wpcf7-redirect' );
|
121 |
+
}
|
122 |
+
}
|
123 |
+
|
124 |
/**
|
125 |
* Handle a simple redirect rule
|
126 |
*
|
129 |
public function process( $submission ) {
|
130 |
$contact_form = $submission->get_contact_form();
|
131 |
|
132 |
+
// insert the lead to the DB
|
133 |
$files = $submission->uploaded_files();
|
134 |
|
135 |
$submitted_files = array();
|
151 |
}
|
152 |
}
|
153 |
|
154 |
+
$lead = WPCF7R_Leads_Manager::insert_lead( $contact_form->id(), $posted_values, $submitted_files, 'contact', $this->get_id() );
|
155 |
|
156 |
self::set_lead_id( $lead->post_id );
|
157 |
|
classes/class-wpcf7r-action.php
CHANGED
@@ -1,15 +1,15 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Class WPCF7R_Action - פarent class that handles all redirect actions
|
4 |
*/
|
5 |
|
6 |
defined( 'ABSPATH' ) || exit;
|
7 |
|
8 |
class WPCF7R_Action {
|
9 |
-
//
|
10 |
public static $lead_id;
|
11 |
|
12 |
-
//
|
13 |
public static $data;
|
14 |
|
15 |
/**
|
@@ -22,23 +22,43 @@ class WPCF7R_Action {
|
|
22 |
$this->priority = 2;
|
23 |
|
24 |
if ( $post ) {
|
25 |
-
// save a refference to the action post
|
26 |
$this->action_post = $post;
|
27 |
-
// set the action post ID
|
28 |
$this->action_post_id = $post->ID;
|
29 |
-
// get the custom action fields
|
30 |
$this->fields_values = get_post_custom( $this->action_post_id );
|
31 |
-
// get
|
32 |
$this->wpcf7_id = $this->get_action_wpcf7_id( $this->action_post_id );
|
33 |
-
// get the type of action
|
34 |
$this->action = self::get_action_type( $this->action_post_id );
|
35 |
-
// get tje status of the action (is it active or not)
|
36 |
$this->action_status = $this->get_action_status( $this->action_post_id );
|
37 |
-
// get conditional logic blocks
|
38 |
$this->logic_blocks = $this->get( 'blocks' );
|
39 |
}
|
40 |
}
|
41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
/**
|
43 |
* Process validation action
|
44 |
* This function will be called on validation hook
|
@@ -196,6 +216,10 @@ class WPCF7R_Action {
|
|
196 |
public function get_formatted_mail_tags( $clean = false ) {
|
197 |
$formatted_tags = array();
|
198 |
|
|
|
|
|
|
|
|
|
199 |
foreach ( WPCF7R_Form::get_mail_tags() as $mail_tag ) {
|
200 |
$formatted_tags[] = "<span class='mailtag code'>[{$mail_tag->name}]</span>";
|
201 |
}
|
@@ -514,9 +538,12 @@ class WPCF7R_Action {
|
|
514 |
<span class="trash">
|
515 |
<a href="#" class="submitdelete" data-id="<?php echo $this->get_id(); ?>" aria-label="<?php _e( 'Move to trash', 'wpcf7-redirect' ); ?>"><?php _e( 'Move to trash', 'wpcf7-redirect' ); ?></a> |
|
516 |
</span>
|
|
|
|
|
|
|
517 |
<?php if ( $this->get_type() === 'save_lead' ) : ?>
|
518 |
<span class="view-leads">
|
519 |
-
|
520 |
</span>
|
521 |
<?php endif; ?>
|
522 |
|
1 |
<?php
|
2 |
/**
|
3 |
+
* Class WPCF7R_Action - פarent class that handles all redirect actions.
|
4 |
*/
|
5 |
|
6 |
defined( 'ABSPATH' ) || exit;
|
7 |
|
8 |
class WPCF7R_Action {
|
9 |
+
// Save a reference to the lead id in case the save lead action is on.
|
10 |
public static $lead_id;
|
11 |
|
12 |
+
// Saved data from validation action to submission action.
|
13 |
public static $data;
|
14 |
|
15 |
/**
|
22 |
$this->priority = 2;
|
23 |
|
24 |
if ( $post ) {
|
25 |
+
// save a refference to the action post.
|
26 |
$this->action_post = $post;
|
27 |
+
// set the action post ID.
|
28 |
$this->action_post_id = $post->ID;
|
29 |
+
// get the custom action fields.
|
30 |
$this->fields_values = get_post_custom( $this->action_post_id );
|
31 |
+
// get the contact form 7 post id.
|
32 |
$this->wpcf7_id = $this->get_action_wpcf7_id( $this->action_post_id );
|
33 |
+
// get the type of action.
|
34 |
$this->action = self::get_action_type( $this->action_post_id );
|
35 |
+
// get tje status of the action (is it active or not).
|
36 |
$this->action_status = $this->get_action_status( $this->action_post_id );
|
37 |
+
// get conditional logic blocks.
|
38 |
$this->logic_blocks = $this->get( 'blocks' );
|
39 |
}
|
40 |
}
|
41 |
|
42 |
+
/**
|
43 |
+
* Returns an html for displaying a link to the form.
|
44 |
+
*
|
45 |
+
* @return [string] - a link to the form edit screen.
|
46 |
+
*/
|
47 |
+
public function get_cf7_link_html() {
|
48 |
+
return WPCF7r_Form_Helper::get_cf7_link_html( $this->wpcf7_id );
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Connected to manage_columns hooks.
|
53 |
+
*
|
54 |
+
* @param [string] $column - key of the column.
|
55 |
+
* @param [int] $post_id - the id of the relevant post.
|
56 |
+
* @return void
|
57 |
+
*/
|
58 |
+
public function display_action_column_content( $column, $post_id ) {
|
59 |
+
|
60 |
+
}
|
61 |
+
|
62 |
/**
|
63 |
* Process validation action
|
64 |
* This function will be called on validation hook
|
216 |
public function get_formatted_mail_tags( $clean = false ) {
|
217 |
$formatted_tags = array();
|
218 |
|
219 |
+
if ( ! is_array( WPCF7R_Form::get_mail_tags() ) ) {
|
220 |
+
return;
|
221 |
+
}
|
222 |
+
|
223 |
foreach ( WPCF7R_Form::get_mail_tags() as $mail_tag ) {
|
224 |
$formatted_tags[] = "<span class='mailtag code'>[{$mail_tag->name}]</span>";
|
225 |
}
|
538 |
<span class="trash">
|
539 |
<a href="#" class="submitdelete" data-id="<?php echo $this->get_id(); ?>" aria-label="<?php _e( 'Move to trash', 'wpcf7-redirect' ); ?>"><?php _e( 'Move to trash', 'wpcf7-redirect' ); ?></a> |
|
540 |
</span>
|
541 |
+
<span class="duplicate">
|
542 |
+
<a href="#" class="submitduplicate" data-ruleid="default" data-id="<?php echo $this->get_id(); ?>" aria-label="<?php _e( 'Duplicate', 'wpcf7-redirect' ); ?>"><?php _e( 'Duplicate', 'wpcf7-redirect' ); ?></a>
|
543 |
+
</span>
|
544 |
<?php if ( $this->get_type() === 'save_lead' ) : ?>
|
545 |
<span class="view-leads">
|
546 |
+
| <a href="<?php echo WPCF7R_Leads_Manager::get_admin_url( $this->wpcf7_id ); ?>" class="show-leads" data-id="<?php echo $this->get_id(); ?>" aria-label="<?php _e( 'View Leads', 'wpcf7-redirect' ); ?>" target="_blank"><?php _e( 'View Leads', 'wpcf7-redirect' ); ?></a> |
|
547 |
</span>
|
548 |
<?php endif; ?>
|
549 |
|
classes/class-wpcf7r-actions.php
CHANGED
@@ -19,7 +19,7 @@ class WPCF7R_Actions {
|
|
19 |
* @param $rule_id
|
20 |
* @param integer $count
|
21 |
* @param boolean $active
|
22 |
-
* @param array
|
23 |
*/
|
24 |
public function get_actions( $rule_id, $count = -1, $active = false, $args = array() ) {
|
25 |
$this->actions = array();
|
@@ -51,7 +51,7 @@ class WPCF7R_Actions {
|
|
51 |
* @param $rule_id
|
52 |
* @param integer $count
|
53 |
* @param boolean $active
|
54 |
-
* @param array
|
55 |
*/
|
56 |
public function get_action_posts( $rule_id, $count = -1, $active = false, $extra_args = array() ) {
|
57 |
|
@@ -70,7 +70,9 @@ class WPCF7R_Actions {
|
|
70 |
if ( ! isset( $this->wpcf7_post_id ) ) {
|
71 |
return;
|
72 |
}
|
73 |
-
|
|
|
|
|
74 |
$new_block = array(
|
75 |
'block_title' => __( 'New Block', 'wpcf7-redirect' ),
|
76 |
'groups' => $action->get_groups(),
|
19 |
* @param $rule_id
|
20 |
* @param integer $count
|
21 |
* @param boolean $active
|
22 |
+
* @param array $args
|
23 |
*/
|
24 |
public function get_actions( $rule_id, $count = -1, $active = false, $args = array() ) {
|
25 |
$this->actions = array();
|
51 |
* @param $rule_id
|
52 |
* @param integer $count
|
53 |
* @param boolean $active
|
54 |
+
* @param array $extra_args
|
55 |
*/
|
56 |
public function get_action_posts( $rule_id, $count = -1, $active = false, $extra_args = array() ) {
|
57 |
|
70 |
if ( ! isset( $this->wpcf7_post_id ) ) {
|
71 |
return;
|
72 |
}
|
73 |
+
|
74 |
+
$action = new WPCF7R_Action();
|
75 |
+
|
76 |
$new_block = array(
|
77 |
'block_title' => __( 'New Block', 'wpcf7-redirect' ),
|
78 |
'groups' => $action->get_groups(),
|
classes/class-wpcf7r-base.php
CHANGED
@@ -114,6 +114,8 @@ class WPCF7R_Base {
|
|
114 |
if ( class_exists( 'WPCF7R_Leads_Manager' ) && class_exists( 'WPCF7R_Action_Save_Lead' ) ) {
|
115 |
add_action( 'restrict_manage_posts', array( 'WPCF7R_Leads_Manager', 'add_form_filter' ) );
|
116 |
add_filter( 'parse_query', array( 'WPCF7R_Leads_Manager', 'filter_request_query' ), 10 );
|
|
|
|
|
117 |
}
|
118 |
}
|
119 |
|
@@ -227,6 +229,8 @@ class WPCF7R_Base {
|
|
227 |
|
228 |
add_action( 'wp_ajax_wpcf7r_delete_action', array( $this->wpcf7_utils, 'delete_action_post' ) );
|
229 |
|
|
|
|
|
230 |
add_action( 'wp_ajax_wpcf7r_add_action', array( $this->wpcf7_utils, 'add_action_post' ) );
|
231 |
// save actions order.
|
232 |
add_action( 'wp_ajax_wpcf7r_set_action_menu_order', array( $this->wpcf7_utils, 'set_action_menu_order' ) );
|
114 |
if ( class_exists( 'WPCF7R_Leads_Manager' ) && class_exists( 'WPCF7R_Action_Save_Lead' ) ) {
|
115 |
add_action( 'restrict_manage_posts', array( 'WPCF7R_Leads_Manager', 'add_form_filter' ) );
|
116 |
add_filter( 'parse_query', array( 'WPCF7R_Leads_Manager', 'filter_request_query' ), 10 );
|
117 |
+
add_action( 'admin_init', array( 'WPCF7R_Leads_Manager', 'admin_init_scripts' ) );
|
118 |
+
add_action( 'admin_init', array( 'WPCF7R_Leads_Manager', 'export_current_filtered_view' ), 10, 2 );
|
119 |
}
|
120 |
}
|
121 |
|
229 |
|
230 |
add_action( 'wp_ajax_wpcf7r_delete_action', array( $this->wpcf7_utils, 'delete_action_post' ) );
|
231 |
|
232 |
+
add_action( 'wp_ajax_wpcf7r_duplicate_action', array( $this->wpcf7_utils, 'duplicate_action' ) );
|
233 |
+
|
234 |
add_action( 'wp_ajax_wpcf7r_add_action', array( $this->wpcf7_utils, 'add_action_post' ) );
|
235 |
// save actions order.
|
236 |
add_action( 'wp_ajax_wpcf7r_set_action_menu_order', array( $this->wpcf7_utils, 'set_action_menu_order' ) );
|
classes/class-wpcf7r-extensions.php
CHANGED
@@ -37,6 +37,6 @@ class WPCF7R_Extensions {
|
|
37 |
* @return void
|
38 |
*/
|
39 |
public function display() {
|
40 |
-
include
|
41 |
}
|
42 |
}
|
37 |
* @return void
|
38 |
*/
|
39 |
public function display() {
|
40 |
+
include WPCF7_PRO_REDIRECT_TEMPLATE_PATH . 'extensions.php' ;
|
41 |
}
|
42 |
}
|
classes/class-wpcf7r-form-helper.php
CHANGED
@@ -264,13 +264,7 @@ class WPCF7r_Form_Helper {
|
|
264 |
* Check if the current page is the contact form edit screen
|
265 |
*/
|
266 |
public function is_wpcf7_edit() {
|
267 |
-
|
268 |
-
|
269 |
-
$wpcf7_page = isset( $_GET['page'] ) && 'wpcf7' === $_GET['page'] && isset( $_GET['post'] ) && $_GET['post'];
|
270 |
-
$wpcf7_page_new_page = isset( $_GET['page'] ) && 'wpcf7-new' === $_GET['page'];
|
271 |
-
$wpcf7_post = isset( $post->post_type ) && 'wpcf7_contact_form' === $post->post_type ? true : false;
|
272 |
-
|
273 |
-
return $wpcf7_page_new_page || $wpcf7_page || $wpcf7_post;
|
274 |
}
|
275 |
|
276 |
/**
|
@@ -481,14 +475,32 @@ class WPCF7r_Form_Helper {
|
|
481 |
|
482 |
if ( $banner ) {
|
483 |
update_option( 'wpcf7r_banner_version', $banner->version );
|
484 |
-
}
|
485 |
|
486 |
-
|
487 |
-
|
|
|
488 |
}
|
489 |
}
|
490 |
}
|
491 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
492 |
/**
|
493 |
* Get coupon ajax function
|
494 |
*/
|
264 |
* Check if the current page is the contact form edit screen
|
265 |
*/
|
266 |
public function is_wpcf7_edit() {
|
267 |
+
return wpcf7r_is_wpcf7_edit();
|
|
|
|
|
|
|
|
|
|
|
|
|
268 |
}
|
269 |
|
270 |
/**
|
475 |
|
476 |
if ( $banner ) {
|
477 |
update_option( 'wpcf7r_banner_version', $banner->version );
|
|
|
478 |
|
479 |
+
if ( ! $banner_version_dismissed && wpcf7r_get_banner_version() !== $banner_version_dismissed ) {
|
480 |
+
echo $banner->banner;
|
481 |
+
}
|
482 |
}
|
483 |
}
|
484 |
}
|
485 |
|
486 |
+
/**
|
487 |
+
* Returns an html for displaying a link to the form.
|
488 |
+
*
|
489 |
+
* @param [int] $form_id - the if of the contact form 7 post.
|
490 |
+
* @return [string] - a link to the form edit screen.
|
491 |
+
*/
|
492 |
+
public static function get_cf7_link_html( $form_id ) {
|
493 |
+
$form_post = get_post( $form_id );
|
494 |
+
$form_title = get_the_title( $form_id );
|
495 |
+
$link = get_edit_post_link( $form_id );
|
496 |
+
|
497 |
+
if ( $form_post ) {
|
498 |
+
return sprintf( "<a href='%s' target='_blank'>%s</a>", $link, $form_title );
|
499 |
+
}
|
500 |
+
|
501 |
+
return __( 'This form no longer exists', 'wpcf7-redirect' );
|
502 |
+
}
|
503 |
+
|
504 |
/**
|
505 |
* Get coupon ajax function
|
506 |
*/
|
classes/class-wpcf7r-form.php
CHANGED
@@ -45,7 +45,7 @@ class WPCF7R_Form {
|
|
45 |
return;
|
46 |
}
|
47 |
|
48 |
-
//
|
49 |
if ( $cf7 ) {
|
50 |
self::$cf7_form = $cf7;
|
51 |
}
|
@@ -59,7 +59,7 @@ class WPCF7R_Form {
|
|
59 |
$this->redirect_actions = new WPCF7R_Actions( $this->post_id, $this );
|
60 |
$this->cf7_post = $cf7;
|
61 |
|
62 |
-
//
|
63 |
if ( self::$instance && self::$instance->post_id === $this->post_id ) {
|
64 |
return self::$instance;
|
65 |
}
|
@@ -173,13 +173,14 @@ class WPCF7R_Form {
|
|
173 |
* @return boolean
|
174 |
*/
|
175 |
public function has_action( $type ) {
|
176 |
-
$args
|
177 |
-
$meta_query
|
178 |
array(
|
179 |
'key' => 'action_type',
|
180 |
'value' => $type,
|
181 |
),
|
182 |
);
|
|
|
183 |
$args['meta_query'] = $meta_query;
|
184 |
$actions = $this->get_actions( 'default', 1, true, $args );
|
185 |
|
@@ -515,7 +516,9 @@ class WPCF7R_Form {
|
|
515 |
if ( ! isset( self::$cf7_form ) || ! self::$cf7_form ) {
|
516 |
return;
|
517 |
}
|
|
|
518 |
$tags = apply_filters( 'wpcf7r_collect_mail_tags', self::$cf7_form->scan_form_tags() );
|
|
|
519 |
foreach ( (array) $tags as $tag ) {
|
520 |
$type = trim( $tag['type'], ' *' );
|
521 |
if ( empty( $type ) || empty( $tag['name'] ) ) {
|
@@ -558,7 +561,7 @@ class WPCF7R_Form {
|
|
558 |
}
|
559 |
|
560 |
/**
|
561 |
-
* Process actions that are relevant for validation process
|
562 |
*/
|
563 |
public function process_validation_actions() {
|
564 |
$actions = $this->get_active_actions();
|
45 |
return;
|
46 |
}
|
47 |
|
48 |
+
// Keep refrences.
|
49 |
if ( $cf7 ) {
|
50 |
self::$cf7_form = $cf7;
|
51 |
}
|
59 |
$this->redirect_actions = new WPCF7R_Actions( $this->post_id, $this );
|
60 |
$this->cf7_post = $cf7;
|
61 |
|
62 |
+
// Avoid creating 2 instances of the same form.
|
63 |
if ( self::$instance && self::$instance->post_id === $this->post_id ) {
|
64 |
return self::$instance;
|
65 |
}
|
173 |
* @return boolean
|
174 |
*/
|
175 |
public function has_action( $type ) {
|
176 |
+
$args = array();
|
177 |
+
$meta_query = array(
|
178 |
array(
|
179 |
'key' => 'action_type',
|
180 |
'value' => $type,
|
181 |
),
|
182 |
);
|
183 |
+
|
184 |
$args['meta_query'] = $meta_query;
|
185 |
$actions = $this->get_actions( 'default', 1, true, $args );
|
186 |
|
516 |
if ( ! isset( self::$cf7_form ) || ! self::$cf7_form ) {
|
517 |
return;
|
518 |
}
|
519 |
+
|
520 |
$tags = apply_filters( 'wpcf7r_collect_mail_tags', self::$cf7_form->scan_form_tags() );
|
521 |
+
|
522 |
foreach ( (array) $tags as $tag ) {
|
523 |
$type = trim( $tag['type'], ' *' );
|
524 |
if ( empty( $type ) || empty( $tag['name'] ) ) {
|
561 |
}
|
562 |
|
563 |
/**
|
564 |
+
* Process actions that are relevant for validation process
|
565 |
*/
|
566 |
public function process_validation_actions() {
|
567 |
$actions = $this->get_active_actions();
|
classes/class-wpcf7r-html.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Class WPCF7R_Html - Mainly static functions class to create html fregments
|
4 |
-
*/
|
5 |
|
6 |
defined( 'ABSPATH' ) || exit;
|
7 |
|
@@ -82,15 +82,16 @@ class WPCF7R_Html {
|
|
82 |
|
83 |
/**
|
84 |
* Get the title html block
|
|
|
85 |
* @param $group_block_key
|
86 |
* @param $group_block
|
87 |
* @param $active_tab_title
|
88 |
-
* @param boolean
|
89 |
* @param $prefix
|
90 |
*/
|
91 |
public static function get_block_title( $group_block_key, $group_block, $active_tab_title, $echo = true, $prefix ) {
|
92 |
ob_start();
|
93 |
-
include
|
94 |
if ( $echo ) {
|
95 |
echo ob_get_clean();
|
96 |
} else {
|
@@ -104,19 +105,26 @@ class WPCF7R_Html {
|
|
104 |
public static function get_conditional_row_template( $block_key = '', $group_key = '', $group_row = '', $row_fields = array(), $prefix ) {
|
105 |
ob_start();
|
106 |
$condition = $row_fields['condition'];
|
|
|
107 |
?>
|
108 |
<tr class="row-template">
|
109 |
<td>
|
110 |
<select class="wpcf7r-fields" name="wpcf7-redirect<?php echo $prefix; ?>[blocks][<?php echo $block_key; ?>][groups][<?php echo $group_key; ?>][<?php echo $group_row; ?>][if]" required>
|
111 |
<option value="" <?php selected( $row_fields['if'], '' ); ?>><?php _e( 'Select' ); ?></option>
|
112 |
-
<?php
|
|
|
|
|
|
|
113 |
<option value="<?php echo $mail_tag['name']; ?>" <?php selected( $mail_tag['name'], $row_fields['if'] ); ?>><?php echo $mail_tag['name']; ?></option>
|
114 |
-
|
|
|
|
|
|
|
115 |
</select>
|
116 |
</td>
|
117 |
<td>
|
118 |
<select class="compare-options" name="wpcf7-redirect<?php echo $prefix; ?>[blocks][<?php echo $block_key; ?>][groups][<?php echo $group_key; ?>][<?php echo $group_row; ?>][condition]" required>
|
119 |
-
<option value="" <?php selected( $condition
|
120 |
<option value="equal" <?php selected( $condition, 'equal' ); ?> data-comparetype="select"><?php _e( 'Equal', 'wpcf7-redirect' ); ?></option>
|
121 |
<option value="not-equal" <?php selected( $condition, 'not-equal' ); ?> data-comparetype="select"><?php _e( 'Non Equal', 'wpcf7-redirect' ); ?></option>
|
122 |
<option value="contain" <?php selected( $condition, 'contain' ); ?> data-comparetype=""><?php _e( 'Contains', 'wpcf7-redirect' ); ?></option>
|
@@ -135,31 +143,34 @@ class WPCF7R_Html {
|
|
135 |
'radio',
|
136 |
'checkbox',
|
137 |
);
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
<?php
|
142 |
-
|
143 |
-
<
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
<option value="<?php echo $value; ?>"
|
151 |
-
<?php
|
152 |
-
if ( isset( $row_fields['value'] ) ) :
|
153 |
-
selected( $row_fields['value'], $value );
|
154 |
-
endif;
|
155 |
?>
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
163 |
<input type="text" class="group_row_value wpcf7-redirect-value" name="wpcf7-redirect<?php echo $prefix; ?>[blocks][<?php echo $block_key; ?>][groups][<?php echo $group_key; ?>][<?php echo $group_row; ?>][value]" value="<?php echo isset( $row_fields['value'] ) ? esc_html( $row_fields['value'] ) : ''; ?>" placeholder="<?php _e( 'Your value here' ); ?>" style="<?php echo $select_visible ? 'display:none;' : ''; ?>">
|
164 |
</td>
|
165 |
<td>
|
@@ -177,15 +188,16 @@ class WPCF7R_Html {
|
|
177 |
|
178 |
/**
|
179 |
* Get the html of the rule block
|
|
|
180 |
* @param $group_block_key
|
181 |
* @param $group_block
|
182 |
* @param $active_tab
|
183 |
-
* @param boolean
|
184 |
* @param $prefix
|
185 |
*/
|
186 |
public static function get_block_html( $group_block_key, $group_block, $active_tab, $echo = true, $prefix ) {
|
187 |
ob_start();
|
188 |
-
include
|
189 |
if ( $echo ) {
|
190 |
echo ob_get_clean();
|
191 |
} else {
|
@@ -195,6 +207,7 @@ class WPCF7R_Html {
|
|
195 |
|
196 |
/**
|
197 |
* A function that returns the relevant field HTML
|
|
|
198 |
* @param $field
|
199 |
* @param $prefix
|
200 |
*/
|
1 |
<?php
|
2 |
/**
|
3 |
* Class WPCF7R_Html - Mainly static functions class to create html fregments
|
4 |
+
*/
|
5 |
|
6 |
defined( 'ABSPATH' ) || exit;
|
7 |
|
82 |
|
83 |
/**
|
84 |
* Get the title html block
|
85 |
+
*
|
86 |
* @param $group_block_key
|
87 |
* @param $group_block
|
88 |
* @param $active_tab_title
|
89 |
+
* @param boolean $echo
|
90 |
* @param $prefix
|
91 |
*/
|
92 |
public static function get_block_title( $group_block_key, $group_block, $active_tab_title, $echo = true, $prefix ) {
|
93 |
ob_start();
|
94 |
+
include WPCF7_PRO_REDIRECT_TEMPLATE_PATH . 'block-title.php';
|
95 |
if ( $echo ) {
|
96 |
echo ob_get_clean();
|
97 |
} else {
|
105 |
public static function get_conditional_row_template( $block_key = '', $group_key = '', $group_row = '', $row_fields = array(), $prefix ) {
|
106 |
ob_start();
|
107 |
$condition = $row_fields['condition'];
|
108 |
+
$tags = WPCF7R_Form::get_mail_tags();
|
109 |
?>
|
110 |
<tr class="row-template">
|
111 |
<td>
|
112 |
<select class="wpcf7r-fields" name="wpcf7-redirect<?php echo $prefix; ?>[blocks][<?php echo $block_key; ?>][groups][<?php echo $group_key; ?>][<?php echo $group_row; ?>][if]" required>
|
113 |
<option value="" <?php selected( $row_fields['if'], '' ); ?>><?php _e( 'Select' ); ?></option>
|
114 |
+
<?php
|
115 |
+
if ( $tags ) :
|
116 |
+
foreach ( $tags as $mail_tag ) :
|
117 |
+
?>
|
118 |
<option value="<?php echo $mail_tag['name']; ?>" <?php selected( $mail_tag['name'], $row_fields['if'] ); ?>><?php echo $mail_tag['name']; ?></option>
|
119 |
+
<?php
|
120 |
+
endforeach;
|
121 |
+
endif;
|
122 |
+
?>
|
123 |
</select>
|
124 |
</td>
|
125 |
<td>
|
126 |
<select class="compare-options" name="wpcf7-redirect<?php echo $prefix; ?>[blocks][<?php echo $block_key; ?>][groups][<?php echo $group_key; ?>][<?php echo $group_row; ?>][condition]" required>
|
127 |
+
<option value="" <?php selected( $condition, '' ); ?>><?php _e( 'Select', 'wpcf7-redirect' ); ?></option>
|
128 |
<option value="equal" <?php selected( $condition, 'equal' ); ?> data-comparetype="select"><?php _e( 'Equal', 'wpcf7-redirect' ); ?></option>
|
129 |
<option value="not-equal" <?php selected( $condition, 'not-equal' ); ?> data-comparetype="select"><?php _e( 'Non Equal', 'wpcf7-redirect' ); ?></option>
|
130 |
<option value="contain" <?php selected( $condition, 'contain' ); ?> data-comparetype=""><?php _e( 'Contains', 'wpcf7-redirect' ); ?></option>
|
143 |
'radio',
|
144 |
'checkbox',
|
145 |
);
|
146 |
+
if( $tags ) :
|
147 |
+
foreach ( $tags as $mail_tag ) :
|
148 |
+
?>
|
149 |
+
<?php if ( in_array( $mail_tag->type, $select_fields, true ) ) : ?>
|
150 |
+
<?php $select_visible = $row_fields['if'] === $mail_tag['name'] ? true : $select_visible; ?>
|
151 |
+
<select class="group_row_value group_row_value_select" style="<?php echo $row_fields['if'] !== $mail_tag['name'] ? 'display:none;' : ''; ?>" data-rel="<?php echo $mail_tag['name']; ?>">
|
152 |
+
<option value="" <?php selected( $row_fields['value'], '' ); ?>><?php _e( 'Select', 'wpcf7-redirect' ); ?></option>
|
153 |
+
<?php
|
154 |
+
foreach ( $mail_tag->raw_values as $orig_value ) :
|
155 |
+
$orig_value = explode( '|', $orig_value );
|
156 |
+
$label = $orig_value[0];
|
157 |
+
$value = isset( $orig_value[1] ) && $orig_value[1] ? $orig_value[1] : $orig_value[0];
|
|
|
|
|
|
|
|
|
|
|
158 |
?>
|
159 |
+
<option value="<?php echo $value; ?>"
|
160 |
+
<?php
|
161 |
+
if ( isset( $row_fields['value'] ) ) :
|
162 |
+
selected( $row_fields['value'], $value );
|
163 |
+
endif;
|
164 |
+
?>
|
165 |
+
>
|
166 |
+
<?php echo $label; ?>
|
167 |
+
</option>
|
168 |
+
<?php endforeach; ?>
|
169 |
+
</select>
|
170 |
+
<?php endif; ?>
|
171 |
+
<?php endforeach;
|
172 |
+
endif;
|
173 |
+
?>
|
174 |
<input type="text" class="group_row_value wpcf7-redirect-value" name="wpcf7-redirect<?php echo $prefix; ?>[blocks][<?php echo $block_key; ?>][groups][<?php echo $group_key; ?>][<?php echo $group_row; ?>][value]" value="<?php echo isset( $row_fields['value'] ) ? esc_html( $row_fields['value'] ) : ''; ?>" placeholder="<?php _e( 'Your value here' ); ?>" style="<?php echo $select_visible ? 'display:none;' : ''; ?>">
|
175 |
</td>
|
176 |
<td>
|
188 |
|
189 |
/**
|
190 |
* Get the html of the rule block
|
191 |
+
*
|
192 |
* @param $group_block_key
|
193 |
* @param $group_block
|
194 |
* @param $active_tab
|
195 |
+
* @param boolean $echo
|
196 |
* @param $prefix
|
197 |
*/
|
198 |
public static function get_block_html( $group_block_key, $group_block, $active_tab, $echo = true, $prefix ) {
|
199 |
ob_start();
|
200 |
+
include WPCF7_PRO_REDIRECT_TEMPLATE_PATH . 'block-html.php';
|
201 |
if ( $echo ) {
|
202 |
echo ob_get_clean();
|
203 |
} else {
|
207 |
|
208 |
/**
|
209 |
* A function that returns the relevant field HTML
|
210 |
+
*
|
211 |
* @param $field
|
212 |
* @param $prefix
|
213 |
*/
|
classes/class-wpcf7r-leads-manager.php
CHANGED
@@ -2,7 +2,6 @@
|
|
2 |
/**
|
3 |
* Class WPCF7R_Leads_Manager - Container class that handles leads management
|
4 |
*/
|
5 |
-
|
6 |
defined( 'ABSPATH' ) || exit;
|
7 |
|
8 |
class WPCF7R_Leads_Manager {
|
@@ -13,9 +12,16 @@ class WPCF7R_Leads_Manager {
|
|
13 |
|
14 |
/**
|
15 |
* Define the leads post type
|
|
|
|
|
16 |
*/
|
17 |
public static $post_type = 'wpcf7r_leads';
|
18 |
|
|
|
|
|
|
|
|
|
|
|
19 |
public function __construct( $cf7_id ) {
|
20 |
$this->cf7_id = $cf7_id;
|
21 |
|
@@ -23,6 +29,180 @@ class WPCF7R_Leads_Manager {
|
|
23 |
|
24 |
}
|
25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
/**
|
27 |
* Get the leads post type
|
28 |
*/
|
@@ -34,7 +214,10 @@ class WPCF7R_Leads_Manager {
|
|
34 |
* Add A select filter on edit.php screen to filter records by form
|
35 |
*/
|
36 |
public static function add_form_filter() {
|
37 |
-
|
|
|
|
|
|
|
38 |
$values = array();
|
39 |
|
40 |
$forms = get_posts(
|
@@ -66,31 +249,33 @@ class WPCF7R_Leads_Manager {
|
|
66 |
}
|
67 |
?>
|
68 |
</select>
|
69 |
-
|
70 |
<?php
|
71 |
}
|
72 |
}
|
73 |
|
74 |
/**
|
75 |
* Search by filters
|
|
|
|
|
|
|
76 |
*/
|
77 |
public static function filter_request_query( $query ) {
|
78 |
-
//modify the query only if it admin and main query.
|
79 |
if ( ! ( is_admin() && $query->is_main_query() ) ) {
|
80 |
return $query;
|
81 |
}
|
82 |
|
83 |
-
//we want to modify the query for the targeted custom post and filter option
|
84 |
if ( ! isset( $query->query['post_type'] ) || ( ! ( self::get_post_type() === $query->query['post_type'] && isset( $_REQUEST['cf7_form'] ) ) ) ) {
|
85 |
return $query;
|
86 |
}
|
87 |
|
88 |
-
//for the default value of our filter no modification is required
|
89 |
if ( 0 === (int) $_REQUEST['cf7_form'] ) {
|
90 |
return $query;
|
91 |
}
|
92 |
-
//modify the query_vars.
|
93 |
|
|
|
94 |
$posted_value = isset( $_REQUEST['cf7_form'] ) && (int) $_REQUEST['cf7_form'] ? (int) $_REQUEST['cf7_form'] : '';
|
95 |
|
96 |
$meta_query = $query->get( 'meta_query' );
|
@@ -116,12 +301,15 @@ class WPCF7R_Leads_Manager {
|
|
116 |
* Initialize leads table tab
|
117 |
*/
|
118 |
public function init() {
|
119 |
-
include
|
120 |
}
|
121 |
|
122 |
/**
|
123 |
-
*
|
124 |
* Auto filter by selected action
|
|
|
|
|
|
|
125 |
*/
|
126 |
public static function get_admin_url( $form_id ) {
|
127 |
$url = admin_url( 'edit.php?post_type=' . self::get_post_type() );
|
@@ -157,6 +345,7 @@ class WPCF7R_Leads_Manager {
|
|
157 |
|
158 |
return $this->leads;
|
159 |
}
|
|
|
160 |
/**
|
161 |
* Insert new lead
|
162 |
*/
|
@@ -187,6 +376,7 @@ class WPCF7R_Leads_Manager {
|
|
187 |
|
188 |
/**
|
189 |
* Save the action to the db lead
|
|
|
190 |
* @param $lead_id
|
191 |
* @param $action_name
|
192 |
* @param $details
|
2 |
/**
|
3 |
* Class WPCF7R_Leads_Manager - Container class that handles leads management
|
4 |
*/
|
|
|
5 |
defined( 'ABSPATH' ) || exit;
|
6 |
|
7 |
class WPCF7R_Leads_Manager {
|
12 |
|
13 |
/**
|
14 |
* Define the leads post type
|
15 |
+
*
|
16 |
+
* @var string $cf7_id - contact form id.
|
17 |
*/
|
18 |
public static $post_type = 'wpcf7r_leads';
|
19 |
|
20 |
+
/**
|
21 |
+
* Main leads manager initializaition.
|
22 |
+
*
|
23 |
+
* @param [string] $cf7_id - contact form id.
|
24 |
+
*/
|
25 |
public function __construct( $cf7_id ) {
|
26 |
$this->cf7_id = $cf7_id;
|
27 |
|
29 |
|
30 |
}
|
31 |
|
32 |
+
/**
|
33 |
+
* Admin init hook.
|
34 |
+
*
|
35 |
+
* @return void
|
36 |
+
*/
|
37 |
+
public static function admin_init_scripts() {
|
38 |
+
add_filter( 'manage_wpcf7r_leads_posts_columns', array( 'WPCF7R_Leads_Manager', 'set_custom_edit_wpcf7r_leads_columns' ) );
|
39 |
+
add_action( 'manage_wpcf7r_leads_posts_custom_column', array( 'WPCF7R_Leads_Manager', 'custom_wpcf7r_leads_column' ), 10, 2 );
|
40 |
+
add_action( 'manage_posts_extra_tablenav', array( 'WPCF7R_Leads_Manager', 'display_export_button' ), 10, 2 );
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Display custom post type columns on edit list.
|
45 |
+
*
|
46 |
+
* @param [type] $column - the key of the column.
|
47 |
+
* @param [int] $post_id - the lead id.
|
48 |
+
* @return void
|
49 |
+
*/
|
50 |
+
public static function custom_wpcf7r_leads_column( $column, $lead_id ) {
|
51 |
+
$action_id = get_post_meta( $lead_id, 'cf7_action_id', true );
|
52 |
+
|
53 |
+
$action = WPCF7R_Action::get_action( (int) $action_id );
|
54 |
+
|
55 |
+
if ( $action ) {
|
56 |
+
$action->display_action_column_content( $column, $lead_id );
|
57 |
+
} else {
|
58 |
+
switch ( $column ) {
|
59 |
+
case 'data_preview':
|
60 |
+
echo __( 'Preview is not available: action does not exist', 'wpcf7-redirect' );
|
61 |
+
break;
|
62 |
+
case 'form':
|
63 |
+
$form_id = get_post_meta( $lead_id, 'cf7_form', true );
|
64 |
+
echo WPCF7r_Form_Helper::get_cf7_link_html( $form_id );
|
65 |
+
break;
|
66 |
+
}
|
67 |
+
}
|
68 |
+
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Adds an export button on the edit post list.
|
72 |
+
*
|
73 |
+
* @param [type] $which
|
74 |
+
* @return void
|
75 |
+
*/
|
76 |
+
public static function display_export_button( $which ) {
|
77 |
+
global $typenow;
|
78 |
+
|
79 |
+
if ( self::get_post_type() === $typenow && 'top' === $which ) {
|
80 |
+
?>
|
81 |
+
<input type="submit" name="export_leads" class="button button-primary" value="<?php _e( 'Export' ); ?>" />
|
82 |
+
<?php
|
83 |
+
}
|
84 |
+
}
|
85 |
+
|
86 |
+
/**
|
87 |
+
* Export the current filtered list.
|
88 |
+
*
|
89 |
+
* @return void
|
90 |
+
*/
|
91 |
+
public static function export_current_filtered_view() {
|
92 |
+
|
93 |
+
if ( isset( $_GET['export_leads'] ) ) {
|
94 |
+
$meta_query = array();
|
95 |
+
|
96 |
+
$args = array(
|
97 |
+
'post_type' => self::get_post_type(),
|
98 |
+
'post_status' => 'any',
|
99 |
+
'posts_per_page' => -1,
|
100 |
+
);
|
101 |
+
|
102 |
+
if ( isset( $_GET['cf7_form'] ) && $_GET['cf7_form'] ) {
|
103 |
+
$meta_query[] = array(
|
104 |
+
'key' => 'cf7_form',
|
105 |
+
'value' => (int) $_GET['cf7_form'],
|
106 |
+
);
|
107 |
+
}
|
108 |
+
|
109 |
+
if ( isset( $_GET['m'] ) && $_GET['m'] ) {
|
110 |
+
|
111 |
+
$month = substr( $_GET['m'], 4, 2 );
|
112 |
+
$year = substr( $_GET['m'], 0, 4 );
|
113 |
+
|
114 |
+
$args['date_query'] = array(
|
115 |
+
array(
|
116 |
+
'year' => $year,
|
117 |
+
'month' => $month,
|
118 |
+
),
|
119 |
+
);
|
120 |
+
}
|
121 |
+
|
122 |
+
if ( $meta_query ) {
|
123 |
+
$args['meta_query'] = $meta_query;
|
124 |
+
}
|
125 |
+
|
126 |
+
$arr_post = get_posts( $args );
|
127 |
+
|
128 |
+
$forms = array();
|
129 |
+
|
130 |
+
/**
|
131 |
+
* Order leads by form.
|
132 |
+
* Because the forms are dynamic we create diffrent headers for each form.
|
133 |
+
*/
|
134 |
+
foreach ( $arr_post as $lead ) {
|
135 |
+
$form_id = get_post_meta( $lead->ID, 'cf7_form', true );
|
136 |
+
|
137 |
+
$custom_fields = get_post_custom( $lead->ID );
|
138 |
+
|
139 |
+
foreach ( $custom_fields as $custom_field_key => $custom_field_value ) {
|
140 |
+
$value = maybe_unserialize( reset( $custom_field_value ) );
|
141 |
+
|
142 |
+
if ( ! is_array( $value ) && '_' !== substr( $custom_field_key, 0, 1 ) ) {
|
143 |
+
$forms[ $form_id ]['leads'][ $lead->ID ][ $custom_field_key ] = $value;
|
144 |
+
$forms[ $form_id ]['headers'][ $custom_field_key ] = $custom_field_key;
|
145 |
+
}
|
146 |
+
}
|
147 |
+
|
148 |
+
$forms[ $form_id ]['leads'][ $lead->ID ]['form_name'] = get_the_title( $form_id ) ? get_the_title( $form_id ) : __( 'Form does not exist', 'wpcf7-redirect' );
|
149 |
+
$forms[ $form_id ]['leads'][ $lead->ID ]['form_id'] = $form_id;
|
150 |
+
$forms[ $form_id ]['leads'][ $lead->ID ]['record_date'] = get_the_date( 'Y-m-d H:i', $lead->ID );
|
151 |
+
}
|
152 |
+
|
153 |
+
if ( $forms ) {
|
154 |
+
|
155 |
+
header( 'Content-type: text/csv' );
|
156 |
+
header( 'Content-Disposition: attachment; filename="wp-leads.csv"' );
|
157 |
+
header( 'Pragma: no-cache' );
|
158 |
+
header( 'Expires: 0' );
|
159 |
+
|
160 |
+
$file = fopen( 'php://output', 'w' );
|
161 |
+
|
162 |
+
// Print UTF8 encoding.
|
163 |
+
fprintf( $file, chr( 0xEF ) . chr( 0xBB ) . chr( 0xBF ) );
|
164 |
+
|
165 |
+
foreach ( $forms as $form_id => $form ) {
|
166 |
+
// Add default headers.
|
167 |
+
$form['headers']['form_name'] = 'form_name';
|
168 |
+
$form['headers']['form_id'] = 'form_id';
|
169 |
+
$form['headers']['record_date'] = 'record_date';
|
170 |
+
|
171 |
+
// Print headers.
|
172 |
+
fputcsv( $file, $form['headers'] );
|
173 |
+
|
174 |
+
foreach ( $form['leads'] as $lead ) {
|
175 |
+
$values_to_print = array();
|
176 |
+
|
177 |
+
foreach ( $form['headers'] as $header_key ) {
|
178 |
+
$values_to_print[ $header_key ] = isset( $lead[ $header_key ] ) ? $lead[ $header_key ] : '';
|
179 |
+
}
|
180 |
+
|
181 |
+
fputcsv( $file, $values_to_print );
|
182 |
+
}
|
183 |
+
|
184 |
+
fputcsv( $file, array() );
|
185 |
+
}
|
186 |
+
|
187 |
+
exit();
|
188 |
+
}
|
189 |
+
}
|
190 |
+
}
|
191 |
+
|
192 |
+
|
193 |
+
/**
|
194 |
+
* Undocumented function
|
195 |
+
*
|
196 |
+
* @param [array] $columns - list of columns.
|
197 |
+
* @return [array] - the key of the column.
|
198 |
+
*/
|
199 |
+
public static function set_custom_edit_wpcf7r_leads_columns( $columns ) {
|
200 |
+
|
201 |
+
$columns['form'] = __( 'Form', 'wpcf7-redirect' );
|
202 |
+
$columns['data_preview'] = __( 'Preview', 'wpcf7-redirect' );
|
203 |
+
|
204 |
+
return $columns;
|
205 |
+
}
|
206 |
/**
|
207 |
* Get the leads post type
|
208 |
*/
|
214 |
* Add A select filter on edit.php screen to filter records by form
|
215 |
*/
|
216 |
public static function add_form_filter() {
|
217 |
+
|
218 |
+
$post_type = isset( $_GET['post_type'] ) ? sanitize_text_field( $_GET['post_type'] ) : '';
|
219 |
+
|
220 |
+
if ( $post_type && self::get_post_type() === $post_type ) {
|
221 |
$values = array();
|
222 |
|
223 |
$forms = get_posts(
|
249 |
}
|
250 |
?>
|
251 |
</select>
|
|
|
252 |
<?php
|
253 |
}
|
254 |
}
|
255 |
|
256 |
/**
|
257 |
* Search by filters
|
258 |
+
*
|
259 |
+
* @param [object] $query - WP_Query object.
|
260 |
+
* @return [object] - WP_Query.
|
261 |
*/
|
262 |
public static function filter_request_query( $query ) {
|
263 |
+
// modify the query only if it admin and main query.
|
264 |
if ( ! ( is_admin() && $query->is_main_query() ) ) {
|
265 |
return $query;
|
266 |
}
|
267 |
|
268 |
+
// we want to modify the query for the targeted custom post and filter option.
|
269 |
if ( ! isset( $query->query['post_type'] ) || ( ! ( self::get_post_type() === $query->query['post_type'] && isset( $_REQUEST['cf7_form'] ) ) ) ) {
|
270 |
return $query;
|
271 |
}
|
272 |
|
273 |
+
// for the default value of our filter no modification is required.
|
274 |
if ( 0 === (int) $_REQUEST['cf7_form'] ) {
|
275 |
return $query;
|
276 |
}
|
|
|
277 |
|
278 |
+
// modify the query_vars.
|
279 |
$posted_value = isset( $_REQUEST['cf7_form'] ) && (int) $_REQUEST['cf7_form'] ? (int) $_REQUEST['cf7_form'] : '';
|
280 |
|
281 |
$meta_query = $query->get( 'meta_query' );
|
301 |
* Initialize leads table tab
|
302 |
*/
|
303 |
public function init() {
|
304 |
+
include WPCF7_PRO_REDIRECT_TEMPLATE_PATH . 'leads . php';
|
305 |
}
|
306 |
|
307 |
/**
|
308 |
+
* Get the url to the admin post type list
|
309 |
* Auto filter by selected action
|
310 |
+
*
|
311 |
+
* @param [int] $form_id - the contact form id.
|
312 |
+
* @return [string] - the new url.
|
313 |
*/
|
314 |
public static function get_admin_url( $form_id ) {
|
315 |
$url = admin_url( 'edit.php?post_type=' . self::get_post_type() );
|
345 |
|
346 |
return $this->leads;
|
347 |
}
|
348 |
+
|
349 |
/**
|
350 |
* Insert new lead
|
351 |
*/
|
376 |
|
377 |
/**
|
378 |
* Save the action to the db lead
|
379 |
+
*
|
380 |
* @param $lead_id
|
381 |
* @param $action_name
|
382 |
* @param $details
|
classes/class-wpcf7r-mailchimp-helper.php
CHANGED
@@ -2,14 +2,16 @@
|
|
2 |
use MailchimpAPI\Mailchimp;
|
3 |
|
4 |
/**
|
5 |
-
* Class WPCF7_mailchimp - The main class that manages this extension
|
6 |
*/
|
7 |
-
|
8 |
defined( 'ABSPATH' ) || exit;
|
9 |
|
|
|
10 |
class WPCF7R_Mailchimp_Helper {
|
11 |
public static $instance;
|
|
|
12 |
public static $mailchimp;
|
|
|
13 |
public static $api_key;
|
14 |
|
15 |
public function __construct( $api_key ) {
|
@@ -179,6 +181,7 @@ class WPCF7R_Mailchimp_Helper {
|
|
179 |
|
180 |
return $response;
|
181 |
}
|
|
|
182 |
/**
|
183 |
* Get the lists from the API
|
184 |
*
|
2 |
use MailchimpAPI\Mailchimp;
|
3 |
|
4 |
/**
|
5 |
+
* Class WPCF7_mailchimp - The main class that manages this extension.
|
6 |
*/
|
|
|
7 |
defined( 'ABSPATH' ) || exit;
|
8 |
|
9 |
+
|
10 |
class WPCF7R_Mailchimp_Helper {
|
11 |
public static $instance;
|
12 |
+
|
13 |
public static $mailchimp;
|
14 |
+
|
15 |
public static $api_key;
|
16 |
|
17 |
public function __construct( $api_key ) {
|
181 |
|
182 |
return $response;
|
183 |
}
|
184 |
+
|
185 |
/**
|
186 |
* Get the lists from the API
|
187 |
*
|
classes/class-wpcf7r-submission.php
CHANGED
@@ -210,21 +210,18 @@ class WPCF7r_Submission {
|
|
210 |
$new_validation_obj = new WPCF7_Validation();
|
211 |
|
212 |
// Invalidate all invalid tags.
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
$error = $wp_error->get_error_message();
|
218 |
|
219 |
-
|
220 |
-
}
|
221 |
}
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
}
|
228 |
}
|
229 |
}
|
230 |
}
|
210 |
$new_validation_obj = new WPCF7_Validation();
|
211 |
|
212 |
// Invalidate all invalid tags.
|
213 |
+
foreach ( reset( $invalid_tags ) as $custom_error_action_results ) {
|
214 |
+
if ( isset( $custom_error_action_results['invalid_tags'] ) && $custom_error_action_results['invalid_tags'] ) {
|
215 |
+
foreach ( $custom_error_action_results['invalid_tags'] as $wp_error ) {
|
216 |
+
$error = $wp_error->get_error_message();
|
|
|
217 |
|
218 |
+
$new_validation_obj->invalidate( $error['tag'], $error['error_message'] );
|
|
|
219 |
}
|
220 |
+
}
|
221 |
+
// invalidate default tag errors.
|
222 |
+
foreach ( $tags as $tag ) {
|
223 |
+
if ( ! $custom_error_action_results['ignored_tags'] || ! in_array( $tag->name, $custom_error_action_results['ignored_tags'], true ) ) {
|
224 |
+
$result = apply_filters( "wpcf7_validate_{$tag->type}", $new_validation_obj, $tag );
|
|
|
225 |
}
|
226 |
}
|
227 |
}
|
classes/class-wpcf7r-user.php
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
* Class WPCF7R_user - Parent class that handles all redirect actions
|
4 |
*/
|
5 |
-
|
6 |
defined( 'ABSPATH' ) || exit;
|
7 |
|
8 |
class WPCF7R_User {
|
|
|
9 |
public function __construct() {
|
10 |
add_action( 'show_user_profile', array( $this, 'additional_profile_fields' ) );
|
11 |
add_action( 'edit_user_profile', array( $this, 'additional_profile_fields' ) );
|
@@ -89,12 +89,17 @@ class WPCF7R_User {
|
|
89 |
if ( ! $fields ) {
|
90 |
return;
|
91 |
}
|
|
|
92 |
?>
|
93 |
|
94 |
<h3><?php _e( 'Extra profile information', 'wpcf7-redirect' ); ?></h3>
|
95 |
|
96 |
<table class="form-table">
|
97 |
<?php foreach ( $fields as $field ) : ?>
|
|
|
|
|
|
|
|
|
98 |
<?php $value = get_user_meta( $user->ID, $field['user_field_key'], true ); ?>
|
99 |
<tr>
|
100 |
<th>
|
1 |
<?php
|
2 |
/**
|
3 |
+
* Class WPCF7R_user - Parent class that handles all redirect actions.
|
4 |
*/
|
|
|
5 |
defined( 'ABSPATH' ) || exit;
|
6 |
|
7 |
class WPCF7R_User {
|
8 |
+
|
9 |
public function __construct() {
|
10 |
add_action( 'show_user_profile', array( $this, 'additional_profile_fields' ) );
|
11 |
add_action( 'edit_user_profile', array( $this, 'additional_profile_fields' ) );
|
89 |
if ( ! $fields ) {
|
90 |
return;
|
91 |
}
|
92 |
+
|
93 |
?>
|
94 |
|
95 |
<h3><?php _e( 'Extra profile information', 'wpcf7-redirect' ); ?></h3>
|
96 |
|
97 |
<table class="form-table">
|
98 |
<?php foreach ( $fields as $field ) : ?>
|
99 |
+
<?php
|
100 |
+
if ( ! $field['user_field_key'] ) {
|
101 |
+
continue;}
|
102 |
+
?>
|
103 |
<?php $value = get_user_meta( $user->ID, $field['user_field_key'], true ); ?>
|
104 |
<tr>
|
105 |
<th>
|
classes/class-wpcf7r-utils.php
CHANGED
@@ -72,13 +72,15 @@ class WPCF7r_Utils {
|
|
72 |
if ( isset( $_POST['wpcf7-copy'] ) && 'Duplicate' === $_POST['wpcf7-copy'] || ( isset( $_GET['action'] ) && 'copy' === $_GET['action'] ) ) {
|
73 |
|
74 |
$original_post_id = isset( $_POST['post_ID'] ) ? (int) $_POST['post_ID'] : (int) $_GET['post'];
|
75 |
-
|
|
|
76 |
|
77 |
$original_action_posts = $original_cf7->get_actions( 'default' );
|
78 |
|
79 |
if ( $original_action_posts ) {
|
80 |
foreach ( $original_action_posts as $original_action_post ) {
|
81 |
$new_post_id = $this->duplicate_post( $original_action_post->action_post );
|
|
|
82 |
update_post_meta( $new_post_id, 'wpcf7_id', $new_cf7->id() );
|
83 |
}
|
84 |
}
|
@@ -111,41 +113,41 @@ class WPCF7r_Utils {
|
|
111 |
/**
|
112 |
* Dupplicate contact form and all its actions
|
113 |
*
|
114 |
-
* @param $
|
115 |
*/
|
116 |
-
public function duplicate_post( $
|
117 |
global $wpdb;
|
118 |
|
119 |
// if you don't want current user to be the new post author,
|
120 |
// then change next couple of lines to this: $new_post_author = $post->post_author;
|
121 |
$current_user = wp_get_current_user();
|
122 |
$new_post_author = $current_user->ID;
|
123 |
-
$post_id = $
|
124 |
|
125 |
// if post data exists, create the post duplicate
|
126 |
-
if ( isset( $
|
127 |
// new post data array
|
128 |
$args = array(
|
129 |
-
'comment_status' => $
|
130 |
-
'ping_status' => $
|
131 |
'post_author' => $new_post_author,
|
132 |
-
'post_content' => $
|
133 |
-
'post_excerpt' => $
|
134 |
-
'post_name' => $
|
135 |
-
'post_parent' => $
|
136 |
-
'post_password' => $
|
137 |
'post_status' => 'private',
|
138 |
-
'post_title' => $
|
139 |
-
'post_type' => $
|
140 |
-
'to_ping' => $
|
141 |
-
'menu_order' => $
|
142 |
);
|
143 |
|
144 |
// insert the post by wp_insert_post() function
|
145 |
$new_post_id = wp_insert_post( $args );
|
146 |
|
147 |
// get all current post terms ad set them to the new post draft
|
148 |
-
$taxonomies = get_object_taxonomies( $
|
149 |
|
150 |
// returns array of taxonomy names for post type, ex array("category", "post_tag");
|
151 |
if ( $taxonomies ) {
|
@@ -156,7 +158,10 @@ class WPCF7r_Utils {
|
|
156 |
}
|
157 |
|
158 |
// duplicate all post meta just in two SQL queries
|
159 |
-
$
|
|
|
|
|
|
|
160 |
if ( count( $post_meta_infos ) !== 0 ) {
|
161 |
$sql_query = "INSERT INTO $wpdb->postmeta (post_id, meta_key, meta_value) ";
|
162 |
|
@@ -477,6 +482,32 @@ class WPCF7r_Utils {
|
|
477 |
return $cf7_forms;
|
478 |
}
|
479 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
480 |
/**
|
481 |
* Create a new action post
|
482 |
*/
|
@@ -505,9 +536,9 @@ class WPCF7r_Utils {
|
|
505 |
|
506 |
if ( $actions ) {
|
507 |
foreach ( $actions as $action ) {
|
508 |
-
if( ! is_wp_error($action
|
509 |
$results['action_row'] .= $action->get_action_row();
|
510 |
-
}else{
|
511 |
wp_send_json( $results );
|
512 |
}
|
513 |
}
|
@@ -537,7 +568,7 @@ class WPCF7r_Utils {
|
|
537 |
$old_api_action = $cf7r_form->get_cf7_redirection_settings();
|
538 |
|
539 |
if ( $old_api_action ) {
|
540 |
-
// CREATE JAVSCRIPT ACTION
|
541 |
if ( $old_api_action['fire_sctipt'] ) {
|
542 |
$javscript_action = $this->create_action( $post_id, __( 'Migrated Javascript Action From Old Plugin', 'wpcf7-redirect' ), $rule_id, 'FireScript' );
|
543 |
|
@@ -549,7 +580,7 @@ class WPCF7r_Utils {
|
|
549 |
$actions[] = $javscript_action;
|
550 |
}
|
551 |
|
552 |
-
// CREATE REDIRECT ACTION
|
553 |
$action = $this->create_action( $post_id, __( 'Migrated Redirect Action From Old Plugin', 'wpcf7-redirect' ), $rule_id, 'redirect' );
|
554 |
|
555 |
$action->set( 'action_status', 'on' );
|
72 |
if ( isset( $_POST['wpcf7-copy'] ) && 'Duplicate' === $_POST['wpcf7-copy'] || ( isset( $_GET['action'] ) && 'copy' === $_GET['action'] ) ) {
|
73 |
|
74 |
$original_post_id = isset( $_POST['post_ID'] ) ? (int) $_POST['post_ID'] : (int) $_GET['post'];
|
75 |
+
|
76 |
+
$original_cf7 = get_cf7r_form( $original_post_id );
|
77 |
|
78 |
$original_action_posts = $original_cf7->get_actions( 'default' );
|
79 |
|
80 |
if ( $original_action_posts ) {
|
81 |
foreach ( $original_action_posts as $original_action_post ) {
|
82 |
$new_post_id = $this->duplicate_post( $original_action_post->action_post );
|
83 |
+
|
84 |
update_post_meta( $new_post_id, 'wpcf7_id', $new_cf7->id() );
|
85 |
}
|
86 |
}
|
113 |
/**
|
114 |
* Dupplicate contact form and all its actions
|
115 |
*
|
116 |
+
* @param $action
|
117 |
*/
|
118 |
+
public function duplicate_post( $action ) {
|
119 |
global $wpdb;
|
120 |
|
121 |
// if you don't want current user to be the new post author,
|
122 |
// then change next couple of lines to this: $new_post_author = $post->post_author;
|
123 |
$current_user = wp_get_current_user();
|
124 |
$new_post_author = $current_user->ID;
|
125 |
+
$post_id = $action->ID;
|
126 |
|
127 |
// if post data exists, create the post duplicate
|
128 |
+
if ( isset( $action ) && null !== $action ) {
|
129 |
// new post data array
|
130 |
$args = array(
|
131 |
+
'comment_status' => $action->comment_status,
|
132 |
+
'ping_status' => $action->ping_status,
|
133 |
'post_author' => $new_post_author,
|
134 |
+
'post_content' => $action->post_content,
|
135 |
+
'post_excerpt' => $action->post_excerpt,
|
136 |
+
'post_name' => $action->post_name,
|
137 |
+
'post_parent' => $action->post_parent,
|
138 |
+
'post_password' => $action->post_password,
|
139 |
'post_status' => 'private',
|
140 |
+
'post_title' => $action->post_title,
|
141 |
+
'post_type' => $action->post_type,
|
142 |
+
'to_ping' => $action->to_ping,
|
143 |
+
'menu_order' => $action->menu_order,
|
144 |
);
|
145 |
|
146 |
// insert the post by wp_insert_post() function
|
147 |
$new_post_id = wp_insert_post( $args );
|
148 |
|
149 |
// get all current post terms ad set them to the new post draft
|
150 |
+
$taxonomies = get_object_taxonomies( $action->post_type );
|
151 |
|
152 |
// returns array of taxonomy names for post type, ex array("category", "post_tag");
|
153 |
if ( $taxonomies ) {
|
158 |
}
|
159 |
|
160 |
// duplicate all post meta just in two SQL queries
|
161 |
+
$sql = $wpdb->prepare( "SELECT meta_key, meta_value FROM {$wpdb->postmeta} WHERE post_id='%s'", $post_id );
|
162 |
+
|
163 |
+
$post_meta_infos = $wpdb->get_results( $sql );
|
164 |
+
|
165 |
if ( count( $post_meta_infos ) !== 0 ) {
|
166 |
$sql_query = "INSERT INTO $wpdb->postmeta (post_id, meta_key, meta_value) ";
|
167 |
|
482 |
return $cf7_forms;
|
483 |
}
|
484 |
|
485 |
+
/**
|
486 |
+
* Duplicate an existing action and connect it with the form.
|
487 |
+
*
|
488 |
+
* @return void
|
489 |
+
*/
|
490 |
+
public function duplicate_action() {
|
491 |
+
$results['action_row'] = '';
|
492 |
+
|
493 |
+
if ( isset( $_POST['data'] ) ) {
|
494 |
+
$action_data = $_POST['data'];
|
495 |
+
|
496 |
+
$action_post_id = $action_data['post_id'];
|
497 |
+
|
498 |
+
$action_post = get_post( $action_post_id );
|
499 |
+
|
500 |
+
$new_action_post_id = $this->duplicate_post( $action_post );
|
501 |
+
|
502 |
+
update_post_meta( $new_action_post_id, 'wpcf7_id', $action_data['form_id'] );
|
503 |
+
|
504 |
+
$action = WPCF7R_Action::get_action( $new_action_post_id );
|
505 |
+
|
506 |
+
$results['action_row'] = $action->get_action_row();
|
507 |
+
}
|
508 |
+
|
509 |
+
wp_send_json( $results );
|
510 |
+
}
|
511 |
/**
|
512 |
* Create a new action post
|
513 |
*/
|
536 |
|
537 |
if ( $actions ) {
|
538 |
foreach ( $actions as $action ) {
|
539 |
+
if ( ! is_wp_error( $action ) ) {
|
540 |
$results['action_row'] .= $action->get_action_row();
|
541 |
+
} else {
|
542 |
wp_send_json( $results );
|
543 |
}
|
544 |
}
|
568 |
$old_api_action = $cf7r_form->get_cf7_redirection_settings();
|
569 |
|
570 |
if ( $old_api_action ) {
|
571 |
+
// CREATE JAVSCRIPT ACTION.
|
572 |
if ( $old_api_action['fire_sctipt'] ) {
|
573 |
$javscript_action = $this->create_action( $post_id, __( 'Migrated Javascript Action From Old Plugin', 'wpcf7-redirect' ), $rule_id, 'FireScript' );
|
574 |
|
580 |
$actions[] = $javscript_action;
|
581 |
}
|
582 |
|
583 |
+
// CREATE REDIRECT ACTION.
|
584 |
$action = $this->create_action( $post_id, __( 'Migrated Redirect Action From Old Plugin', 'wpcf7-redirect' ), $rule_id, 'redirect' );
|
585 |
|
586 |
$action->set( 'action_status', 'on' );
|
modules/index.php
ADDED
File without changes
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Tags: contact form 7 redirect, contact form 7 thank you page, redirect cf7, redirect contact form 7, contact form 7 success page, cf7 redirect, registration form, mailchimp, login form, conditional redirect, cms integration, conversions, save leads, paypal
|
3 |
Contributors: yuvalsabar, regevlio
|
4 |
Requires at least: 4.7.0
|
5 |
-
Tested up to: 5.
|
6 |
-
Stable tag: 2.
|
7 |
License: GPLv3 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
|
@@ -45,8 +45,9 @@ Cooperation with a world leading web accessibility solution - you can try it for
|
|
45 |
* **[Extension]** Send submissions to API Json/XML to remote servers
|
46 |
* **[Extension]** Send submissions to API POST/GET to remote servers
|
47 |
* **[Extension]** PayPal Integration
|
|
|
48 |
|
49 |
-
> Note: some features are availible only as an extension. Which means you need Redirection for Contact Form 7 Pro to unlock those features. You can [get Redirection for Contact Form 7 Pro here](
|
50 |
|
51 |
== Installation ==
|
52 |
|
@@ -77,6 +78,14 @@ No. One of the reasons we developed this plugin, is because on_send_ok is now de
|
|
77 |
|
78 |
== Changelog ==
|
79 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
= 2.2.8 =
|
81 |
* Added html support to Send Email action.
|
82 |
* Added file attachments support to Send Email action.
|
2 |
Tags: contact form 7 redirect, contact form 7 thank you page, redirect cf7, redirect contact form 7, contact form 7 success page, cf7 redirect, registration form, mailchimp, login form, conditional redirect, cms integration, conversions, save leads, paypal
|
3 |
Contributors: yuvalsabar, regevlio
|
4 |
Requires at least: 4.7.0
|
5 |
+
Tested up to: 5.6
|
6 |
+
Stable tag: 2.3.0
|
7 |
License: GPLv3 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
|
45 |
* **[Extension]** Send submissions to API Json/XML to remote servers
|
46 |
* **[Extension]** Send submissions to API POST/GET to remote servers
|
47 |
* **[Extension]** PayPal Integration
|
48 |
+
* **[Extension]** Stripe Integration
|
49 |
|
50 |
+
> Note: some features are availible only as an extension. Which means you need Redirection for Contact Form 7 Pro to unlock those features. You can [get Redirection for Contact Form 7 Pro here](https://redirection-for-contact-form7.com/product/wpcf7r-actions-bundle/)!
|
51 |
|
52 |
== Installation ==
|
53 |
|
78 |
|
79 |
== Changelog ==
|
80 |
|
81 |
+
= 2.2.9 =
|
82 |
+
* Added Export leads to csv option.
|
83 |
+
* Added Duplicate action button.
|
84 |
+
* Added Preview data on leads table (Defined by marking which fields to display on the action settings).
|
85 |
+
* Added urlencode passed parameters option on redirect action.
|
86 |
+
* Fixed duplicate actions on contact form duplication.
|
87 |
+
|
88 |
+
|
89 |
= 2.2.8 =
|
90 |
* Added html support to Send Email action.
|
91 |
* Added file attachments support to Send Email action.
|
templates/blank-popup-template.php
DELETED
@@ -1,33 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Popup template
|
4 |
-
*/
|
5 |
-
|
6 |
-
defined( 'ABSPATH' ) || exit;
|
7 |
-
|
8 |
-
$file_name = str_replace( 'php', 'css', basename( $template ) );
|
9 |
-
if ( file_exists( WPCF7_PRO_REDIRECT_POPUP_TEMPLATES_PATH . $file_name ) ) {
|
10 |
-
$css_file_url = WPCF7_PRO_REDIRECT_POPUP_TEMPLATES_URL . $file_name;
|
11 |
-
} elseif ( file_exists( get_stylesheet_directory() . $file_name ) ) {
|
12 |
-
$css_file_url = get_stylesheet_directory_uri() . $file_name;
|
13 |
-
}
|
14 |
-
?>
|
15 |
-
|
16 |
-
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
17 |
-
<html lang="en">
|
18 |
-
<head>
|
19 |
-
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
20 |
-
<link id="popup-template-css" rel="stylesheet" href="<?php echo $css_file_url; ?>">
|
21 |
-
<title></title>
|
22 |
-
<?php wp_head(); ?>
|
23 |
-
</head>
|
24 |
-
<body <?php body_class( 'popup-template' ); ?>>
|
25 |
-
|
26 |
-
<div class="modal fade is-open" tabindex="-1" role="dialog" aria-labelledby="staticBackdrop" aria-hidden="true">
|
27 |
-
<?php echo $template_html; ?>
|
28 |
-
</div>
|
29 |
-
|
30 |
-
<?php wp_footer(); ?>
|
31 |
-
</body>
|
32 |
-
</html>
|
33 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
templates/default-settings.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Displays the list of actions
|
4 |
-
*/
|
5 |
|
6 |
defined( 'ABSPATH' ) || exit;
|
7 |
|
1 |
<?php
|
2 |
/**
|
3 |
* Displays the list of actions
|
4 |
+
*/
|
5 |
|
6 |
defined( 'ABSPATH' ) || exit;
|
7 |
|
templates/fields/field-leads-mapping.php
CHANGED
@@ -32,23 +32,23 @@ defined( 'ABSPATH' ) || exit;
|
|
32 |
</strong>
|
33 |
<?php echo cf7r_tooltip( __( 'The field label', 'wpcf7-redirect' ) ); ?>
|
34 |
</td>
|
35 |
-
|
36 |
-
/* <td>
|
37 |
<strong>
|
38 |
-
<?php _e( '
|
39 |
</strong>
|
40 |
-
<?php echo cf7r_tooltip( __( 'Should this field
|
41 |
-
</td>
|
42 |
-
?>
|
43 |
</tr>
|
44 |
<?php
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
|
|
49 |
$save = isset( $field['value'][ $mail_tag->name ]['save'] ) ? esc_html( $field['value'][ $mail_tag->name ]['save'] ) : '';
|
50 |
$tag_value = isset( $field['value'][ $mail_tag->name ]['tag'] ) ? esc_html( $field['value'][ $mail_tag->name ]['tag'] ) : '';
|
51 |
-
|
|
|
52 |
<tr>
|
53 |
<td class="<?php echo $mail_tag->name; ?>"><?php echo $mail_tag->name; ?></td>
|
54 |
<td class="tags-map-api-key">
|
@@ -57,16 +57,17 @@ defined( 'ABSPATH' ) || exit;
|
|
57 |
class="large-text"
|
58 |
value="<?php echo $tag_value; ?>" />
|
59 |
</td>
|
60 |
-
|
61 |
-
/* <td>
|
62 |
<input type="checkbox"
|
63 |
-
name="wpcf7-redirect<?php echo $prefix; ?>[<?php echo $field['name']; ?>][<?php echo $mail_tag->name; ?>][
|
64 |
value="1"
|
65 |
-
<?php checked( $
|
66 |
-
</td>
|
67 |
-
?>
|
68 |
</tr>
|
69 |
-
|
|
|
|
|
|
|
70 |
</table>
|
71 |
</div>
|
72 |
</div>
|
32 |
</strong>
|
33 |
<?php echo cf7r_tooltip( __( 'The field label', 'wpcf7-redirect' ) ); ?>
|
34 |
</td>
|
35 |
+
<td>
|
|
|
36 |
<strong>
|
37 |
+
<?php _e( 'Display on leads list', 'wpcf7-redirect' ); ?>
|
38 |
</strong>
|
39 |
+
<?php echo cf7r_tooltip( __( 'Should this field appear on the leads list', 'wpcf7-redirect' ) ); ?>
|
40 |
+
</td>
|
|
|
41 |
</tr>
|
42 |
<?php
|
43 |
+
if ( isset( $field['tags'] ) ) :
|
44 |
+
foreach ( $field['tags'] as $mail_tag ) :
|
45 |
+
if ( 'lead_id' === $mail_tag->name ) {
|
46 |
+
continue;
|
47 |
+
}
|
48 |
$save = isset( $field['value'][ $mail_tag->name ]['save'] ) ? esc_html( $field['value'][ $mail_tag->name ]['save'] ) : '';
|
49 |
$tag_value = isset( $field['value'][ $mail_tag->name ]['tag'] ) ? esc_html( $field['value'][ $mail_tag->name ]['tag'] ) : '';
|
50 |
+
$appear = isset( $field['value'][ $mail_tag->name ]['appear'] ) && $field['value'][ $mail_tag->name ]['appear'] ? true : false;
|
51 |
+
?>
|
52 |
<tr>
|
53 |
<td class="<?php echo $mail_tag->name; ?>"><?php echo $mail_tag->name; ?></td>
|
54 |
<td class="tags-map-api-key">
|
57 |
class="large-text"
|
58 |
value="<?php echo $tag_value; ?>" />
|
59 |
</td>
|
60 |
+
<td>
|
|
|
61 |
<input type="checkbox"
|
62 |
+
name="wpcf7-redirect<?php echo $prefix; ?>[<?php echo $field['name']; ?>][<?php echo $mail_tag->name; ?>][appear]"
|
63 |
value="1"
|
64 |
+
<?php checked( $appear, 1 ); ?> />
|
65 |
+
</td>
|
|
|
66 |
</tr>
|
67 |
+
<?php
|
68 |
+
endforeach;
|
69 |
+
endif;
|
70 |
+
?>
|
71 |
</table>
|
72 |
</div>
|
73 |
</div>
|
templates/fields/field-select.php
CHANGED
@@ -4,6 +4,9 @@
|
|
4 |
*/
|
5 |
|
6 |
defined( 'ABSPATH' ) || exit;
|
|
|
|
|
|
|
7 |
?>
|
8 |
|
9 |
<div class="field-wrap field-wrap-<?php echo $field['name']; ?> <?php echo isset( $field['class'] ) ? $field['class'] : ''; ?>" >
|
@@ -13,12 +16,13 @@ defined( 'ABSPATH' ) || exit;
|
|
13 |
<?php echo isset( $field['tooltip'] ) ? cf7r_tooltip( $field['tooltip'] ) : ''; ?>
|
14 |
</label>
|
15 |
<?php endif; ?>
|
16 |
-
<select class="" name="wpcf7-redirect<?php echo $prefix; ?>[<?php echo $field['name']; ?>]">
|
17 |
<?php foreach ( $field['options'] as $option_key => $option_label ) : ?>
|
18 |
<?php
|
19 |
-
$selected = $
|
20 |
?>
|
21 |
<option value="<?php echo $option_key; ?>" <?php echo $selected; ?>><?php echo $option_label; ?></option>
|
|
|
22 |
<?php endforeach; ?>
|
23 |
</select>
|
24 |
<div class="field-footer">
|
4 |
*/
|
5 |
|
6 |
defined( 'ABSPATH' ) || exit;
|
7 |
+
|
8 |
+
$selected = selected( '1', '1', false );
|
9 |
+
$toggler = isset( $field['toggler'] ) ? $field['name'] : false;
|
10 |
?>
|
11 |
|
12 |
<div class="field-wrap field-wrap-<?php echo $field['name']; ?> <?php echo isset( $field['class'] ) ? $field['class'] : ''; ?>" >
|
16 |
<?php echo isset( $field['tooltip'] ) ? cf7r_tooltip( $field['tooltip'] ) : ''; ?>
|
17 |
</label>
|
18 |
<?php endif; ?>
|
19 |
+
<select class="" <?php echo $toggler ? "data-toggler-name='{$toggler}'" : ''; ?> name="wpcf7-redirect<?php echo $prefix; ?>[<?php echo $field['name']; ?>]" >
|
20 |
<?php foreach ( $field['options'] as $option_key => $option_label ) : ?>
|
21 |
<?php
|
22 |
+
$selected = isset( $field['value'] ) && $field['value'] ? selected( $field['value'], $option_key, false ) : $selected;
|
23 |
?>
|
24 |
<option value="<?php echo $option_key; ?>" <?php echo $selected; ?>><?php echo $option_label; ?></option>
|
25 |
+
<?php $selected = ''; ?>
|
26 |
<?php endforeach; ?>
|
27 |
</select>
|
28 |
<div class="field-footer">
|
templates/fields/field-tags-map.php
CHANGED
@@ -6,6 +6,7 @@
|
|
6 |
defined( 'ABSPATH' ) || exit;
|
7 |
|
8 |
$defaults_name = isset( $field['defaults_name'] ) ? $field['defaults_name'] : 'tags_defaults';
|
|
|
9 |
?>
|
10 |
|
11 |
<div class="field-wrap field-wrap-<?php echo $field['name']; ?> <?php echo isset( $field['class'] ) ? $field['class'] : ''; ?>">
|
@@ -36,35 +37,40 @@ $defaults_name = isset( $field['defaults_name'] ) ? $field['defaults_name'] : 't
|
|
36 |
<td><strong><?php _e( 'Function', 'wpcf7-redirect' ); ?></strong><?php echo cf7r_tooltip( __( 'Perform actions on the submitted value', 'wpcf7-redirect' ) ); ?></td>
|
37 |
<?php endif; ?>
|
38 |
</tr>
|
39 |
-
<?php
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
class="
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
</td>
|
54 |
-
<?php if ( 'test_tags_map' !== $field['name'] && isset( $field['tags_functions'] ) ) : ?>
|
55 |
<td>
|
56 |
-
<?php $
|
57 |
-
<
|
58 |
-
<?php $functions = WPCF7r_Utils::get_available_text_functions( '', $mail_tag->type ); ?>
|
59 |
-
<option value=""><?php _e( 'Select' ); ?></option>
|
60 |
-
<?php foreach ( array_keys( $functions ) as $function_name ) : ?>
|
61 |
-
<option value="<?php echo $function_name; ?>" <?php selected( $selected_function, $function_name ); ?>><?php echo $function_name; ?></option>
|
62 |
-
<?php endforeach; ?>
|
63 |
-
</select>
|
64 |
</td>
|
65 |
-
|
66 |
-
|
67 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
</table>
|
69 |
</div>
|
70 |
</div>
|
6 |
defined( 'ABSPATH' ) || exit;
|
7 |
|
8 |
$defaults_name = isset( $field['defaults_name'] ) ? $field['defaults_name'] : 'tags_defaults';
|
9 |
+
$selected = selected( '1', '1', false );
|
10 |
?>
|
11 |
|
12 |
<div class="field-wrap field-wrap-<?php echo $field['name']; ?> <?php echo isset( $field['class'] ) ? $field['class'] : ''; ?>">
|
37 |
<td><strong><?php _e( 'Function', 'wpcf7-redirect' ); ?></strong><?php echo cf7r_tooltip( __( 'Perform actions on the submitted value', 'wpcf7-redirect' ) ); ?></td>
|
38 |
<?php endif; ?>
|
39 |
</tr>
|
40 |
+
<?php
|
41 |
+
if ( isset( $field['tags'] ) && $field['tags'] ) :
|
42 |
+
foreach ( $field['tags'] as $mail_tag ) :
|
43 |
+
?>
|
44 |
+
<tr>
|
45 |
+
<td class="<?php echo $mail_tag->name; ?>"><?php echo $mail_tag->name; ?></td>
|
46 |
+
<?php if ( 'test_tags_map' !== $field['name'] ) : ?>
|
47 |
+
<td class="tags-map-api-key">
|
48 |
+
<input type="text" id="sf-<?php echo $mail_tag->name; ?>"
|
49 |
+
name="wpcf7-redirect<?php echo $prefix; ?>[<?php echo $field['name']; ?>][<?php echo $mail_tag->name; ?>]"
|
50 |
+
class="large-text"
|
51 |
+
value="<?php echo isset( $field['value'][ $mail_tag->name ] ) ? esc_html( $field['value'][ $mail_tag->name ] ) : ''; ?>" />
|
52 |
+
</td>
|
53 |
+
<?php endif; ?>
|
|
|
|
|
54 |
<td>
|
55 |
+
<?php $selected_value = isset( $field[ $defaults_name ][ "{$mail_tag->name}" ] ) ? $field[ $defaults_name ][ "{$mail_tag->name}" ] : ''; ?>
|
56 |
+
<input type="text" name="wpcf7-redirect<?php echo $prefix; ?>[<?php echo $defaults_name; ?>][<?php echo $mail_tag->name; ?>]" value="<?php echo $selected_value; ?>" />
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
</td>
|
58 |
+
<?php if ( 'test_tags_map' !== $field['name'] && isset( $field['tags_functions'] ) ) : ?>
|
59 |
+
<td>
|
60 |
+
<?php $selected_function = isset( $field['tags_functions'][ "{$mail_tag->name}" ] ) ? $field['tags_functions'][ "{$mail_tag->name}" ] : ''; ?>
|
61 |
+
<select class="" name="wpcf7-redirect<?php echo $prefix; ?>[tags_functions][<?php echo $mail_tag->name; ?>]">
|
62 |
+
<?php $functions = WPCF7r_Utils::get_available_text_functions( '', $mail_tag->type ); ?>
|
63 |
+
<option value="" <?php echo ! $selected_function ? "selected='selected'" : ''; ?>><?php _e( 'Select' ); ?></option>
|
64 |
+
<?php foreach ( array_keys( $functions ) as $function_name ) : ?>
|
65 |
+
<option value="<?php echo $function_name; ?>" <?php selected( $selected_function, $function_name, true ); ?>><?php echo $function_name; ?></option>
|
66 |
+
<?php $selected = ''; ?>
|
67 |
+
<?php endforeach; ?>
|
68 |
+
</select>
|
69 |
+
</td>
|
70 |
+
<?php endif; ?>
|
71 |
+
</tr>
|
72 |
+
<?php endforeach; ?>
|
73 |
+
<?php endif; ?>
|
74 |
</table>
|
75 |
</div>
|
76 |
</div>
|
templates/popups/template-1.css
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
.popup-template .modal{position:fixed;left:0;bottom:0;width:100%;opacity:0;z-index:-1;visibility:hidden;background:rgba(0,0,0,.9);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;height:100%;z-index:999;-webkit-transition:all 0s;-o-transition:all 0s;transition:all 0s}.popup-template .modal-container{display:-webkit-box;display:-ms-flexbox;display:flex;max-width:720px;width:100%;border-radius:10px;overflow:hidden;position:absolute;opacity:0;pointer-events:none;-webkit-transition-duration:.3s;-o-transition-duration:.3s;transition-duration:.3s;background:#fff;-webkit-transform:translateY(100px) scale(.4);-ms-transform:translateY(100px) scale(.4);transform:translateY(100px) scale(.4)}.popup-template .modal-title{font-size:26px;margin:0;font-weight:400;color:#55311c}.popup-template .modal-desc{margin:6px 0 30px 0}.popup-template .modal-left{padding:40px 30px;background:#fff;-webkit-box-flex:1.5;-ms-flex:1.5;flex:1.5;-webkit-transition-duration:.5s;-o-transition-duration:.5s;transition-duration:.5s;-webkit-transform:translateY(80px);-ms-transform:translateY(80px);transform:translateY(80px);opacity:0}.popup-template .modal-button{color:#7d695e;font-family:Nunito,sans-serif;font-size:18px;cursor:pointer;border:0;outline:0;padding:10px 40px;border-radius:30px;background:#fff;-webkit-box-shadow:0 10px 40px rgba(0,0,0,.16);box-shadow:0 10px 40px rgba(0,0,0,.16);-webkit-transition:.3s;-o-transition:.3s;transition:.3s}.popup-template .modal-button:hover{border-color:rgba(255,255,255,.2);background:rgba(255,255,255,.8)}.popup-template .modal-right{-webkit-box-flex:2;-ms-flex:2;flex:2;font-size:0;-webkit-transition:.3s;-o-transition:.3s;transition:.3s;overflow:hidden}.popup-template .modal-right img{width:100%;height:100%;-webkit-transform:scale(2);-ms-transform:scale(2);transform:scale(2);-o-object-fit:cover;object-fit:cover;-webkit-transition-duration:1.2s;-o-transition-duration:1.2s;transition-duration:1.2s}.popup-template .modal.is-open{background:rgba(51,51,51,.85);opacity:1;z-index:9999;visibility:visible}.popup-template .modal.is-open .modal-button{opacity:0}.popup-template .modal.is-open .modal-container{opacity:1;-webkit-transition-duration:.6s;-o-transition-duration:.6s;transition-duration:.6s;pointer-events:auto;-webkit-transform:translateY(0) scale(1);-ms-transform:translateY(0) scale(1);transform:translateY(0) scale(1)}.popup-template .modal.is-open .modal-right img{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}.popup-template .modal.is-open .modal-left{-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0);opacity:1;-webkit-transition-delay:.1s;-o-transition-delay:.1s;transition-delay:.1s}.popup-template .modal-buttons{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.popup-template .modal-buttons a{color:rgba(51,51,51,.6);font-size:14px}.popup-template .modal .icon-button{outline:0;position:absolute;right:10px;top:12px;width:32px;height:32px;border:0;background:0;padding:0;cursor:pointer}@media (max-width:750px){.popup-template .modal-container{width:90%}.popup-template .modal-right{display:none}}
|
|
templates/popups/template-1.php
DELETED
@@ -1,27 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Popup Template Name: 50-50 With Image Template
|
4 |
-
*/
|
5 |
-
|
6 |
-
defined( 'ABSPATH' ) || exit;
|
7 |
-
?>
|
8 |
-
|
9 |
-
<div class="modal-container">
|
10 |
-
<div class="modal-left">
|
11 |
-
<h1 class="modal-title" style="color:{{template_title_color.color}}">{{template_title.text}}</h1>
|
12 |
-
<p class="modal-desc">{{template_description.description}}</p>
|
13 |
-
<div class="modal-buttons">
|
14 |
-
<a href="{{template_button1_link.url}}" class="" style="color:{{template_button1_color.color}}">{{template_button1.text}}</a>
|
15 |
-
</div>
|
16 |
-
|
17 |
-
<p class="sign-up"><span style="color:{{template_footer_text_color.color}}">{{template_footer_text.text}}</span> <a href="{{template_footer_button_link.url}}" style="color:{{template_footer_button_link_color.color}}">{{template_footer_button_text.text}}</a></p>
|
18 |
-
</div>
|
19 |
-
<div class="modal-right">
|
20 |
-
<img src="{{template_image.media}}" alt="">
|
21 |
-
</div>
|
22 |
-
<button class="icon-button close-button">
|
23 |
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50">
|
24 |
-
<path d="M 25 3 C 12.86158 3 3 12.86158 3 25 C 3 37.13842 12.86158 47 25 47 C 37.13842 47 47 37.13842 47 25 C 47 12.86158 37.13842 3 25 3 z M 25 5 C 36.05754 5 45 13.94246 45 25 C 45 36.05754 36.05754 45 25 45 C 13.94246 45 5 36.05754 5 25 C 5 13.94246 13.94246 5 25 5 z M 16.990234 15.990234 A 1.0001 1.0001 0 0 0 16.292969 17.707031 L 23.585938 25 L 16.292969 32.292969 A 1.0001 1.0001 0 1 0 17.707031 33.707031 L 25 26.414062 L 32.292969 33.707031 A 1.0001 1.0001 0 1 0 33.707031 32.292969 L 26.414062 25 L 33.707031 17.707031 A 1.0001 1.0001 0 0 0 32.980469 15.990234 A 1.0001 1.0001 0 0 0 32.292969 16.292969 L 25 23.585938 L 17.707031 16.292969 A 1.0001 1.0001 0 0 0 16.990234 15.990234 z"></path>
|
25 |
-
</svg>
|
26 |
-
</button>
|
27 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
templates/popups/template-1.scss
DELETED
@@ -1,148 +0,0 @@
|
|
1 |
-
// out: template-1.css, compress: true, sourceMap: false, autoprefixer: last 5 versions, groupmedia: true
|
2 |
-
.popup-template {
|
3 |
-
.modal {
|
4 |
-
position: fixed;
|
5 |
-
left: 0;
|
6 |
-
bottom: 0;
|
7 |
-
width: 100%;
|
8 |
-
opacity:0;
|
9 |
-
z-index: -1;
|
10 |
-
visibility:hidden;
|
11 |
-
background: rgba(#000, 0.9);
|
12 |
-
display: flex;
|
13 |
-
flex-direction: column;
|
14 |
-
align-items: center;
|
15 |
-
justify-content: center;
|
16 |
-
height:100%;
|
17 |
-
z-index: 999;
|
18 |
-
transition:all 0.8ms;
|
19 |
-
|
20 |
-
&-container {
|
21 |
-
display: flex;
|
22 |
-
max-width: 720px;
|
23 |
-
width: 100%;
|
24 |
-
border-radius: 10px;
|
25 |
-
overflow: hidden;
|
26 |
-
position: absolute;
|
27 |
-
opacity: 0;
|
28 |
-
pointer-events: none;
|
29 |
-
transition-duration: 0.3s;
|
30 |
-
background: #fff;
|
31 |
-
transform: translateY(100px) scale(0.4);
|
32 |
-
}
|
33 |
-
|
34 |
-
&-title {
|
35 |
-
font-size: 26px;
|
36 |
-
margin: 0;
|
37 |
-
font-weight: 400;
|
38 |
-
color: #55311c;
|
39 |
-
}
|
40 |
-
|
41 |
-
&-desc {
|
42 |
-
margin: 6px 0 30px 0;
|
43 |
-
}
|
44 |
-
|
45 |
-
&-left {
|
46 |
-
padding: 40px 30px;
|
47 |
-
background: #fff;
|
48 |
-
flex: 1.5;
|
49 |
-
transition-duration: 0.5s;
|
50 |
-
transform: translateY(80px);
|
51 |
-
opacity: 0;
|
52 |
-
}
|
53 |
-
|
54 |
-
&-button {
|
55 |
-
color: darken(#8c7569, 5%);
|
56 |
-
font-family: "Nunito", sans-serif;
|
57 |
-
font-size: 18px;
|
58 |
-
cursor: pointer;
|
59 |
-
border: 0;
|
60 |
-
outline: 0;
|
61 |
-
padding: 10px 40px;
|
62 |
-
border-radius: 30px;
|
63 |
-
background: rgb(255, 255, 255);
|
64 |
-
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.16);
|
65 |
-
transition: 0.3s;
|
66 |
-
|
67 |
-
&:hover {
|
68 |
-
border-color: rgba(255, 255, 255, 0.2);
|
69 |
-
background: rgba(#fff, 0.8);
|
70 |
-
}
|
71 |
-
}
|
72 |
-
|
73 |
-
&-right {
|
74 |
-
flex: 2;
|
75 |
-
font-size: 0;
|
76 |
-
transition: 0.3s;
|
77 |
-
overflow: hidden;
|
78 |
-
|
79 |
-
img {
|
80 |
-
width: 100%;
|
81 |
-
height: 100%;
|
82 |
-
transform: scale(2);
|
83 |
-
object-fit: cover;
|
84 |
-
transition-duration: 1.2s;
|
85 |
-
}
|
86 |
-
}
|
87 |
-
|
88 |
-
&.is-open {
|
89 |
-
background: rgba(#333, 0.85);
|
90 |
-
opacity:1;
|
91 |
-
z-index: 9999;
|
92 |
-
visibility:visible;
|
93 |
-
.modal-button {
|
94 |
-
opacity: 0;
|
95 |
-
}
|
96 |
-
|
97 |
-
.modal-container {
|
98 |
-
opacity: 1;
|
99 |
-
transition-duration: 0.6s;
|
100 |
-
pointer-events: auto;
|
101 |
-
transform: translateY(0) scale(1);
|
102 |
-
}
|
103 |
-
|
104 |
-
.modal-right img {
|
105 |
-
transform: scale(1);
|
106 |
-
}
|
107 |
-
|
108 |
-
.modal-left {
|
109 |
-
transform: translateY(0);
|
110 |
-
opacity: 1;
|
111 |
-
transition-delay: 0.1s;
|
112 |
-
}
|
113 |
-
}
|
114 |
-
|
115 |
-
&-buttons {
|
116 |
-
display: flex;
|
117 |
-
justify-content: space-between;
|
118 |
-
align-items: center;
|
119 |
-
|
120 |
-
a {
|
121 |
-
color: rgba(#333, 0.6);
|
122 |
-
font-size: 14px;
|
123 |
-
}
|
124 |
-
}
|
125 |
-
.icon-button {
|
126 |
-
outline: 0;
|
127 |
-
position: absolute;
|
128 |
-
right: 10px;
|
129 |
-
top: 12px;
|
130 |
-
width: 32px;
|
131 |
-
height: 32px;
|
132 |
-
border: 0;
|
133 |
-
background: 0;
|
134 |
-
padding: 0;
|
135 |
-
cursor: pointer;
|
136 |
-
}
|
137 |
-
}
|
138 |
-
|
139 |
-
@media (max-width: 750px) {
|
140 |
-
.modal-container {
|
141 |
-
width: 90%;
|
142 |
-
}
|
143 |
-
|
144 |
-
.modal-right {
|
145 |
-
display: none;
|
146 |
-
}
|
147 |
-
}
|
148 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
templates/popups/template-2.css
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
.popup-template .modal{position:fixed;left:0;bottom:0;width:100%;opacity:0;z-index:-1;visibility:hidden;background:rgba(0,0,0,.9);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;height:100%;z-index:999;-webkit-transition:all 0s;-o-transition:all 0s;transition:all 0s}.popup-template .modal-container{display:-webkit-box;display:-ms-flexbox;display:flex;max-width:720px;width:100%;border-radius:10px;overflow:hidden;position:absolute;opacity:0;pointer-events:none;-webkit-transition-duration:.3s;-o-transition-duration:.3s;transition-duration:.3s;background:#fff;-webkit-transform:translateY(100px) scale(.4);-ms-transform:translateY(100px) scale(.4);transform:translateY(100px) scale(.4)}.popup-template .modal-title{font-size:26px;margin:0;font-weight:400;color:#55311c}.popup-template .modal-desc{margin:6px 0 30px 0}.popup-template .modal-left,.popup-template .modal-right{padding:40px 30px;background:#fff;-webkit-box-flex:1.5;-ms-flex:1.5;flex:1.5;-webkit-transition-duration:.5s;-o-transition-duration:.5s;transition-duration:.5s;-webkit-transform:translateY(80px);-ms-transform:translateY(80px);transform:translateY(80px);opacity:0}.popup-template .modal-button{color:#7d695e;font-family:Nunito,sans-serif;font-size:18px;cursor:pointer;border:0;outline:0;padding:10px 40px;border-radius:30px;background:#fff;-webkit-box-shadow:0 10px 40px rgba(0,0,0,.16);box-shadow:0 10px 40px rgba(0,0,0,.16);-webkit-transition:.3s;-o-transition:.3s;transition:.3s}.popup-template .modal-button:hover{border-color:rgba(255,255,255,.2);background:rgba(255,255,255,.8)}.popup-template .modal.is-open{background:rgba(51,51,51,.85);opacity:1;z-index:9999;visibility:visible}.popup-template .modal.is-open .modal-button{opacity:0}.popup-template .modal.is-open .modal-container{opacity:1;-webkit-transition-duration:.6s;-o-transition-duration:.6s;transition-duration:.6s;pointer-events:auto;-webkit-transform:translateY(0) scale(1);-ms-transform:translateY(0) scale(1);transform:translateY(0) scale(1)}.popup-template .modal.is-open .modal-left,.popup-template .modal.is-open .modal-right{-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0);opacity:1;-webkit-transition-delay:.1s;-o-transition-delay:.1s;transition-delay:.1s}.popup-template .modal-buttons{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.popup-template .modal-buttons a{color:rgba(51,51,51,.6);font-size:14px}.popup-template .modal .icon-button{outline:0;position:absolute;right:10px;top:12px;width:32px;height:32px;border:0;background:0;padding:0;cursor:pointer}@media (max-width:750px){.popup-template .modal-container{width:90%}}
|
|
templates/popups/template-2.php
DELETED
@@ -1,33 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Popup Template Name: 50-50 Text
|
4 |
-
*/
|
5 |
-
|
6 |
-
defined( 'ABSPATH' ) || exit;
|
7 |
-
?>
|
8 |
-
|
9 |
-
<div class="modal-container">
|
10 |
-
<div class="modal-left">
|
11 |
-
<h2 class="modal-title">{{template_title_left.text}}</h2>
|
12 |
-
<p class="modal-desc">{{template_description_left.description}}</p>
|
13 |
-
<div class="modal-buttons">
|
14 |
-
<a href="{{template_button1_link.url}}" class="">{{template_button1_left.text}}</a>
|
15 |
-
</div>
|
16 |
-
|
17 |
-
<p class="sign-up">{{template_footer_text.text}} <a href="{{template_footer_button_link.url}}">{{template_footer_button_text_left.text}}</a></p>
|
18 |
-
</div>
|
19 |
-
<div class="modal-right">
|
20 |
-
<h2 class="modal-title">{{template_title_right.text}}</h2>
|
21 |
-
<p class="modal-desc">{{template_description_right.description}}</p>
|
22 |
-
<div class="modal-buttons">
|
23 |
-
<a href="{{template_button1_link.url}}" class="">{{template_button1_right.text}}</a>
|
24 |
-
</div>
|
25 |
-
|
26 |
-
<p class="sign-up">{{template_footer_text_right.text}} <a href="{{template_footer_button_link.url}}">{{template_footer_button_text_right.text}}</a></p>
|
27 |
-
</div>
|
28 |
-
<button class="icon-button close-button">
|
29 |
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50">
|
30 |
-
<path d="M 25 3 C 12.86158 3 3 12.86158 3 25 C 3 37.13842 12.86158 47 25 47 C 37.13842 47 47 37.13842 47 25 C 47 12.86158 37.13842 3 25 3 z M 25 5 C 36.05754 5 45 13.94246 45 25 C 45 36.05754 36.05754 45 25 45 C 13.94246 45 5 36.05754 5 25 C 5 13.94246 13.94246 5 25 5 z M 16.990234 15.990234 A 1.0001 1.0001 0 0 0 16.292969 17.707031 L 23.585938 25 L 16.292969 32.292969 A 1.0001 1.0001 0 1 0 17.707031 33.707031 L 25 26.414062 L 32.292969 33.707031 A 1.0001 1.0001 0 1 0 33.707031 32.292969 L 26.414062 25 L 33.707031 17.707031 A 1.0001 1.0001 0 0 0 32.980469 15.990234 A 1.0001 1.0001 0 0 0 32.292969 16.292969 L 25 23.585938 L 17.707031 16.292969 A 1.0001 1.0001 0 0 0 16.990234 15.990234 z"></path>
|
31 |
-
</svg>
|
32 |
-
</button>
|
33 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
templates/popups/template-2.scss
DELETED
@@ -1,125 +0,0 @@
|
|
1 |
-
// out: template-2.css, compress: true, sourceMap: false, autoprefixer: last 5 versions, groupmedia: true
|
2 |
-
.popup-template {
|
3 |
-
.modal {
|
4 |
-
position: fixed;
|
5 |
-
left: 0;
|
6 |
-
bottom: 0;
|
7 |
-
width: 100%;
|
8 |
-
opacity:0;
|
9 |
-
z-index: -1;
|
10 |
-
visibility:hidden;
|
11 |
-
background: rgba(#000, 0.9);
|
12 |
-
display: flex;
|
13 |
-
flex-direction: column;
|
14 |
-
align-items: center;
|
15 |
-
justify-content: center;
|
16 |
-
height:100%;
|
17 |
-
z-index: 999;
|
18 |
-
transition:all 0.8ms;
|
19 |
-
|
20 |
-
&-container {
|
21 |
-
display: flex;
|
22 |
-
max-width: 720px;
|
23 |
-
width: 100%;
|
24 |
-
border-radius: 10px;
|
25 |
-
overflow: hidden;
|
26 |
-
position: absolute;
|
27 |
-
opacity: 0;
|
28 |
-
pointer-events: none;
|
29 |
-
transition-duration: 0.3s;
|
30 |
-
background: #fff;
|
31 |
-
transform: translateY(100px) scale(0.4);
|
32 |
-
}
|
33 |
-
|
34 |
-
&-title {
|
35 |
-
font-size: 26px;
|
36 |
-
margin: 0;
|
37 |
-
font-weight: 400;
|
38 |
-
color: #55311c;
|
39 |
-
}
|
40 |
-
|
41 |
-
&-desc {
|
42 |
-
margin: 6px 0 30px 0;
|
43 |
-
}
|
44 |
-
&-right,
|
45 |
-
&-left {
|
46 |
-
padding: 40px 30px;
|
47 |
-
background: #fff;
|
48 |
-
flex: 1.5;
|
49 |
-
transition-duration: 0.5s;
|
50 |
-
transform: translateY(80px);
|
51 |
-
opacity: 0;
|
52 |
-
}
|
53 |
-
|
54 |
-
&-button {
|
55 |
-
color: darken(#8c7569, 5%);
|
56 |
-
font-family: "Nunito", sans-serif;
|
57 |
-
font-size: 18px;
|
58 |
-
cursor: pointer;
|
59 |
-
border: 0;
|
60 |
-
outline: 0;
|
61 |
-
padding: 10px 40px;
|
62 |
-
border-radius: 30px;
|
63 |
-
background: rgb(255, 255, 255);
|
64 |
-
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.16);
|
65 |
-
transition: 0.3s;
|
66 |
-
|
67 |
-
&:hover {
|
68 |
-
border-color: rgba(255, 255, 255, 0.2);
|
69 |
-
background: rgba(#fff, 0.8);
|
70 |
-
}
|
71 |
-
}
|
72 |
-
|
73 |
-
&.is-open {
|
74 |
-
background: rgba(#333, 0.85);
|
75 |
-
opacity:1;
|
76 |
-
z-index: 9999;
|
77 |
-
visibility:visible;
|
78 |
-
.modal-button {
|
79 |
-
opacity: 0;
|
80 |
-
}
|
81 |
-
|
82 |
-
.modal-container {
|
83 |
-
opacity: 1;
|
84 |
-
transition-duration: 0.6s;
|
85 |
-
pointer-events: auto;
|
86 |
-
transform: translateY(0) scale(1);
|
87 |
-
}
|
88 |
-
.modal-right,
|
89 |
-
.modal-left {
|
90 |
-
transform: translateY(0);
|
91 |
-
opacity: 1;
|
92 |
-
transition-delay: 0.1s;
|
93 |
-
}
|
94 |
-
}
|
95 |
-
|
96 |
-
&-buttons {
|
97 |
-
display: flex;
|
98 |
-
justify-content: space-between;
|
99 |
-
align-items: center;
|
100 |
-
|
101 |
-
a {
|
102 |
-
color: rgba(#333, 0.6);
|
103 |
-
font-size: 14px;
|
104 |
-
}
|
105 |
-
}
|
106 |
-
.icon-button {
|
107 |
-
outline: 0;
|
108 |
-
position: absolute;
|
109 |
-
right: 10px;
|
110 |
-
top: 12px;
|
111 |
-
width: 32px;
|
112 |
-
height: 32px;
|
113 |
-
border: 0;
|
114 |
-
background: 0;
|
115 |
-
padding: 0;
|
116 |
-
cursor: pointer;
|
117 |
-
}
|
118 |
-
}
|
119 |
-
|
120 |
-
@media (max-width: 750px) {
|
121 |
-
.modal-container {
|
122 |
-
width: 90%;
|
123 |
-
}
|
124 |
-
}
|
125 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
templates/popups/template-3.css
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
.popup-template .modal{position:fixed;left:0;bottom:0;width:100%;opacity:0;z-index:-1;visibility:hidden;background:rgba(0,0,0,.9);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;height:100%;z-index:999;-webkit-transition:all 0s;-o-transition:all 0s;transition:all 0s}.popup-template .modal .modal-middle{background:rgba(255,255,255,.7);padding:10px;border-radius:10px}.popup-template .modal-container{display:-webkit-box;display:-ms-flexbox;display:flex;max-width:720px;width:100%;border-radius:10px;overflow:hidden;position:absolute;opacity:0;pointer-events:none;-webkit-transition-duration:.3s;-o-transition-duration:.3s;transition-duration:.3s;background:#fff;-webkit-transform:translateY(100px) scale(.4);-ms-transform:translateY(100px) scale(.4);transform:translateY(100px) scale(.4)}.popup-template .modal-title{font-size:26px;margin:0;font-weight:400;color:#55311c}.popup-template .modal-desc{margin:6px 0 30px 0}.popup-template .modal-button{color:#7d695e;font-family:Nunito,sans-serif;font-size:18px;cursor:pointer;border:0;outline:0;padding:10px 40px;border-radius:30px;background:#fff;-webkit-box-shadow:0 10px 40px rgba(0,0,0,.16);box-shadow:0 10px 40px rgba(0,0,0,.16);-webkit-transition:.3s;-o-transition:.3s;transition:.3s}.popup-template .modal-button:hover{border-color:rgba(255,255,255,.2);background:rgba(255,255,255,.8)}.popup-template .modal.is-open{background:rgba(51,51,51,.85);opacity:1;z-index:9999;visibility:visible}.popup-template .modal.is-open .modal-button{opacity:0}.popup-template .modal.is-open .modal-container{opacity:1;-webkit-transition-duration:.6s;-o-transition-duration:.6s;transition-duration:.6s;pointer-events:auto;-webkit-transform:translateY(0) scale(1);-ms-transform:translateY(0) scale(1);transform:translateY(0) scale(1);padding:40px}.popup-template .modal-buttons{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.popup-template .modal-buttons a{color:rgba(51,51,51,.6);font-size:14px}.popup-template .modal .icon-button{outline:0;position:absolute;right:10px;top:12px;width:32px;height:32px;border:0;background:0;padding:0;cursor:pointer}@media (max-width:750px){.popup-template .modal-container{width:90%}}
|
|
templates/popups/template-3.php
DELETED
@@ -1,28 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Popup Template Name: Background Image
|
4 |
-
*/
|
5 |
-
|
6 |
-
defined( 'ABSPATH' ) || exit;
|
7 |
-
?>
|
8 |
-
|
9 |
-
<!-- Modal-->
|
10 |
-
|
11 |
-
<div class="modal-container" style="background-image:url('{{template_background_image.media}}')">
|
12 |
-
<div class="modal-middle">
|
13 |
-
<h2 class="modal-title">{{template_title_right.text}}</h2>
|
14 |
-
<p class="modal-desc">{{template_description_right.description}}</p>
|
15 |
-
<div class="modal-buttons">
|
16 |
-
<a href="{{template_button1_link.url}}" class="">{{template_button1_right.text}}</a>
|
17 |
-
</div>
|
18 |
-
|
19 |
-
<p class="sign-up">{{template_footer_text_right.text}} <a href="{{template_footer_button_link.url}}">{{template_footer_button_text_right.text}}</a></p>
|
20 |
-
</div>
|
21 |
-
<button class="icon-button close-button">
|
22 |
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50">
|
23 |
-
<path d="M 25 3 C 12.86158 3 3 12.86158 3 25 C 3 37.13842 12.86158 47 25 47 C 37.13842 47 47 37.13842 47 25 C 47 12.86158 37.13842 3 25 3 z M 25 5 C 36.05754 5 45 13.94246 45 25 C 45 36.05754 36.05754 45 25 45 C 13.94246 45 5 36.05754 5 25 C 5 13.94246 13.94246 5 25 5 z M 16.990234 15.990234 A 1.0001 1.0001 0 0 0 16.292969 17.707031 L 23.585938 25 L 16.292969 32.292969 A 1.0001 1.0001 0 1 0 17.707031 33.707031 L 25 26.414062 L 32.292969 33.707031 A 1.0001 1.0001 0 1 0 33.707031 32.292969 L 26.414062 25 L 33.707031 17.707031 A 1.0001 1.0001 0 0 0 32.980469 15.990234 A 1.0001 1.0001 0 0 0 32.292969 16.292969 L 25 23.585938 L 17.707031 16.292969 A 1.0001 1.0001 0 0 0 16.990234 15.990234 z"></path>
|
24 |
-
</svg>
|
25 |
-
</button>
|
26 |
-
</div>
|
27 |
-
|
28 |
-
<!--End of Modal -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
templates/popups/template-3.scss
DELETED
@@ -1,115 +0,0 @@
|
|
1 |
-
// out: template-3.css, compress: true, sourceMap: false, autoprefixer: last 5 versions, groupmedia: true
|
2 |
-
.popup-template {
|
3 |
-
.modal {
|
4 |
-
position: fixed;
|
5 |
-
left: 0;
|
6 |
-
bottom: 0;
|
7 |
-
width: 100%;
|
8 |
-
opacity:0;
|
9 |
-
z-index: -1;
|
10 |
-
visibility:hidden;
|
11 |
-
background: rgba(#000, 0.9);
|
12 |
-
display: flex;
|
13 |
-
flex-direction: column;
|
14 |
-
align-items: center;
|
15 |
-
justify-content: center;
|
16 |
-
height:100%;
|
17 |
-
z-index: 999;
|
18 |
-
transition:all 0.8ms;
|
19 |
-
|
20 |
-
.modal-middle {
|
21 |
-
background: rgba(255,255,255,0.7);
|
22 |
-
padding: 10px;
|
23 |
-
border-radius: 10px;
|
24 |
-
}
|
25 |
-
|
26 |
-
&-container {
|
27 |
-
display: flex;
|
28 |
-
max-width: 720px;
|
29 |
-
width: 100%;
|
30 |
-
border-radius: 10px;
|
31 |
-
overflow: hidden;
|
32 |
-
position: absolute;
|
33 |
-
opacity: 0;
|
34 |
-
pointer-events: none;
|
35 |
-
transition-duration: 0.3s;
|
36 |
-
background: #fff;
|
37 |
-
transform: translateY(100px) scale(0.4);
|
38 |
-
}
|
39 |
-
|
40 |
-
&-title {
|
41 |
-
font-size: 26px;
|
42 |
-
margin: 0;
|
43 |
-
font-weight: 400;
|
44 |
-
color: #55311c;
|
45 |
-
}
|
46 |
-
|
47 |
-
&-desc {
|
48 |
-
margin: 6px 0 30px 0;
|
49 |
-
}
|
50 |
-
&-button {
|
51 |
-
color: darken(#8c7569, 5%);
|
52 |
-
font-family: "Nunito", sans-serif;
|
53 |
-
font-size: 18px;
|
54 |
-
cursor: pointer;
|
55 |
-
border: 0;
|
56 |
-
outline: 0;
|
57 |
-
padding: 10px 40px;
|
58 |
-
border-radius: 30px;
|
59 |
-
background: rgb(255, 255, 255);
|
60 |
-
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.16);
|
61 |
-
transition: 0.3s;
|
62 |
-
|
63 |
-
&:hover {
|
64 |
-
border-color: rgba(255, 255, 255, 0.2);
|
65 |
-
background: rgba(#fff, 0.8);
|
66 |
-
}
|
67 |
-
}
|
68 |
-
&.is-open {
|
69 |
-
background: rgba(#333, 0.85);
|
70 |
-
opacity:1;
|
71 |
-
z-index: 9999;
|
72 |
-
visibility:visible;
|
73 |
-
.modal-button {
|
74 |
-
opacity: 0;
|
75 |
-
}
|
76 |
-
|
77 |
-
.modal-container {
|
78 |
-
opacity: 1;
|
79 |
-
transition-duration: 0.6s;
|
80 |
-
pointer-events: auto;
|
81 |
-
transform: translateY(0) scale(1);
|
82 |
-
padding:40px;
|
83 |
-
}
|
84 |
-
}
|
85 |
-
|
86 |
-
&-buttons {
|
87 |
-
display: flex;
|
88 |
-
justify-content: space-between;
|
89 |
-
align-items: center;
|
90 |
-
|
91 |
-
a {
|
92 |
-
color: rgba(#333, 0.6);
|
93 |
-
font-size: 14px;
|
94 |
-
}
|
95 |
-
}
|
96 |
-
.icon-button {
|
97 |
-
outline: 0;
|
98 |
-
position: absolute;
|
99 |
-
right: 10px;
|
100 |
-
top: 12px;
|
101 |
-
width: 32px;
|
102 |
-
height: 32px;
|
103 |
-
border: 0;
|
104 |
-
background: 0;
|
105 |
-
padding: 0;
|
106 |
-
cursor: pointer;
|
107 |
-
}
|
108 |
-
}
|
109 |
-
|
110 |
-
@media (max-width: 750px) {
|
111 |
-
.modal-container {
|
112 |
-
width: 90%;
|
113 |
-
}
|
114 |
-
}
|
115 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
templates/popups/template-4.css
DELETED
@@ -1,289 +0,0 @@
|
|
1 |
-
.template-4 .is-open {
|
2 |
-
overflow: hidden;
|
3 |
-
}
|
4 |
-
|
5 |
-
.template-4 .is-open .modal {
|
6 |
-
overflow-x: hidden;
|
7 |
-
overflow-y: auto;
|
8 |
-
}
|
9 |
-
|
10 |
-
.template-4 .btn.btn-primary {
|
11 |
-
color: #FFFFFF;
|
12 |
-
background-color: #3699FF;
|
13 |
-
border-color: #3699FF;
|
14 |
-
}
|
15 |
-
|
16 |
-
.template-4 .modal {
|
17 |
-
position: fixed;
|
18 |
-
top: 0;
|
19 |
-
left: 0;
|
20 |
-
z-index: 1050;
|
21 |
-
display: none;
|
22 |
-
width: 100%;
|
23 |
-
height: 100%;
|
24 |
-
overflow: hidden;
|
25 |
-
outline: 0;
|
26 |
-
background: rgba(0, 0, 0, 0.9);
|
27 |
-
z-index: 999;
|
28 |
-
}
|
29 |
-
|
30 |
-
.template-4 .modal.is-open {
|
31 |
-
display: block;
|
32 |
-
}
|
33 |
-
|
34 |
-
.template-4 .icon-button {
|
35 |
-
outline: 0;
|
36 |
-
position: absolute;
|
37 |
-
right: 10px;
|
38 |
-
top: 12px;
|
39 |
-
width: 32px;
|
40 |
-
height: 32px;
|
41 |
-
border: 0;
|
42 |
-
background: 0;
|
43 |
-
padding: 0;
|
44 |
-
cursor: pointer;
|
45 |
-
}
|
46 |
-
|
47 |
-
.template-4 .modal-dialog {
|
48 |
-
position: relative;
|
49 |
-
width: auto;
|
50 |
-
margin: 0.5rem;
|
51 |
-
pointer-events: none;
|
52 |
-
}
|
53 |
-
|
54 |
-
.template-4 .modal.fade .modal-dialog {
|
55 |
-
-webkit-transition: -webkit-transform 0.3s ease-out;
|
56 |
-
transition: -webkit-transform 0.3s ease-out;
|
57 |
-
transition: transform 0.3s ease-out;
|
58 |
-
transition: transform 0.3s ease-out, -webkit-transform 0.3s ease-out;
|
59 |
-
-webkit-transform: translate(0, -50px);
|
60 |
-
transform: translate(0, -50px);
|
61 |
-
}
|
62 |
-
|
63 |
-
.template-4 .modal.is-open .modal-dialog {
|
64 |
-
-webkit-transform: none;
|
65 |
-
transform: none;
|
66 |
-
}
|
67 |
-
|
68 |
-
.template-4 .modal.modal-static .modal-dialog {
|
69 |
-
-webkit-transform: scale(1.02);
|
70 |
-
transform: scale(1.02);
|
71 |
-
}
|
72 |
-
|
73 |
-
.template-4 .modal-dialog-scrollable {
|
74 |
-
display: -webkit-box;
|
75 |
-
display: -ms-flexbox;
|
76 |
-
display: flex;
|
77 |
-
max-height: calc(100% - 1rem);
|
78 |
-
}
|
79 |
-
|
80 |
-
.template-4 .modal-dialog-scrollable .modal-content {
|
81 |
-
max-height: calc(100vh - 1rem);
|
82 |
-
overflow: hidden;
|
83 |
-
}
|
84 |
-
|
85 |
-
.template-4 .modal-dialog-scrollable .modal-header {
|
86 |
-
-ms-flex-negative: 0;
|
87 |
-
flex-shrink: 0;
|
88 |
-
}
|
89 |
-
|
90 |
-
.template-4 .modal-dialog-scrollable .modal-footer {
|
91 |
-
-ms-flex-negative: 0;
|
92 |
-
flex-shrink: 0;
|
93 |
-
}
|
94 |
-
|
95 |
-
.template-4 .modal-dialog-scrollable .modal-body {
|
96 |
-
overflow-y: auto;
|
97 |
-
}
|
98 |
-
|
99 |
-
.template-4 .modal-dialog-centered {
|
100 |
-
display: -webkit-box;
|
101 |
-
display: -ms-flexbox;
|
102 |
-
display: flex;
|
103 |
-
-webkit-box-align: center;
|
104 |
-
-ms-flex-align: center;
|
105 |
-
align-items: center;
|
106 |
-
min-height: calc(100% - 1rem);
|
107 |
-
}
|
108 |
-
|
109 |
-
.template-4 .modal-dialog-centered::before {
|
110 |
-
display: block;
|
111 |
-
height: calc(100vh - 1rem);
|
112 |
-
height: -webkit-min-content;
|
113 |
-
height: -moz-min-content;
|
114 |
-
height: min-content;
|
115 |
-
content: "";
|
116 |
-
}
|
117 |
-
|
118 |
-
.template-4 .modal-dialog-centered.modal-dialog-scrollable {
|
119 |
-
-webkit-box-orient: vertical;
|
120 |
-
-webkit-box-direction: normal;
|
121 |
-
-ms-flex-direction: column;
|
122 |
-
flex-direction: column;
|
123 |
-
-webkit-box-pack: center;
|
124 |
-
-ms-flex-pack: center;
|
125 |
-
justify-content: center;
|
126 |
-
height: 100%;
|
127 |
-
}
|
128 |
-
|
129 |
-
.template-4 .modal-dialog-centered.modal-dialog-scrollable .modal-content {
|
130 |
-
max-height: none;
|
131 |
-
}
|
132 |
-
|
133 |
-
.template-4 .modal-dialog-centered.modal-dialog-scrollable::before {
|
134 |
-
content: none;
|
135 |
-
}
|
136 |
-
|
137 |
-
.template-4 .modal-content {
|
138 |
-
position: relative;
|
139 |
-
display: -webkit-box;
|
140 |
-
display: -ms-flexbox;
|
141 |
-
display: flex;
|
142 |
-
-webkit-box-orient: vertical;
|
143 |
-
-webkit-box-direction: normal;
|
144 |
-
-ms-flex-direction: column;
|
145 |
-
flex-direction: column;
|
146 |
-
width: 100%;
|
147 |
-
pointer-events: auto;
|
148 |
-
background-color: #ffffff;
|
149 |
-
background-clip: padding-box;
|
150 |
-
border: 0 solid rgba(0, 0, 0, 0.2);
|
151 |
-
border-radius: 0.42rem;
|
152 |
-
-webkit-box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
|
153 |
-
box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
|
154 |
-
outline: 0;
|
155 |
-
}
|
156 |
-
|
157 |
-
.template-4 .modal-backdrop {
|
158 |
-
position: fixed;
|
159 |
-
top: 0;
|
160 |
-
left: 0;
|
161 |
-
z-index: 1040;
|
162 |
-
width: 100vw;
|
163 |
-
height: 100vh;
|
164 |
-
background-color: #000000;
|
165 |
-
}
|
166 |
-
|
167 |
-
.template-4 .modal-backdrop.fade {
|
168 |
-
opacity: 0;
|
169 |
-
}
|
170 |
-
|
171 |
-
.template-4 .modal-backdrop.is-open {
|
172 |
-
opacity: 0.2;
|
173 |
-
}
|
174 |
-
|
175 |
-
.template-4 .modal-header {
|
176 |
-
display: -webkit-box;
|
177 |
-
display: -ms-flexbox;
|
178 |
-
display: flex;
|
179 |
-
-webkit-box-align: start;
|
180 |
-
-ms-flex-align: start;
|
181 |
-
align-items: flex-start;
|
182 |
-
-webkit-box-pack: justify;
|
183 |
-
-ms-flex-pack: justify;
|
184 |
-
justify-content: space-between;
|
185 |
-
padding: 1.5rem 1.75rem;
|
186 |
-
border-bottom: 1px solid #EBEDF3;
|
187 |
-
border-top-left-radius: 0.42rem;
|
188 |
-
border-top-right-radius: 0.42rem;
|
189 |
-
}
|
190 |
-
|
191 |
-
.template-4 .modal-header .close {
|
192 |
-
padding: 1.5rem 1.75rem;
|
193 |
-
margin: -1.5rem -1.75rem -1.5rem auto;
|
194 |
-
}
|
195 |
-
|
196 |
-
.template-4 .modal-title {
|
197 |
-
margin-bottom: 0;
|
198 |
-
line-height: 1.5;
|
199 |
-
font-weight: bold;
|
200 |
-
}
|
201 |
-
|
202 |
-
.template-4 .modal-body {
|
203 |
-
position: relative;
|
204 |
-
-webkit-box-flex: 1;
|
205 |
-
-ms-flex: 1 1 auto;
|
206 |
-
flex: 1 1 auto;
|
207 |
-
padding: 1.75rem;
|
208 |
-
}
|
209 |
-
|
210 |
-
.template-4 .modal-footer {
|
211 |
-
display: -webkit-box;
|
212 |
-
display: -ms-flexbox;
|
213 |
-
display: flex;
|
214 |
-
-ms-flex-wrap: wrap;
|
215 |
-
flex-wrap: wrap;
|
216 |
-
-webkit-box-align: center;
|
217 |
-
-ms-flex-align: center;
|
218 |
-
align-items: center;
|
219 |
-
-webkit-box-pack: end;
|
220 |
-
-ms-flex-pack: end;
|
221 |
-
justify-content: flex-end;
|
222 |
-
padding: 1.5rem;
|
223 |
-
border-top: 1px solid #EBEDF3;
|
224 |
-
border-bottom-right-radius: 0.42rem;
|
225 |
-
border-bottom-left-radius: 0.42rem;
|
226 |
-
}
|
227 |
-
|
228 |
-
.template-4 .modal-footer > * {
|
229 |
-
margin: 0.25rem;
|
230 |
-
}
|
231 |
-
|
232 |
-
.template-4 .modal-scrollbar-measure {
|
233 |
-
position: absolute;
|
234 |
-
top: -9999px;
|
235 |
-
width: 50px;
|
236 |
-
height: 50px;
|
237 |
-
overflow: scroll;
|
238 |
-
}
|
239 |
-
|
240 |
-
@media (prefers-reduced-motion: reduce) {
|
241 |
-
.template-4 .modal.fade .modal-dialog {
|
242 |
-
-webkit-transition: none;
|
243 |
-
transition: none;
|
244 |
-
}
|
245 |
-
}
|
246 |
-
|
247 |
-
@media (min-width: 576px) {
|
248 |
-
.template-4 .modal-dialog {
|
249 |
-
max-width: 500px;
|
250 |
-
margin: 1.75rem auto;
|
251 |
-
}
|
252 |
-
.template-4 .modal-dialog-scrollable {
|
253 |
-
max-height: calc(100% - 3.5rem);
|
254 |
-
}
|
255 |
-
.template-4 .modal-dialog-scrollable .modal-content {
|
256 |
-
max-height: calc(100vh - 3.5rem);
|
257 |
-
}
|
258 |
-
.template-4 .modal-dialog-centered {
|
259 |
-
min-height: calc(100% - 3.5rem);
|
260 |
-
}
|
261 |
-
.template-4 .modal-dialog-centered::before {
|
262 |
-
height: calc(100vh - 3.5rem);
|
263 |
-
height: -webkit-min-content;
|
264 |
-
height: -moz-min-content;
|
265 |
-
height: min-content;
|
266 |
-
}
|
267 |
-
.template-4 .modal-content {
|
268 |
-
-webkit-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
|
269 |
-
box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
|
270 |
-
}
|
271 |
-
.template-4 .modal-sm {
|
272 |
-
max-width: 300px;
|
273 |
-
}
|
274 |
-
}
|
275 |
-
|
276 |
-
@media (min-width: 992px) {
|
277 |
-
.template-4 .modal-lg {
|
278 |
-
max-width: 800px;
|
279 |
-
}
|
280 |
-
.template-4 .modal-xl {
|
281 |
-
max-width: 800px;
|
282 |
-
}
|
283 |
-
}
|
284 |
-
|
285 |
-
@media (min-width: 1200px) {
|
286 |
-
.template-4 .modal-xl {
|
287 |
-
max-width: 1140px;
|
288 |
-
}
|
289 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
templates/popups/template-4.php
DELETED
@@ -1,26 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Popup Template Name: Blank Template
|
4 |
-
*/
|
5 |
-
|
6 |
-
defined( 'ABSPATH' ) || exit;
|
7 |
-
?>
|
8 |
-
|
9 |
-
<!-- Modal-->
|
10 |
-
|
11 |
-
<div class="modal-dialog modal-dialog-scrollable" role="document">
|
12 |
-
<div class="modal-content">
|
13 |
-
<div class="modal-header">
|
14 |
-
<button class="icon-button close-button">
|
15 |
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50">
|
16 |
-
<path d="M 25 3 C 12.86158 3 3 12.86158 3 25 C 3 37.13842 12.86158 47 25 47 C 37.13842 47 47 37.13842 47 25 C 47 12.86158 37.13842 3 25 3 z M 25 5 C 36.05754 5 45 13.94246 45 25 C 45 36.05754 36.05754 45 25 45 C 13.94246 45 5 36.05754 5 25 C 5 13.94246 13.94246 5 25 5 z M 16.990234 15.990234 A 1.0001 1.0001 0 0 0 16.292969 17.707031 L 23.585938 25 L 16.292969 32.292969 A 1.0001 1.0001 0 1 0 17.707031 33.707031 L 25 26.414062 L 32.292969 33.707031 A 1.0001 1.0001 0 1 0 33.707031 32.292969 L 26.414062 25 L 33.707031 17.707031 A 1.0001 1.0001 0 0 0 32.980469 15.990234 A 1.0001 1.0001 0 0 0 32.292969 16.292969 L 25 23.585938 L 17.707031 16.292969 A 1.0001 1.0001 0 0 0 16.990234 15.990234 z"></path>
|
17 |
-
</svg>
|
18 |
-
</button>
|
19 |
-
</div>
|
20 |
-
<div class="modal-body" style="height: 300px;">
|
21 |
-
{{template_content.description}}
|
22 |
-
</div>
|
23 |
-
</div>
|
24 |
-
</div>
|
25 |
-
|
26 |
-
<!--End of Modal -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
templates/popups/template-4.scss
DELETED
@@ -1,301 +0,0 @@
|
|
1 |
-
.template-4 {
|
2 |
-
.is-open {
|
3 |
-
overflow: hidden;
|
4 |
-
.modal {
|
5 |
-
overflow-x: hidden;
|
6 |
-
overflow-y: auto;
|
7 |
-
}
|
8 |
-
}
|
9 |
-
.btn.btn-primary {
|
10 |
-
color: #FFFFFF;
|
11 |
-
background-color: #3699FF;
|
12 |
-
border-color: #3699FF;
|
13 |
-
}
|
14 |
-
.modal {
|
15 |
-
position: fixed;
|
16 |
-
top: 0;
|
17 |
-
left: 0;
|
18 |
-
z-index: 1050;
|
19 |
-
display: none;
|
20 |
-
width: 100%;
|
21 |
-
height: 100%;
|
22 |
-
overflow: hidden;
|
23 |
-
outline: 0;
|
24 |
-
background:rgba(0,0,0,0.9);
|
25 |
-
z-index: 999;
|
26 |
-
&.is-open{
|
27 |
-
display:block;
|
28 |
-
}
|
29 |
-
}
|
30 |
-
.icon-button {
|
31 |
-
outline: 0;
|
32 |
-
position: absolute;
|
33 |
-
right: 10px;
|
34 |
-
top: 12px;
|
35 |
-
width: 32px;
|
36 |
-
height: 32px;
|
37 |
-
border: 0;
|
38 |
-
background: 0;
|
39 |
-
padding: 0;
|
40 |
-
cursor: pointer;
|
41 |
-
}
|
42 |
-
.modal-dialog {
|
43 |
-
position: relative;
|
44 |
-
width: auto;
|
45 |
-
margin: 0.5rem;
|
46 |
-
pointer-events: none;
|
47 |
-
}
|
48 |
-
|
49 |
-
.modal.fade {
|
50 |
-
.modal-dialog {
|
51 |
-
-webkit-transition: -webkit-transform 0.3s ease-out;
|
52 |
-
transition: -webkit-transform 0.3s ease-out;
|
53 |
-
transition: transform 0.3s ease-out;
|
54 |
-
transition: transform 0.3s ease-out, -webkit-transform 0.3s ease-out;
|
55 |
-
-webkit-transform: translate(0, -50px);
|
56 |
-
transform: translate(0, -50px);
|
57 |
-
}
|
58 |
-
}
|
59 |
-
|
60 |
-
.modal.is-open {
|
61 |
-
.modal-dialog {
|
62 |
-
-webkit-transform: none;
|
63 |
-
transform: none;
|
64 |
-
}
|
65 |
-
}
|
66 |
-
|
67 |
-
.modal.modal-static {
|
68 |
-
.modal-dialog {
|
69 |
-
-webkit-transform: scale(1.02);
|
70 |
-
transform: scale(1.02);
|
71 |
-
}
|
72 |
-
}
|
73 |
-
|
74 |
-
.modal-dialog-scrollable {
|
75 |
-
display: -webkit-box;
|
76 |
-
display: -ms-flexbox;
|
77 |
-
display: flex;
|
78 |
-
max-height: calc(100% - 1rem);
|
79 |
-
|
80 |
-
.modal-content {
|
81 |
-
max-height: calc(100vh - 1rem);
|
82 |
-
overflow: hidden;
|
83 |
-
}
|
84 |
-
|
85 |
-
.modal-header {
|
86 |
-
-ms-flex-negative: 0;
|
87 |
-
flex-shrink: 0;
|
88 |
-
}
|
89 |
-
|
90 |
-
.modal-footer {
|
91 |
-
-ms-flex-negative: 0;
|
92 |
-
flex-shrink: 0;
|
93 |
-
}
|
94 |
-
|
95 |
-
.modal-body {
|
96 |
-
overflow-y: auto;
|
97 |
-
}
|
98 |
-
}
|
99 |
-
|
100 |
-
.modal-dialog-centered {
|
101 |
-
display: -webkit-box;
|
102 |
-
display: -ms-flexbox;
|
103 |
-
display: flex;
|
104 |
-
-webkit-box-align: center;
|
105 |
-
-ms-flex-align: center;
|
106 |
-
align-items: center;
|
107 |
-
min-height: calc(100% - 1rem);
|
108 |
-
|
109 |
-
&::before {
|
110 |
-
display: block;
|
111 |
-
height: calc(100vh - 1rem);
|
112 |
-
height: -webkit-min-content;
|
113 |
-
height: -moz-min-content;
|
114 |
-
height: min-content;
|
115 |
-
content: "";
|
116 |
-
}
|
117 |
-
}
|
118 |
-
|
119 |
-
.modal-dialog-centered.modal-dialog-scrollable {
|
120 |
-
-webkit-box-orient: vertical;
|
121 |
-
-webkit-box-direction: normal;
|
122 |
-
-ms-flex-direction: column;
|
123 |
-
flex-direction: column;
|
124 |
-
-webkit-box-pack: center;
|
125 |
-
-ms-flex-pack: center;
|
126 |
-
justify-content: center;
|
127 |
-
height: 100%;
|
128 |
-
|
129 |
-
.modal-content {
|
130 |
-
max-height: none;
|
131 |
-
}
|
132 |
-
|
133 |
-
&::before {
|
134 |
-
content: none;
|
135 |
-
}
|
136 |
-
}
|
137 |
-
|
138 |
-
.modal-content {
|
139 |
-
position: relative;
|
140 |
-
display: -webkit-box;
|
141 |
-
display: -ms-flexbox;
|
142 |
-
display: flex;
|
143 |
-
-webkit-box-orient: vertical;
|
144 |
-
-webkit-box-direction: normal;
|
145 |
-
-ms-flex-direction: column;
|
146 |
-
flex-direction: column;
|
147 |
-
width: 100%;
|
148 |
-
pointer-events: auto;
|
149 |
-
background-color: #ffffff;
|
150 |
-
background-clip: padding-box;
|
151 |
-
border: 0 solid rgba(0, 0, 0, 0.2);
|
152 |
-
border-radius: 0.42rem;
|
153 |
-
-webkit-box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
|
154 |
-
box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
|
155 |
-
outline: 0;
|
156 |
-
}
|
157 |
-
|
158 |
-
.modal-backdrop {
|
159 |
-
position: fixed;
|
160 |
-
top: 0;
|
161 |
-
left: 0;
|
162 |
-
z-index: 1040;
|
163 |
-
width: 100vw;
|
164 |
-
height: 100vh;
|
165 |
-
background-color: #000000;
|
166 |
-
}
|
167 |
-
|
168 |
-
.modal-backdrop.fade {
|
169 |
-
opacity: 0;
|
170 |
-
}
|
171 |
-
|
172 |
-
.modal-backdrop.is-open {
|
173 |
-
opacity: 0.2;
|
174 |
-
}
|
175 |
-
|
176 |
-
.modal-header {
|
177 |
-
display: -webkit-box;
|
178 |
-
display: -ms-flexbox;
|
179 |
-
display: flex;
|
180 |
-
-webkit-box-align: start;
|
181 |
-
-ms-flex-align: start;
|
182 |
-
align-items: flex-start;
|
183 |
-
-webkit-box-pack: justify;
|
184 |
-
-ms-flex-pack: justify;
|
185 |
-
justify-content: space-between;
|
186 |
-
padding: 1.5rem 1.75rem;
|
187 |
-
border-bottom: 1px solid #EBEDF3;
|
188 |
-
border-top-left-radius: 0.42rem;
|
189 |
-
border-top-right-radius: 0.42rem;
|
190 |
-
|
191 |
-
.close {
|
192 |
-
padding: 1.5rem 1.75rem;
|
193 |
-
margin: -1.5rem -1.75rem -1.5rem auto;
|
194 |
-
}
|
195 |
-
}
|
196 |
-
|
197 |
-
.modal-title {
|
198 |
-
margin-bottom: 0;
|
199 |
-
line-height: 1.5;
|
200 |
-
font-weight: bold;
|
201 |
-
}
|
202 |
-
|
203 |
-
.modal-body {
|
204 |
-
position: relative;
|
205 |
-
-webkit-box-flex: 1;
|
206 |
-
-ms-flex: 1 1 auto;
|
207 |
-
flex: 1 1 auto;
|
208 |
-
padding: 1.75rem;
|
209 |
-
}
|
210 |
-
|
211 |
-
.modal-footer {
|
212 |
-
display: -webkit-box;
|
213 |
-
display: -ms-flexbox;
|
214 |
-
display: flex;
|
215 |
-
-ms-flex-wrap: wrap;
|
216 |
-
flex-wrap: wrap;
|
217 |
-
-webkit-box-align: center;
|
218 |
-
-ms-flex-align: center;
|
219 |
-
align-items: center;
|
220 |
-
-webkit-box-pack: end;
|
221 |
-
-ms-flex-pack: end;
|
222 |
-
justify-content: flex-end;
|
223 |
-
padding: 1.5rem;
|
224 |
-
border-top: 1px solid #EBEDF3;
|
225 |
-
border-bottom-right-radius: 0.42rem;
|
226 |
-
border-bottom-left-radius: 0.42rem;
|
227 |
-
|
228 |
-
>* {
|
229 |
-
margin: 0.25rem;
|
230 |
-
}
|
231 |
-
}
|
232 |
-
|
233 |
-
.modal-scrollbar-measure {
|
234 |
-
position: absolute;
|
235 |
-
top: -9999px;
|
236 |
-
width: 50px;
|
237 |
-
height: 50px;
|
238 |
-
overflow: scroll;
|
239 |
-
}
|
240 |
-
|
241 |
-
@media (prefers-reduced-motion: reduce) {
|
242 |
-
.modal.fade {
|
243 |
-
.modal-dialog {
|
244 |
-
-webkit-transition: none;
|
245 |
-
transition: none;
|
246 |
-
}
|
247 |
-
}
|
248 |
-
}
|
249 |
-
|
250 |
-
@media (min-width: 576px) {
|
251 |
-
.modal-dialog {
|
252 |
-
max-width: 500px;
|
253 |
-
margin: 1.75rem auto;
|
254 |
-
}
|
255 |
-
|
256 |
-
.modal-dialog-scrollable {
|
257 |
-
max-height: calc(100% - 3.5rem);
|
258 |
-
|
259 |
-
.modal-content {
|
260 |
-
max-height: calc(100vh - 3.5rem);
|
261 |
-
}
|
262 |
-
}
|
263 |
-
|
264 |
-
.modal-dialog-centered {
|
265 |
-
min-height: calc(100% - 3.5rem);
|
266 |
-
|
267 |
-
&::before {
|
268 |
-
height: calc(100vh - 3.5rem);
|
269 |
-
height: -webkit-min-content;
|
270 |
-
height: -moz-min-content;
|
271 |
-
height: min-content;
|
272 |
-
}
|
273 |
-
}
|
274 |
-
|
275 |
-
.modal-content {
|
276 |
-
-webkit-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
|
277 |
-
box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
|
278 |
-
}
|
279 |
-
|
280 |
-
.modal-sm {
|
281 |
-
max-width: 300px;
|
282 |
-
}
|
283 |
-
}
|
284 |
-
|
285 |
-
@media (min-width: 992px) {
|
286 |
-
.modal-lg {
|
287 |
-
max-width: 800px;
|
288 |
-
}
|
289 |
-
|
290 |
-
.modal-xl {
|
291 |
-
max-width: 800px;
|
292 |
-
}
|
293 |
-
}
|
294 |
-
|
295 |
-
@media (min-width: 1200px) {
|
296 |
-
.modal-xl {
|
297 |
-
max-width: 1140px;
|
298 |
-
}
|
299 |
-
}
|
300 |
-
|
301 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
templates/popups/wpcfr-popup-wrap-default.php
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
3 |
-
exit;
|
4 |
-
}
|
5 |
-
?>
|
6 |
-
<div class="wpcfr-2-rows">
|
7 |
-
<div class="wpcfr-row">
|
8 |
-
Our team is processing your request!
|
9 |
-
</div>
|
10 |
-
<div class="wpcfr-row">
|
11 |
-
Some content
|
12 |
-
</div>
|
13 |
-
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
wpcf7-redirect.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Redirection for Contact Form 7
|
4 |
* Plugin URI: https://redirection-for-contact-form7.com/
|
5 |
* Description: The ultimate add-on for Contact Form 7 - redirect to any page after submission, fire scripts, save submissions in database, and much more options to make Contact Form 7 poweful than ever.
|
6 |
-
* Version: 2.
|
7 |
* Author: Query Solutions
|
8 |
* Author URI: https://redirection-for-contact-form7.com/
|
9 |
* Contributors: querysolutions, yuvalsabar, regevlio
|
@@ -23,14 +23,14 @@ if ( ! defined( 'CF7_REDIRECT_DEBUG' ) ) {
|
|
23 |
define( 'CF7_REDIRECT_DEBUG', get_option( 'wpcf_debug' ) ? true : false );
|
24 |
}
|
25 |
|
26 |
-
define( 'WPCF7_PRO_REDIRECT_PLUGIN_VERSION', '2.
|
27 |
define( 'WPCF7_PRO_MIGRATION_VERSION', '1' );
|
28 |
define( 'WPCF7_PRO_REDIRECT_CLASSES_PATH', plugin_dir_path( __FILE__ ) . 'classes/' );
|
29 |
|
30 |
-
require_once
|
31 |
-
require_once
|
32 |
-
require_once
|
33 |
-
require_once
|
34 |
|
35 |
add_action( 'admin_init', 'wpcf7r_activation_process' );
|
36 |
|
3 |
* Plugin Name: Redirection for Contact Form 7
|
4 |
* Plugin URI: https://redirection-for-contact-form7.com/
|
5 |
* Description: The ultimate add-on for Contact Form 7 - redirect to any page after submission, fire scripts, save submissions in database, and much more options to make Contact Form 7 poweful than ever.
|
6 |
+
* Version: 2.3.0
|
7 |
* Author: Query Solutions
|
8 |
* Author URI: https://redirection-for-contact-form7.com/
|
9 |
* Contributors: querysolutions, yuvalsabar, regevlio
|
23 |
define( 'CF7_REDIRECT_DEBUG', get_option( 'wpcf_debug' ) ? true : false );
|
24 |
}
|
25 |
|
26 |
+
define( 'WPCF7_PRO_REDIRECT_PLUGIN_VERSION', '2.3.0' );
|
27 |
define( 'WPCF7_PRO_MIGRATION_VERSION', '1' );
|
28 |
define( 'WPCF7_PRO_REDIRECT_CLASSES_PATH', plugin_dir_path( __FILE__ ) . 'classes/' );
|
29 |
|
30 |
+
require_once WPCF7_PRO_REDIRECT_CLASSES_PATH . 'class-wpcf7r-action.php' ;
|
31 |
+
require_once WPCF7_PRO_REDIRECT_CLASSES_PATH . 'class-wpcf7r-utils.php' ;
|
32 |
+
require_once WPCF7_PRO_REDIRECT_CLASSES_PATH . 'class-wpcf7r-actions.php' ;
|
33 |
+
require_once 'class-wpcf7-redirect.php' ;
|
34 |
|
35 |
add_action( 'admin_init', 'wpcf7r_activation_process' );
|
36 |
|
wpcf7r-functions.php
CHANGED
@@ -69,7 +69,7 @@ function wpcf7_redirect_get_all_extensions_list() {
|
|
69 |
'wpcf7r-api' => array(
|
70 |
'name' => 'wpcf7r-api',
|
71 |
'filename' => 'class-wpcf7r-action-api-url.php',
|
72 |
-
'title' => __( '
|
73 |
'description' => __( 'RESTful POST/GET/PUT/DELETE send to remote server (json/xml/params)', 'wpcf7-redirect' ),
|
74 |
'icon' => WPCF7_PRO_REDIRECT_BUILD_PATH . 'images/icon7.png',
|
75 |
'classname' => 'WPCF7R_Action_api_url_request',
|
@@ -77,7 +77,7 @@ function wpcf7_redirect_get_all_extensions_list() {
|
|
77 |
'wpcf7r-custom-errors' => array(
|
78 |
'name' => 'wpcf7r-custom-errors',
|
79 |
'filename' => 'class-wpcf7r-action-custom-errors.php',
|
80 |
-
'title' => __( 'Custom
|
81 |
'description' => __( 'Manage your form error messages by defining each field with its own message.', 'wpcf7-redirect' ),
|
82 |
'icon' => WPCF7_PRO_REDIRECT_BUILD_PATH . 'images/icon11.png',
|
83 |
'classname' => 'WPCF7R_Action_custom_errors',
|
@@ -458,12 +458,26 @@ function qs_date( $atts ) {
|
|
458 |
/**
|
459 |
* Check if WPCF7 Debug
|
460 |
*
|
461 |
-
* @return boolean
|
462 |
*/
|
463 |
function is_wpcf7r_debug() {
|
464 |
return defined( 'CF7_REDIRECT_DEBUG' ) && CF7_REDIRECT_DEBUG ? true : false;
|
465 |
}
|
466 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
467 |
/**
|
468 |
* Get an array of available countries
|
469 |
*/
|
69 |
'wpcf7r-api' => array(
|
70 |
'name' => 'wpcf7r-api',
|
71 |
'filename' => 'class-wpcf7r-action-api-url.php',
|
72 |
+
'title' => __( 'API Integrations', 'wpcf7-redirect' ),
|
73 |
'description' => __( 'RESTful POST/GET/PUT/DELETE send to remote server (json/xml/params)', 'wpcf7-redirect' ),
|
74 |
'icon' => WPCF7_PRO_REDIRECT_BUILD_PATH . 'images/icon7.png',
|
75 |
'classname' => 'WPCF7R_Action_api_url_request',
|
77 |
'wpcf7r-custom-errors' => array(
|
78 |
'name' => 'wpcf7r-custom-errors',
|
79 |
'filename' => 'class-wpcf7r-action-custom-errors.php',
|
80 |
+
'title' => __( 'Custom Validations', 'wpcf7-redirect' ),
|
81 |
'description' => __( 'Manage your form error messages by defining each field with its own message.', 'wpcf7-redirect' ),
|
82 |
'icon' => WPCF7_PRO_REDIRECT_BUILD_PATH . 'images/icon11.png',
|
83 |
'classname' => 'WPCF7R_Action_custom_errors',
|
458 |
/**
|
459 |
* Check if WPCF7 Debug
|
460 |
*
|
461 |
+
* @return [boolean]
|
462 |
*/
|
463 |
function is_wpcf7r_debug() {
|
464 |
return defined( 'CF7_REDIRECT_DEBUG' ) && CF7_REDIRECT_DEBUG ? true : false;
|
465 |
}
|
466 |
|
467 |
+
/**
|
468 |
+
* Check if the current page is the edit contact form 7 page.
|
469 |
+
*
|
470 |
+
* @return [boolean] - true if this is the edit screen.
|
471 |
+
*/
|
472 |
+
function wpcf7r_is_wpcf7_edit(){
|
473 |
+
global $post;
|
474 |
+
|
475 |
+
$wpcf7_page = isset( $_GET['page'] ) && 'wpcf7' === $_GET['page'] && isset( $_GET['post'] ) && $_GET['post'];
|
476 |
+
$wpcf7_page_new_page = isset( $_GET['page'] ) && 'wpcf7-new' === $_GET['page'];
|
477 |
+
$wpcf7_post = isset( $post->post_type ) && 'wpcf7_contact_form' === $post->post_type ? true : false;
|
478 |
+
|
479 |
+
return $wpcf7_page_new_page || $wpcf7_page || $wpcf7_post;
|
480 |
+
}
|
481 |
/**
|
482 |
* Get an array of available countries
|
483 |
*/
|