Version Description
- jQuery conflict fix
- Escape fix
- Warning fix
- Fixed the mime header
Download this release
Release Info
Developer | webagile |
Plugin | Newsletter |
Version | 4.5.3 |
Comparing to | |
See all releases |
Code changes from version 4.5.2 to 4.5.3
- emails/tnp-composer/_scripts/newsletter-builder.js +128 -128
- emails/tnp-composer/index.php +1 -1
- plugin.php +3 -3
- readme.txt +8 -9
emails/tnp-composer/_scripts/newsletter-builder.js
CHANGED
@@ -1,90 +1,90 @@
|
|
1 |
-
|
2 |
|
3 |
this.hover(
|
4 |
function () {
|
5 |
-
|
6 |
-
|
7 |
e.preventDefault()
|
8 |
});
|
9 |
-
|
10 |
e.preventDefault();
|
11 |
-
target =
|
12 |
|
13 |
//edit image
|
14 |
if (target.attr("data-type") == 'image') {
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
target.find('img').attr("src",
|
23 |
-
target.find('a').attr("href",
|
24 |
});
|
25 |
}
|
26 |
|
27 |
//edit link
|
28 |
if (target.attr("data-type") == 'link') {
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
target.text(
|
37 |
-
target.attr("href",
|
38 |
});
|
39 |
}
|
40 |
|
41 |
//edit button
|
42 |
if (target.attr("data-type") == 'button') {
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
// change: function (event, ui) {
|
47 |
-
//
|
48 |
// },
|
49 |
});
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
target.text(
|
58 |
-
target.attr("href",
|
59 |
-
target.css("color",
|
60 |
-
target.css("background-color",
|
61 |
-
target.css("border-color",
|
62 |
});
|
63 |
}
|
64 |
|
65 |
//edit title
|
66 |
if (target.attr("data-type") == 'title') {
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
// change: function (event, ui) {
|
71 |
-
//
|
72 |
// },
|
73 |
});
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
target.text(
|
81 |
-
target.css("color",
|
82 |
});
|
83 |
}
|
84 |
|
85 |
//edit text
|
86 |
if (target.attr("data-type") == 'text') {
|
87 |
-
|
88 |
tinymce.init({
|
89 |
selector: '#tnpc-edit-text .text',
|
90 |
menubar: false,
|
@@ -134,52 +134,52 @@ $.fn.hover_edit = function () {
|
|
134 |
});
|
135 |
if (tinymce.activeEditor != null)
|
136 |
tinymce.activeEditor.setContent(target.html());
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
target.html(tinymce.activeEditor.getContent());
|
143 |
});
|
144 |
}
|
145 |
|
146 |
//edit icon
|
147 |
if (target.attr("data-type") == 'icon') {
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
target.children('i').attr('class',
|
154 |
});
|
155 |
}//
|
156 |
|
157 |
});
|
158 |
}, function () {
|
159 |
-
|
160 |
}
|
161 |
);
|
162 |
}
|
163 |
|
164 |
-
|
165 |
this.append('<div class="tnpc-row-delete"><i class="fa fa-times" ></i></div>');
|
166 |
this.find('.tnpc-row-delete').perform_delete();
|
167 |
}
|
168 |
|
169 |
-
|
170 |
this.click(function () {
|
171 |
-
|
172 |
});
|
173 |
}
|
174 |
|
175 |
-
|
176 |
this.append('<div class="tnpc-row-edit-block"><i class="fa fa-pencil" ></i></div>');
|
177 |
this.find('.tnpc-row-edit-block i').perform_block_edit();
|
178 |
}
|
179 |
|
180 |
-
|
181 |
|
182 |
-
|
183 |
e.preventDefault()
|
184 |
});
|
185 |
|
@@ -187,58 +187,58 @@ $.fn.perform_block_edit = function () {
|
|
187 |
|
188 |
e.preventDefault();
|
189 |
|
190 |
-
target =
|
191 |
|
192 |
-
|
193 |
-
|
194 |
|
195 |
-
|
196 |
// change: function (event, ui) {
|
197 |
-
//
|
198 |
// },
|
199 |
});
|
200 |
-
|
201 |
|
202 |
// posts block
|
203 |
-
if (
|
204 |
|
205 |
-
|
206 |
-
|
207 |
|
208 |
} else {
|
209 |
|
210 |
-
|
211 |
-
|
212 |
|
213 |
}
|
214 |
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
|
219 |
-
target.css("background-color",
|
220 |
-
target.css("font-family",
|
221 |
|
222 |
});
|
223 |
|
224 |
-
|
225 |
|
226 |
-
|
227 |
-
|
228 |
var categories = [];
|
229 |
-
|
230 |
{
|
231 |
-
categories.push(
|
232 |
});
|
233 |
var data = {
|
234 |
'action': 'tnpc_render',
|
235 |
'b': target.parent().parent().parent().data('block'),
|
236 |
-
'num':
|
237 |
-
'tags':
|
238 |
'categories': categories
|
239 |
};
|
240 |
-
|
241 |
-
new_row =
|
242 |
target.parent().before(new_row).remove();
|
243 |
new_row.add_delete();
|
244 |
new_row.add_block_edit();
|
@@ -250,25 +250,25 @@ $.fn.perform_block_edit = function () {
|
|
250 |
|
251 |
}
|
252 |
|
253 |
-
|
254 |
|
255 |
// collapse wp menu
|
256 |
-
|
257 |
|
258 |
//Drag & Drop
|
259 |
-
|
260 |
revert: false,
|
261 |
stop: function (event, ui) {
|
262 |
if (ui.item.hasClass("newsletter-sidebar-buttons-content-tab")) {
|
263 |
-
loading_row =
|
264 |
ui.item.before(loading_row);
|
265 |
ui.item.remove();
|
266 |
var data = {
|
267 |
'action': 'tnpc_render',
|
268 |
'b': ui.item.data("file")
|
269 |
};
|
270 |
-
|
271 |
-
new_row =
|
272 |
// ui.item.before(new_row);
|
273 |
// ui.item.remove();
|
274 |
loading_row.before(new_row);
|
@@ -281,59 +281,59 @@ $(function () {
|
|
281 |
}
|
282 |
});
|
283 |
|
284 |
-
|
285 |
connectToSortable: "#newsletter-builder-area-center-frame-content",
|
286 |
//helper: "clone",
|
287 |
revert: false,
|
288 |
handle: ".tnpc-row-move"
|
289 |
});
|
290 |
|
291 |
-
|
292 |
connectToSortable: "#newsletter-builder-area-center-frame-content",
|
293 |
helper: "clone",
|
294 |
revert: false,
|
295 |
start: function () {
|
296 |
-
if (
|
297 |
-
|
298 |
else
|
299 |
-
|
300 |
},
|
301 |
stop: function () {
|
302 |
-
|
303 |
}
|
304 |
});
|
305 |
|
306 |
//close edit
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
});
|
311 |
|
312 |
// initialize controls
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
|
317 |
});
|
318 |
|
319 |
function create() {
|
320 |
|
321 |
-
|
322 |
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
//
|
327 |
-
//
|
328 |
-
preload_export_html =
|
329 |
|
330 |
if (preload_export_html.indexOf('<style type="text/css">') > -1) {
|
331 |
export_content = preload_export_html;
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
} else {
|
336 |
-
|
337 |
// export_content = '<style>' + data + '</style><link href="http://fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400,600,700,900,200italic,300italic,400italic,600italic,700italic,900italic" rel="stylesheet" type="text/css"><link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css"><div id="tnpc-wrapper"><div id="tnpc-wrapper-newsletter">' + preload_export_html + '</div></div>';
|
338 |
export_content = '<!DOCTYPE html><html><head><title>Newsletter</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta http-equiv="X-UA-Compatible" content="IE=edge" />';
|
339 |
export_content += '<style type="text/css">' + data + '</style>';
|
@@ -342,13 +342,13 @@ function create() {
|
|
342 |
export_content += '</head><body style="margin: 0; padding: 0;">';
|
343 |
export_content += preload_export_html;
|
344 |
export_content += '</body></html>';
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
});
|
349 |
}
|
350 |
|
351 |
-
|
352 |
|
353 |
}
|
354 |
|
1 |
+
jQuery.fn.hover_edit = function () {
|
2 |
|
3 |
this.hover(
|
4 |
function () {
|
5 |
+
jQuery(this).append('<div class="tnpc-row-edit-hover"><i class="fa fa-pencil" style="line-height:30px;"></i></div>');
|
6 |
+
jQuery(".tnpc-row-edit-hover").click(function (e) {
|
7 |
e.preventDefault()
|
8 |
});
|
9 |
+
jQuery(".tnpc-row-edit-hover i").click(function (e) {
|
10 |
e.preventDefault();
|
11 |
+
target = jQuery(this).parent().parent();
|
12 |
|
13 |
//edit image
|
14 |
if (target.attr("data-type") == 'image') {
|
15 |
+
jQuery("#tnpc-edit-image .image").val(target.find('img').attr("src"));
|
16 |
+
jQuery("#tnpc-edit-image .url").val(target.find('a').attr("href"));
|
17 |
+
jQuery("#tnpc-edit-image").fadeIn(500);
|
18 |
+
jQuery("#tnpc-edit-image .tnpc-edit-box").slideDown(500);
|
19 |
+
jQuery("#tnpc-edit-image .tnpc-edit-box-buttons-save").click(function () {
|
20 |
+
jQuery(this).parent().parent().parent().fadeOut(500)
|
21 |
+
jQuery(this).parent().parent().slideUp(500)
|
22 |
+
target.find('img').attr("src", jQuery("#tnpc-edit-image .image").val());
|
23 |
+
target.find('a').attr("href", jQuery("#tnpc-edit-image .url").val());
|
24 |
});
|
25 |
}
|
26 |
|
27 |
//edit link
|
28 |
if (target.attr("data-type") == 'link') {
|
29 |
+
jQuery("#tnpc-edit-link .title").val(target.text());
|
30 |
+
jQuery("#tnpc-edit-link .url").val(target.attr("href"));
|
31 |
+
jQuery("#tnpc-edit-link").fadeIn(500);
|
32 |
+
jQuery("#tnpc-edit-link .tnpc-edit-box").slideDown(500);
|
33 |
+
jQuery("#tnpc-edit-link .tnpc-edit-box-buttons-save").click(function () {
|
34 |
+
jQuery(this).parent().parent().parent().fadeOut(500)
|
35 |
+
jQuery(this).parent().parent().slideUp(500)
|
36 |
+
target.text(jQuery("#tnpc-edit-link .title").val());
|
37 |
+
target.attr("href", jQuery("#tnpc-edit-link .url").val());
|
38 |
});
|
39 |
}
|
40 |
|
41 |
//edit button
|
42 |
if (target.attr("data-type") == 'button') {
|
43 |
+
jQuery("#tnpc-edit-button .title").val(target.text());
|
44 |
+
jQuery("#tnpc-edit-button .url").val(target.attr("href"));
|
45 |
+
jQuery('.bgcolor, .fgcolor').wpColorPicker({
|
46 |
// change: function (event, ui) {
|
47 |
+
// jQuery('.bgcolor').iris('hide');
|
48 |
// },
|
49 |
});
|
50 |
+
jQuery('.bgcolor').wpColorPicker().iris('color', target.css("background-color"));
|
51 |
+
jQuery('.fgcolor').wpColorPicker().iris('color', target.css("color"));
|
52 |
+
jQuery("#tnpc-edit-button").fadeIn(500);
|
53 |
+
jQuery("#tnpc-edit-button .tnpc-edit-box").slideDown(500);
|
54 |
+
jQuery("#tnpc-edit-button .tnpc-edit-box-buttons-save").click(function () {
|
55 |
+
jQuery(this).parent().parent().parent().fadeOut(500)
|
56 |
+
jQuery(this).parent().parent().slideUp(500)
|
57 |
+
target.text(jQuery("#tnpc-edit-button .title").val());
|
58 |
+
target.attr("href", jQuery("#tnpc-edit-button .url").val());
|
59 |
+
target.css("color", jQuery("#tnpc-edit-button .fgcolor").val());
|
60 |
+
target.css("background-color", jQuery("#tnpc-edit-button .bgcolor").val());
|
61 |
+
target.css("border-color", jQuery("#tnpc-edit-button .bgcolor").val());
|
62 |
});
|
63 |
}
|
64 |
|
65 |
//edit title
|
66 |
if (target.attr("data-type") == 'title') {
|
67 |
+
jQuery("#tnpc-edit-title .title").val(target.text());
|
68 |
+
jQuery("#tnpc-edit-title .color").val(target.css("color"));
|
69 |
+
jQuery("#tnpc-edit-title .color").wpColorPicker({
|
70 |
// change: function (event, ui) {
|
71 |
+
// jQuery('.bgcolor').iris('hide');
|
72 |
// },
|
73 |
});
|
74 |
+
jQuery("#tnpc-edit-title .color").wpColorPicker().iris('color', target.css("color"));
|
75 |
+
jQuery("#tnpc-edit-title").fadeIn(500);
|
76 |
+
jQuery("#tnpc-edit-title .tnpc-edit-box").slideDown(500);
|
77 |
+
jQuery("#tnpc-edit-title .tnpc-edit-box-buttons-save").click(function () {
|
78 |
+
jQuery(this).parent().parent().parent().fadeOut(500)
|
79 |
+
jQuery(this).parent().parent().slideUp(500)
|
80 |
+
target.text(jQuery("#tnpc-edit-title .title").val());
|
81 |
+
target.css("color", jQuery("#tnpc-edit-title .color").val());
|
82 |
});
|
83 |
}
|
84 |
|
85 |
//edit text
|
86 |
if (target.attr("data-type") == 'text') {
|
87 |
+
jQuery("#tnpc-edit-text .text").val(target.text());
|
88 |
tinymce.init({
|
89 |
selector: '#tnpc-edit-text .text',
|
90 |
menubar: false,
|
134 |
});
|
135 |
if (tinymce.activeEditor != null)
|
136 |
tinymce.activeEditor.setContent(target.html());
|
137 |
+
jQuery("#tnpc-edit-text").fadeIn(500);
|
138 |
+
jQuery("#tnpc-edit-text .tnpc-edit-box").slideDown(500);
|
139 |
+
jQuery("#tnpc-edit-text .tnpc-edit-box-buttons-save").click(function () {
|
140 |
+
jQuery(this).parent().parent().parent().fadeOut(500)
|
141 |
+
jQuery(this).parent().parent().slideUp(500)
|
142 |
target.html(tinymce.activeEditor.getContent());
|
143 |
});
|
144 |
}
|
145 |
|
146 |
//edit icon
|
147 |
if (target.attr("data-type") == 'icon') {
|
148 |
+
jQuery("#tnpc-edit-icon").fadeIn(500);
|
149 |
+
jQuery("#tnpc-edit-icon .tnpc-edit-box").slideDown(500);
|
150 |
+
jQuery("#tnpc-edit-icon i").click(function () {
|
151 |
+
jQuery(this).parent().parent().parent().parent().fadeOut(500)
|
152 |
+
jQuery(this).parent().parent().parent().slideUp(500)
|
153 |
+
target.children('i').attr('class', jQuery(this).attr('class'));
|
154 |
});
|
155 |
}//
|
156 |
|
157 |
});
|
158 |
}, function () {
|
159 |
+
jQuery(this).children(".tnpc-row-edit-hover").remove();
|
160 |
}
|
161 |
);
|
162 |
}
|
163 |
|
164 |
+
jQuery.fn.add_delete = function () {
|
165 |
this.append('<div class="tnpc-row-delete"><i class="fa fa-times" ></i></div>');
|
166 |
this.find('.tnpc-row-delete').perform_delete();
|
167 |
}
|
168 |
|
169 |
+
jQuery.fn.perform_delete = function () {
|
170 |
this.click(function () {
|
171 |
+
jQuery(this).parent().remove();
|
172 |
});
|
173 |
}
|
174 |
|
175 |
+
jQuery.fn.add_block_edit = function () {
|
176 |
this.append('<div class="tnpc-row-edit-block"><i class="fa fa-pencil" ></i></div>');
|
177 |
this.find('.tnpc-row-edit-block i').perform_block_edit();
|
178 |
}
|
179 |
|
180 |
+
jQuery.fn.perform_block_edit = function () {
|
181 |
|
182 |
+
jQuery(".tnpc-row-edit-block").click(function (e) {
|
183 |
e.preventDefault()
|
184 |
});
|
185 |
|
187 |
|
188 |
e.preventDefault();
|
189 |
|
190 |
+
target = jQuery(this).parent().parent().find('.edit-block');
|
191 |
|
192 |
+
jQuery("#tnpc-edit-block .bgcolor").val(target.css("background-color"));
|
193 |
+
jQuery("#tnpc-edit-block .font").val(target.css("font-family"));
|
194 |
|
195 |
+
jQuery('.bgcolor').wpColorPicker({
|
196 |
// change: function (event, ui) {
|
197 |
+
// jQuery('.bgcolor').iris('hide');
|
198 |
// },
|
199 |
});
|
200 |
+
jQuery('.bgcolor').wpColorPicker().iris('color', target.css("background-color"));
|
201 |
|
202 |
// posts block
|
203 |
+
if (jQuery(this).parent().parent().hasClass('tnpc-row-posts')) {
|
204 |
|
205 |
+
jQuery("#tnpc-edit-posts").fadeIn(500);
|
206 |
+
jQuery("#tnpc-edit-posts .tnpc-edit-box").slideDown(500);
|
207 |
|
208 |
} else {
|
209 |
|
210 |
+
jQuery("#tnpc-edit-block").fadeIn(500);
|
211 |
+
jQuery("#tnpc-edit-block .tnpc-edit-box").slideDown(500);
|
212 |
|
213 |
}
|
214 |
|
215 |
+
jQuery("#tnpc-edit-block .tnpc-edit-box-buttons-save").click(function () {
|
216 |
+
jQuery(this).parent().parent().parent().fadeOut(500)
|
217 |
+
jQuery(this).parent().parent().slideUp(500)
|
218 |
|
219 |
+
target.css("background-color", jQuery("#tnpc-edit-block .bgcolor").val());
|
220 |
+
target.css("font-family", jQuery("#tnpc-edit-block .font").val());
|
221 |
|
222 |
});
|
223 |
|
224 |
+
jQuery("#tnpc-edit-posts .tnpc-edit-box-buttons-save").click(function () {
|
225 |
|
226 |
+
jQuery(this).parent().parent().parent().fadeOut(500)
|
227 |
+
jQuery(this).parent().parent().slideUp(500)
|
228 |
var categories = [];
|
229 |
+
jQuery('#tnpc-edit-posts input[name="options[theme_categories][]"]:checked').each(function ()
|
230 |
{
|
231 |
+
categories.push(jQuery(this).val());
|
232 |
});
|
233 |
var data = {
|
234 |
'action': 'tnpc_render',
|
235 |
'b': target.parent().parent().parent().data('block'),
|
236 |
+
'num': jQuery("#tnpc-edit-posts .number").val(),
|
237 |
+
'tags': jQuery("#tnpc-edit-posts .tags").val(),
|
238 |
'categories': categories
|
239 |
};
|
240 |
+
jQuery.post(ajaxurl, data, function (response) {
|
241 |
+
new_row = jQuery(response);
|
242 |
target.parent().before(new_row).remove();
|
243 |
new_row.add_delete();
|
244 |
new_row.add_block_edit();
|
250 |
|
251 |
}
|
252 |
|
253 |
+
jQuery(function () {
|
254 |
|
255 |
// collapse wp menu
|
256 |
+
jQuery('body').addClass('folded');
|
257 |
|
258 |
//Drag & Drop
|
259 |
+
jQuery("#newsletter-builder-area-center-frame-content").sortable({
|
260 |
revert: false,
|
261 |
stop: function (event, ui) {
|
262 |
if (ui.item.hasClass("newsletter-sidebar-buttons-content-tab")) {
|
263 |
+
loading_row = jQuery('<div style="text-align: center; padding: 20px; background-color: #d4d5d6; color: #52BE7F;"><i class="fa fa-cog fa-2x fa-spin" /></div>');
|
264 |
ui.item.before(loading_row);
|
265 |
ui.item.remove();
|
266 |
var data = {
|
267 |
'action': 'tnpc_render',
|
268 |
'b': ui.item.data("file")
|
269 |
};
|
270 |
+
jQuery.post(ajaxurl, data, function (response) {
|
271 |
+
new_row = jQuery(response);
|
272 |
// ui.item.before(new_row);
|
273 |
// ui.item.remove();
|
274 |
loading_row.before(new_row);
|
281 |
}
|
282 |
});
|
283 |
|
284 |
+
jQuery(".tnpc-row").draggable({
|
285 |
connectToSortable: "#newsletter-builder-area-center-frame-content",
|
286 |
//helper: "clone",
|
287 |
revert: false,
|
288 |
handle: ".tnpc-row-move"
|
289 |
});
|
290 |
|
291 |
+
jQuery(".newsletter-sidebar-buttons-content-tab").draggable({
|
292 |
connectToSortable: "#newsletter-builder-area-center-frame-content",
|
293 |
helper: "clone",
|
294 |
revert: false,
|
295 |
start: function () {
|
296 |
+
if (jQuery('.tnpc-row').length)
|
297 |
+
jQuery('.tnpc-row').append('<div class="tnpc-drop-here">Drag&Drop blocks here!</div>');
|
298 |
else
|
299 |
+
jQuery('#newsletter-builder-area-center-frame-content').append('<div class="tnpc-drop-here">Drag&Drop blocks here!</div>');
|
300 |
},
|
301 |
stop: function () {
|
302 |
+
jQuery('.tnpc-drop-here').remove();
|
303 |
}
|
304 |
});
|
305 |
|
306 |
//close edit
|
307 |
+
jQuery(".tnpc-edit-box-buttons-cancel").click(function () {
|
308 |
+
jQuery(this).parent().parent().parent().fadeOut(500)
|
309 |
+
jQuery(this).parent().parent().slideUp(500)
|
310 |
});
|
311 |
|
312 |
// initialize controls
|
313 |
+
jQuery(".tnpc-row").add_delete();
|
314 |
+
jQuery(".tnpc-row").add_block_edit();
|
315 |
+
jQuery(".tnpc-row-edit").hover_edit();
|
316 |
|
317 |
});
|
318 |
|
319 |
function create() {
|
320 |
|
321 |
+
jQuery("#newsletter-preloaded-export").html(jQuery("#newsletter-builder-area-center-frame-content").html());
|
322 |
|
323 |
+
jQuery("#newsletter-preloaded-export .tnpc-row-delete").remove();
|
324 |
+
jQuery("#newsletter-preloaded-export .tnpc-row-edit-block").remove();
|
325 |
+
jQuery("#newsletter-preloaded-export .tnpc-row").removeClass("ui-draggable");
|
326 |
+
// jQuery("#newsletter-preloaded-export .tnpc-row-edit").removeAttr("data-type");
|
327 |
+
// jQuery("#newsletter-preloaded-export .tnpc-row-edit").removeClass("tnpc-row-edit");
|
328 |
+
preload_export_html = jQuery("#newsletter-preloaded-export").html();
|
329 |
|
330 |
if (preload_export_html.indexOf('<style type="text/css">') > -1) {
|
331 |
export_content = preload_export_html;
|
332 |
+
jQuery("#tnpc-edit-export .text").val(export_content);
|
333 |
+
jQuery('#tnpc-form input[name="options[body]"]').attr('value', export_content);
|
334 |
+
jQuery("#tnpc-form").submit();
|
335 |
} else {
|
336 |
+
jQuery.get(ajaxurl, {action: "tnpc_css"}, function (data) {
|
337 |
// export_content = '<style>' + data + '</style><link href="http://fonts.googleapis.com/css?family=Source+Sans+Pro:200,300,400,600,700,900,200italic,300italic,400italic,600italic,700italic,900italic" rel="stylesheet" type="text/css"><link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css"><div id="tnpc-wrapper"><div id="tnpc-wrapper-newsletter">' + preload_export_html + '</div></div>';
|
338 |
export_content = '<!DOCTYPE html><html><head><title>Newsletter</title><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta http-equiv="X-UA-Compatible" content="IE=edge" />';
|
339 |
export_content += '<style type="text/css">' + data + '</style>';
|
342 |
export_content += '</head><body style="margin: 0; padding: 0;">';
|
343 |
export_content += preload_export_html;
|
344 |
export_content += '</body></html>';
|
345 |
+
jQuery("#tnpc-edit-export .text").val(export_content);
|
346 |
+
jQuery('#tnpc-form input[name="options[body]"]').attr('value', export_content);
|
347 |
+
jQuery("#tnpc-form").submit();
|
348 |
});
|
349 |
}
|
350 |
|
351 |
+
jQuery("#newsletter-preloaded-export").html(' ');
|
352 |
|
353 |
}
|
354 |
|
emails/tnp-composer/index.php
CHANGED
@@ -80,7 +80,7 @@ $block_options = get_option('newsletter_main');
|
|
80 |
<script type="text/javascript">
|
81 |
TNP_PLUGIN_URL = "<?php echo NEWSLETTER_URL ?>";
|
82 |
</script>
|
83 |
-
|
84 |
<!--<script type="text/javascript" src="<?php echo plugins_url('newsletter'); ?>/emails/tnp-composer/_scripts/jquery-ui-1.10.4.min.js"></script>-->
|
85 |
<script type="text/javascript" src="<?php echo plugins_url('newsletter'); ?>/emails/tnp-composer/_scripts/newsletter-builder.js"></script>
|
86 |
<script type="text/javascript" src="<?php echo plugins_url('newsletter'); ?>/tinymce4/tinymce.min.js"></script>
|
80 |
<script type="text/javascript">
|
81 |
TNP_PLUGIN_URL = "<?php echo NEWSLETTER_URL ?>";
|
82 |
</script>
|
83 |
+
<!--<script type="text/javascript" src="<?php echo plugins_url('newsletter'); ?>/emails/tnp-composer/_scripts/jquery-2.2.3.min.js"></script>-->
|
84 |
<!--<script type="text/javascript" src="<?php echo plugins_url('newsletter'); ?>/emails/tnp-composer/_scripts/jquery-ui-1.10.4.min.js"></script>-->
|
85 |
<script type="text/javascript" src="<?php echo plugins_url('newsletter'); ?>/emails/tnp-composer/_scripts/newsletter-builder.js"></script>
|
86 |
<script type="text/javascript" src="<?php echo plugins_url('newsletter'); ?>/tinymce4/tinymce.min.js"></script>
|
plugin.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
Plugin Name: Newsletter
|
5 |
Plugin URI: http://www.thenewsletterplugin.com/plugins/newsletter
|
6 |
Description: Newsletter is a cool plugin to create your own subscriber list, to send newsletters, to build your business. <strong>Before update give a look to <a href="http://www.thenewsletterplugin.com/category/release">this page</a> to know what's changed.</strong>
|
7 |
-
Version: 4.5.
|
8 |
Author: Stefano Lissa & The Newsletter Team
|
9 |
Author URI: http://www.thenewsletterplugin.com
|
10 |
Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
|
@@ -14,7 +14,7 @@
|
|
14 |
*/
|
15 |
|
16 |
// Used as dummy parameter on css and js links
|
17 |
-
define('NEWSLETTER_VERSION', '4.5.
|
18 |
|
19 |
global $wpdb, $newsletter;
|
20 |
|
@@ -690,6 +690,7 @@ class Newsletter extends NewsletterModule {
|
|
690 |
}
|
691 |
|
692 |
if ($this->mail_method != null) {
|
|
|
693 |
return call_user_func($this->mail_method, $to, $subject, $message, $headers);
|
694 |
}
|
695 |
|
@@ -701,7 +702,6 @@ class Newsletter extends NewsletterModule {
|
|
701 |
// If still null, we need to use wp_mail()...
|
702 |
|
703 |
$headers = array();
|
704 |
-
$headers[] = 'MIME-Version: 1.0';
|
705 |
$headers[] = 'Content-Type: text/html;charset=UTF-8';
|
706 |
$headers[] = 'From: ' . $this->options['sender_name'] . ' <' . $this->options['sender_email'] . '>';
|
707 |
|
4 |
Plugin Name: Newsletter
|
5 |
Plugin URI: http://www.thenewsletterplugin.com/plugins/newsletter
|
6 |
Description: Newsletter is a cool plugin to create your own subscriber list, to send newsletters, to build your business. <strong>Before update give a look to <a href="http://www.thenewsletterplugin.com/category/release">this page</a> to know what's changed.</strong>
|
7 |
+
Version: 4.5.3
|
8 |
Author: Stefano Lissa & The Newsletter Team
|
9 |
Author URI: http://www.thenewsletterplugin.com
|
10 |
Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
|
14 |
*/
|
15 |
|
16 |
// Used as dummy parameter on css and js links
|
17 |
+
define('NEWSLETTER_VERSION', '4.5.3');
|
18 |
|
19 |
global $wpdb, $newsletter;
|
20 |
|
690 |
}
|
691 |
|
692 |
if ($this->mail_method != null) {
|
693 |
+
$this->logger->debug('mail> alternative mail method found');
|
694 |
return call_user_func($this->mail_method, $to, $subject, $message, $headers);
|
695 |
}
|
696 |
|
702 |
// If still null, we need to use wp_mail()...
|
703 |
|
704 |
$headers = array();
|
|
|
705 |
$headers[] = 'Content-Type: text/html;charset=UTF-8';
|
706 |
$headers[] = 'From: ' . $this->options['sender_name'] . ' <' . $this->options['sender_email'] . '>';
|
707 |
|
readme.txt
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
Tags: newsletter,email,subscription,mass mail,list build,email marketing,direct mailing
|
3 |
Requires at least: 3.4.0
|
4 |
Tested up to: 4.5.2
|
5 |
-
Stable tag: 4.5.
|
6 |
Contributors: satollo,webagile,michael-travan
|
7 |
|
8 |
Add a real newsletter system to your blog. For free. With unlimited newsletters and subscribers.
|
@@ -15,17 +15,17 @@ send and track e-mails, headache-free. It just works out of box!
|
|
15 |
= Main Features =
|
16 |
|
17 |
* NEW **responsive email Drag & Drop composer**
|
18 |
-
* **Unlimited Subscribers** with statistics
|
19 |
* **Unlimited Emails** with tracking
|
20 |
* Customizable **subscription widget**, **page** or **custom form**
|
21 |
* Wordpress User Registration **seamless integration**
|
22 |
* **Single** And **Double Opt-In** plus privacy checkbox for EU laws compliance
|
23 |
* **Subscribers preferences** to fine-target your campaigns
|
24 |
-
* SMTP-Ready
|
25 |
* Customizable Themes
|
26 |
-
* Html and Text versions of Emails
|
27 |
* All messages are **fully translatable** from Admin Panel (no .po/.mo)
|
28 |
-
* Diagnostics Panel to check your blog mailing capability
|
29 |
* **Compatible with Postman, WP Mail SMTP, Easy WP SMTP, Easy SMTP Mail, WP Mail Bank**
|
30 |
|
31 |
= Integration with WordPress registration =
|
@@ -77,13 +77,12 @@ Thank you, The Newsletter Team
|
|
77 |
|
78 |
== Changelog ==
|
79 |
|
80 |
-
= 4.5.
|
81 |
|
|
|
82 |
* Escape fix
|
83 |
-
|
84 |
-
= 4.5.1 =
|
85 |
-
|
86 |
* Warning fix
|
|
|
87 |
|
88 |
= 4.5.0 =
|
89 |
|
2 |
Tags: newsletter,email,subscription,mass mail,list build,email marketing,direct mailing
|
3 |
Requires at least: 3.4.0
|
4 |
Tested up to: 4.5.2
|
5 |
+
Stable tag: 4.5.3
|
6 |
Contributors: satollo,webagile,michael-travan
|
7 |
|
8 |
Add a real newsletter system to your blog. For free. With unlimited newsletters and subscribers.
|
15 |
= Main Features =
|
16 |
|
17 |
* NEW **responsive email Drag & Drop composer**
|
18 |
+
* **Unlimited Subscribers** with statistics
|
19 |
* **Unlimited Emails** with tracking
|
20 |
* Customizable **subscription widget**, **page** or **custom form**
|
21 |
* Wordpress User Registration **seamless integration**
|
22 |
* **Single** And **Double Opt-In** plus privacy checkbox for EU laws compliance
|
23 |
* **Subscribers preferences** to fine-target your campaigns
|
24 |
+
* SMTP-Ready
|
25 |
* Customizable Themes
|
26 |
+
* Html and Text versions of Emails
|
27 |
* All messages are **fully translatable** from Admin Panel (no .po/.mo)
|
28 |
+
* Diagnostics Panel to check your blog mailing capability
|
29 |
* **Compatible with Postman, WP Mail SMTP, Easy WP SMTP, Easy SMTP Mail, WP Mail Bank**
|
30 |
|
31 |
= Integration with WordPress registration =
|
77 |
|
78 |
== Changelog ==
|
79 |
|
80 |
+
= 4.5.3 =
|
81 |
|
82 |
+
* jQuery conflict fix
|
83 |
* Escape fix
|
|
|
|
|
|
|
84 |
* Warning fix
|
85 |
+
* Fixed the mime header
|
86 |
|
87 |
= 4.5.0 =
|
88 |
|