Version Description
- Added translation: Slovenian
- Fixed bug in Dutch translation. See: https://wordpress.org/support/topic/saving-changes-to-the-email-template
- Added support for WpMandrill. See: https://wordpress.org/support/topic/plug-in-does-not-sent-html-mail-only-text
Download this release
Release Info
Developer | nlemoine |
Plugin | WP Better Emails |
Version | 0.2.7 |
Comparing to | |
See all releases |
Code changes from version 0.2.6.6 to 0.2.7
- langs/wp-better-emails-nl_NL.mo +0 -0
- langs/wp-better-emails-nl_NL.po +11 -11
- langs/wp-better-emails-sl_SI.mo +0 -0
- langs/wp-better-emails-sl_SI.po +296 -0
- readme.txt +18 -9
- wpbe.php +90 -49
langs/wp-better-emails-nl_NL.mo
CHANGED
Binary file
|
langs/wp-better-emails-nl_NL.po
CHANGED
@@ -2,14 +2,14 @@ msgid ""
|
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: WP Better Emails\n"
|
4 |
"POT-Creation-Date: 2014-06-02 09:06+0100\n"
|
5 |
-
"PO-Revision-Date: 2014-
|
6 |
-
"Last-Translator:
|
7 |
"Language-Team: Blue Cloud Company <info@bluecloudcompany.com>\n"
|
8 |
"Language: nl\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"X-Generator: Poedit 1.6.
|
13 |
"X-Poedit-Basepath: ..\n"
|
14 |
"X-Poedit-SourceCharset: UTF-8\n"
|
15 |
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
|
@@ -76,7 +76,7 @@ msgid ""
|
|
76 |
"the <a href=\"#\" class=\"wpbe_help\">help tab</a> for further information."
|
77 |
msgstr ""
|
78 |
"Bewerk het HTML-sjabloon als je deze wilt aanpassen. Je kan een kijkje nemen "
|
79 |
-
"op het<a href=\"#\" class=\"wpbe_help\">
|
80 |
|
81 |
#: wpbe-options.php:33
|
82 |
msgid "Plain-text Template"
|
@@ -89,8 +89,8 @@ msgid ""
|
|
89 |
"information."
|
90 |
msgstr ""
|
91 |
"Bewerk het platte tekst-sjabloon als je deze wilt aanpassen. Je kan een "
|
92 |
-
"kijkje nemen op het<a href=\"#\" class=\"wpbe_help\">
|
93 |
-
"
|
94 |
|
95 |
#: wpbe-options.php:40
|
96 |
msgid "Preview"
|
@@ -124,7 +124,7 @@ msgid ""
|
|
124 |
"email me at : <a href=\"%1$s\">%2$s</a>"
|
125 |
msgstr ""
|
126 |
"Als je een idee hebt om deze plugin te verbeteren of een wil je een bug te "
|
127 |
-
"melden, stuur dan een email naar: <a href=\"%1$s\">%2$s</
|
128 |
|
129 |
#: wpbe-options.php:64
|
130 |
#, php-format
|
@@ -133,7 +133,7 @@ msgid ""
|
|
133 |
"<a href=\"%s\" target=\"_blank\" rel=\"external\">donation</a>."
|
134 |
msgstr ""
|
135 |
"Waarder je deze plugin? Gebruik je het in een zakelijke context? Overweeg "
|
136 |
-
"dan een <a href=\"%s\" target=\"_blank\" rel=\"external\">
|
137 |
|
138 |
#: wpbe-options.php:65
|
139 |
#, php-format
|
@@ -144,8 +144,8 @@ msgid ""
|
|
144 |
"repository."
|
145 |
msgstr ""
|
146 |
"Je kunt ondersteuning bieden door <a href=\"%1$s\" target=\"_blank\"> te "
|
147 |
-
"stemmen</a> en / of te zeggen dat <a href=\"%2$s\" target=\"_blank\">
|
148 |
-
"werkt
|
149 |
"repository."
|
150 |
|
151 |
#: wpbe.php:147
|
@@ -256,7 +256,7 @@ msgid ""
|
|
256 |
"NOTE: The content tag is <strong>required</strong>, WP Better Emails will be "
|
257 |
"automatically desactivated if no content tag is found."
|
258 |
msgstr ""
|
259 |
-
"OPMERKING: De inhoud tag is <strong>vereist</
|
260 |
"automatisch gedeactiveerd als er geen inhoud tag is gevonden."
|
261 |
|
262 |
#: wpbe.php:498
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: WP Better Emails\n"
|
4 |
"POT-Creation-Date: 2014-06-02 09:06+0100\n"
|
5 |
+
"PO-Revision-Date: 2014-10-02 10:37+0100\n"
|
6 |
+
"Last-Translator: \n"
|
7 |
"Language-Team: Blue Cloud Company <info@bluecloudcompany.com>\n"
|
8 |
"Language: nl\n"
|
9 |
"MIME-Version: 1.0\n"
|
10 |
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Generator: Poedit 1.6.9\n"
|
13 |
"X-Poedit-Basepath: ..\n"
|
14 |
"X-Poedit-SourceCharset: UTF-8\n"
|
15 |
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
|
76 |
"the <a href=\"#\" class=\"wpbe_help\">help tab</a> for further information."
|
77 |
msgstr ""
|
78 |
"Bewerk het HTML-sjabloon als je deze wilt aanpassen. Je kan een kijkje nemen "
|
79 |
+
"op het<a href=\"#\" class=\"wpbe_help\">help tab</a> voor meer informatie."
|
80 |
|
81 |
#: wpbe-options.php:33
|
82 |
msgid "Plain-text Template"
|
89 |
"information."
|
90 |
msgstr ""
|
91 |
"Bewerk het platte tekst-sjabloon als je deze wilt aanpassen. Je kan een "
|
92 |
+
"kijkje nemen op het<a href=\"#\" class=\"wpbe_help\">help tab</a> voor meer "
|
93 |
+
"informatie."
|
94 |
|
95 |
#: wpbe-options.php:40
|
96 |
msgid "Preview"
|
124 |
"email me at : <a href=\"%1$s\">%2$s</a>"
|
125 |
msgstr ""
|
126 |
"Als je een idee hebt om deze plugin te verbeteren of een wil je een bug te "
|
127 |
+
"melden, stuur dan een email naar: <a href=\"%1$s\">%2$s</a>"
|
128 |
|
129 |
#: wpbe-options.php:64
|
130 |
#, php-format
|
133 |
"<a href=\"%s\" target=\"_blank\" rel=\"external\">donation</a>."
|
134 |
msgstr ""
|
135 |
"Waarder je deze plugin? Gebruik je het in een zakelijke context? Overweeg "
|
136 |
+
"dan een <a href=\"%s\" target=\"_blank\" rel=\"external\">donatie</a>."
|
137 |
|
138 |
#: wpbe-options.php:65
|
139 |
#, php-format
|
144 |
"repository."
|
145 |
msgstr ""
|
146 |
"Je kunt ondersteuning bieden door <a href=\"%1$s\" target=\"_blank\"> te "
|
147 |
+
"stemmen</a> en / of te zeggen dat <a href=\"%2$s\" target=\"_blank\">het "
|
148 |
+
"werkt</a> voor jouw WordPress installatie op de officiële WordPress plugins "
|
149 |
"repository."
|
150 |
|
151 |
#: wpbe.php:147
|
256 |
"NOTE: The content tag is <strong>required</strong>, WP Better Emails will be "
|
257 |
"automatically desactivated if no content tag is found."
|
258 |
msgstr ""
|
259 |
+
"OPMERKING: De inhoud tag is <strong>vereist</strong>, WP Beter Emails wordt "
|
260 |
"automatisch gedeactiveerd als er geen inhoud tag is gevonden."
|
261 |
|
262 |
#: wpbe.php:498
|
langs/wp-better-emails-sl_SI.mo
ADDED
Binary file
|
langs/wp-better-emails-sl_SI.po
ADDED
@@ -0,0 +1,296 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: WP Better Emails\n"
|
4 |
+
"POT-Creation-Date: 2013-08-25 16:40+0100\n"
|
5 |
+
"PO-Revision-Date: 2014-08-07 21:30+0100\n"
|
6 |
+
"Last-Translator: \n"
|
7 |
+
"Language-Team: <odisey.nfo@gmail.com>\n"
|
8 |
+
"MIME-Version: 1.0\n"
|
9 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
+
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"X-Generator: Poedit 1.6.7\n"
|
12 |
+
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;"
|
13 |
+
"_n_noop:1,2;_c;_nc:4c,1,2;_x:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_ex:1,2c;"
|
14 |
+
"esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
|
15 |
+
"X-Poedit-Basepath: .\n"
|
16 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
17 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
18 |
+
"Language: sl_SI\n"
|
19 |
+
"X-Poedit-SearchPath-0: .\n"
|
20 |
+
"X-Poedit-SearchPath-1: ..\n"
|
21 |
+
|
22 |
+
#: ../wpbe-options.php:2 ../wpbe.php:186
|
23 |
+
msgid "Email settings"
|
24 |
+
msgstr "nastavitve e-pošte"
|
25 |
+
|
26 |
+
#: ../wpbe-options.php:8
|
27 |
+
msgid "Sender Options"
|
28 |
+
msgstr "Možnosti Pošiljanja"
|
29 |
+
|
30 |
+
#: ../wpbe-options.php:9
|
31 |
+
msgid ""
|
32 |
+
"Set your own sender name and email address. Default WordPress values will be "
|
33 |
+
"used if empty."
|
34 |
+
msgstr ""
|
35 |
+
"Nastavite svoje ime in e-poštni naslov za pošiljanje. Če boste pustili "
|
36 |
+
"prazno se bo uporabljala privzeta vrednost WordPress."
|
37 |
+
|
38 |
+
#: ../wpbe-options.php:12
|
39 |
+
msgid "Name"
|
40 |
+
msgstr "Ime"
|
41 |
+
|
42 |
+
#: ../wpbe-options.php:16
|
43 |
+
msgid "Email address"
|
44 |
+
msgstr "E-poštni naslov"
|
45 |
+
|
46 |
+
#: ../wpbe-options.php:22
|
47 |
+
msgid "HTML Template"
|
48 |
+
msgstr "HTML Predloga"
|
49 |
+
|
50 |
+
#: ../wpbe-options.php:24
|
51 |
+
msgid "Live template preview"
|
52 |
+
msgstr "Predogled Predloge"
|
53 |
+
|
54 |
+
#: ../wpbe-options.php:24
|
55 |
+
msgid "Live preview"
|
56 |
+
msgstr "Predogled"
|
57 |
+
|
58 |
+
#: ../wpbe-options.php:27
|
59 |
+
msgid ""
|
60 |
+
"Edit the HTML template if you want to customize it. You might have a look at "
|
61 |
+
"the <a href=\"#\" class=\"wpbe_help\">help tab</a> for further information."
|
62 |
+
msgstr ""
|
63 |
+
"Če želite spremeniti HTML predloge, boste morda morali pogledati na <a href="
|
64 |
+
"\"#\" class=\"wpbe_help\">zavihek pomoč</a> za dodatne informacije."
|
65 |
+
|
66 |
+
#: ../wpbe-options.php:33
|
67 |
+
msgid "Plain-text Template"
|
68 |
+
msgstr "Navadna Predloga Besedila "
|
69 |
+
|
70 |
+
#: ../wpbe-options.php:34
|
71 |
+
msgid ""
|
72 |
+
"Edit the plain-text template if you want to customize it. You might have a "
|
73 |
+
"look at the <a href=\"#\" class=\"wpbe_help\">help tab</a> for further "
|
74 |
+
"information."
|
75 |
+
msgstr ""
|
76 |
+
"Če želite spremeniti predloge navadnega besedila, boste morda morali "
|
77 |
+
"pogledati na <a href=\"#\" class=\"wpbe_help\">zavihek pomoč</a> za dodatne "
|
78 |
+
"informacije."
|
79 |
+
|
80 |
+
#: ../wpbe-options.php:40
|
81 |
+
msgid "Preview"
|
82 |
+
msgstr "Predogled"
|
83 |
+
|
84 |
+
#: ../wpbe-options.php:45
|
85 |
+
msgid "Send an email preview to"
|
86 |
+
msgstr "Pošljite email s predogledom na"
|
87 |
+
|
88 |
+
#: ../wpbe-options.php:49
|
89 |
+
msgid "Send"
|
90 |
+
msgstr "Pošlji"
|
91 |
+
|
92 |
+
#: ../wpbe-options.php:51
|
93 |
+
msgid "You must save your template before sending an email preview."
|
94 |
+
msgstr "Pred predogled morate shraniti predlogo za pošiljanje email."
|
95 |
+
|
96 |
+
#: ../wpbe-options.php:56
|
97 |
+
msgid "Save Changes"
|
98 |
+
msgstr "Shrani Spremembe"
|
99 |
+
|
100 |
+
#: ../wpbe-options.php:61
|
101 |
+
msgid "Support & bug report"
|
102 |
+
msgstr "Podpora in prijava hrošča"
|
103 |
+
|
104 |
+
#: ../wpbe-options.php:62
|
105 |
+
#, php-format
|
106 |
+
msgid ""
|
107 |
+
"If you have any idea to improve this plugin or any bug to report, please "
|
108 |
+
"email me at : <a href=\"%1$s\">%2$s</a>"
|
109 |
+
msgstr ""
|
110 |
+
"Če imate kakšno idejo, da bi izboljšali ta vtičnik ali javili kakršno koli "
|
111 |
+
"napako mi prosim pošljite email na : <a href=\"%1$s\">%2$s</a>"
|
112 |
+
|
113 |
+
#: ../wpbe-options.php:64
|
114 |
+
#, php-format
|
115 |
+
msgid ""
|
116 |
+
"You like this plugin ? You use it in a business context ? Please, consider a "
|
117 |
+
"<a href=\"%s\" target=\"_blank\" rel=\"external\">donation</a>."
|
118 |
+
msgstr ""
|
119 |
+
"Vam je všeč ta vtičnik ? Ga uporabljate v poslovnem okolju? Prosimo, "
|
120 |
+
"premislite o <a href=\"%s\" target=\"_blank\" rel=\"external\">donaciji</a>."
|
121 |
+
|
122 |
+
#: ../wpbe-options.php:65
|
123 |
+
#, php-format
|
124 |
+
msgid ""
|
125 |
+
"You can still provide some support by <a href=\"%1$s\" target=\"_blank"
|
126 |
+
"\">voting for it</a> and/or says that <a href=\"%2$s\" target=\"_blank\">it "
|
127 |
+
"works</a> for your WordPress installation on the official WordPress plugins "
|
128 |
+
"repository."
|
129 |
+
msgstr ""
|
130 |
+
"Še vedno lahko ponudite nekaj podpore z <a href=\"%1$s\" target=\"_blank"
|
131 |
+
"\">glasovanjem</a> in/ali rečete, da <a href=\"%2$s\" target=\"_blank"
|
132 |
+
"\">deluje</a> za vaše WordPress namestitev na uradnem WordPress plugins "
|
133 |
+
"repozitoriju."
|
134 |
+
|
135 |
+
#: ../wpbe.php:156
|
136 |
+
msgid "Settings"
|
137 |
+
msgstr "Nastavitve"
|
138 |
+
|
139 |
+
#: ../wpbe.php:174
|
140 |
+
msgid "WP Better Emails requires WordPress 2.8 or newer."
|
141 |
+
msgstr "WP Better Emails potrebuje WordPress 2.8 ali novejši."
|
142 |
+
|
143 |
+
#: ../wpbe.php:174
|
144 |
+
msgid "Upgrade your Wordpress installation."
|
145 |
+
msgstr "Posodobite vaš Wordpress."
|
146 |
+
|
147 |
+
#: ../wpbe.php:186
|
148 |
+
msgid "WP Better Emails"
|
149 |
+
msgstr "WP Better Emails"
|
150 |
+
|
151 |
+
#: ../wpbe.php:263
|
152 |
+
msgid "Please enter a valid sender email address."
|
153 |
+
msgstr "Vnesite veljaven e-poštni naslov pošiljatelja."
|
154 |
+
|
155 |
+
#: ../wpbe.php:276
|
156 |
+
msgid "Template is empty"
|
157 |
+
msgstr "Predloga je prazna"
|
158 |
+
|
159 |
+
#: ../wpbe.php:280
|
160 |
+
msgid "No content tag found. The %content% tag is required in your template"
|
161 |
+
msgstr "Nisem našel tag vsebine. Tag %content% je potreben v predlogi."
|
162 |
+
|
163 |
+
#: ../wpbe.php:289
|
164 |
+
msgid "Plain-text template is empty"
|
165 |
+
msgstr "Predloga navadeno besedilno je prazna"
|
166 |
+
|
167 |
+
#: ../wpbe.php:293
|
168 |
+
msgid ""
|
169 |
+
"No content tag found. The %content% tag is required in your plain-text "
|
170 |
+
"template"
|
171 |
+
msgstr ""
|
172 |
+
"Nisem našel tag vsebine. Tag %content% je potreben v predlogi navadeno "
|
173 |
+
"besedilno."
|
174 |
+
|
175 |
+
#: ../wpbe.php:317
|
176 |
+
msgid "Please enter an email"
|
177 |
+
msgstr "Vnesite email"
|
178 |
+
|
179 |
+
#: ../wpbe.php:320
|
180 |
+
msgid "Please enter a valid email"
|
181 |
+
msgstr "Vnesite veljaven e-mail:"
|
182 |
+
|
183 |
+
#: ../wpbe.php:323
|
184 |
+
msgid "Hey !"
|
185 |
+
msgstr "Hej !"
|
186 |
+
|
187 |
+
#: ../wpbe.php:325
|
188 |
+
msgid "This is a sample email to test your HTML template."
|
189 |
+
msgstr "To je vzorec emaila, da preizkusite vašo HTML predlogo."
|
190 |
+
|
191 |
+
#: ../wpbe.php:327
|
192 |
+
msgid ""
|
193 |
+
"If you're not skilled in HTML/CSS email coding, I strongly recommend to "
|
194 |
+
"leave the default template as it is. It has been tested on various and "
|
195 |
+
"popular email clients like Gmail, Yahoo Mail, Hotmail/Live, Thunderbird, "
|
196 |
+
"Apple Mail, Outlook, and many more."
|
197 |
+
msgstr ""
|
198 |
+
"Če niste strokovnjak s HTML / CSS email kodiranjem močno priporočamo, da "
|
199 |
+
"pustite privzeto predlogo kot je. Ta je bil testiran na različnih in "
|
200 |
+
"priljubljenih odjemalcev elektronske pošte, kot so Gmail, Yahoo Mail, "
|
201 |
+
"Hotmail / Live, Firefox, Apple Mail, Outlook, in še veliko več."
|
202 |
+
|
203 |
+
#: ../wpbe.php:329
|
204 |
+
msgid ""
|
205 |
+
"If you have any problems or any suggestions to improve this plugin, please "
|
206 |
+
"let me know."
|
207 |
+
msgstr ""
|
208 |
+
"Če imate kakršne koli težave ali predloge za izboljšanje tega vtičnika, nam "
|
209 |
+
"to sporočite."
|
210 |
+
|
211 |
+
#: ../wpbe.php:333
|
212 |
+
msgid "Email template preview"
|
213 |
+
msgstr "Predogled Email predloge"
|
214 |
+
|
215 |
+
#: ../wpbe.php:334
|
216 |
+
#, php-format
|
217 |
+
msgid "An email preview has been successfully sent to %s"
|
218 |
+
msgstr "Predogled emaila je bil uspešno poslan na %s"
|
219 |
+
|
220 |
+
#: ../wpbe.php:336
|
221 |
+
msgid ""
|
222 |
+
"An error occured while sending email. Please check your server configuration."
|
223 |
+
msgstr ""
|
224 |
+
"Med pošiljanjem emaila je prišlo do napake. Prosimo, da preverite nastavitev "
|
225 |
+
"strežnika."
|
226 |
+
|
227 |
+
#: ../wpbe.php:503
|
228 |
+
msgid "Some dynamic tags can be included in your email template :"
|
229 |
+
msgstr "Nekateri dinamični tagi so lahko vključeni v vašo e-poštno predlogo:"
|
230 |
+
|
231 |
+
#: ../wpbe.php:505
|
232 |
+
msgid "<strong>%content%</strong> : will be replaced with the message content."
|
233 |
+
msgstr "<strong>%content%</strong> : bo spremenjen z vašim sporočilom."
|
234 |
+
|
235 |
+
#: ../wpbe.php:506
|
236 |
+
msgid ""
|
237 |
+
"NOTE: The content tag is <strong>required</strong>, WP Better Emails will be "
|
238 |
+
"automatically desactivated if no content tag is found."
|
239 |
+
msgstr ""
|
240 |
+
"OPOMBA: tag vsebina je <strong>obvezna</strong>, WP Better Emails bo "
|
241 |
+
"samodejno deaktiviran, če se ugotovi, da ni tag vsebine."
|
242 |
+
|
243 |
+
#: ../wpbe.php:507
|
244 |
+
msgid "<strong>%blog_url%</strong> : will be replaced with your blog URL."
|
245 |
+
msgstr "<strong>%blog_url%</strong> : bo spremenjen z vašim blog URL naslovom."
|
246 |
+
|
247 |
+
#: ../wpbe.php:508
|
248 |
+
msgid "<strong>%home_url%</strong> : will be replaced with your home URL."
|
249 |
+
msgstr "<strong>%home_url%</strong> : bo spremenjen z vašim URL naslovom."
|
250 |
+
|
251 |
+
#: ../wpbe.php:509
|
252 |
+
msgid "<strong>%blog_name%</strong> : will be replaced with your blog name."
|
253 |
+
msgstr "<strong>%blog_name%</strong> : bo spremenjen z vašim blog imenom."
|
254 |
+
|
255 |
+
#: ../wpbe.php:510
|
256 |
+
msgid ""
|
257 |
+
"<strong>%blog_description%</strong> : will be replaced with your blog "
|
258 |
+
"description."
|
259 |
+
msgstr ""
|
260 |
+
"<strong>%blog_description%</strong> : bo spremenjen z vašim blog opisom."
|
261 |
+
|
262 |
+
#: ../wpbe.php:511
|
263 |
+
msgid "<strong>%admin_email%</strong> : will be replaced with admin email."
|
264 |
+
msgstr "<strong>%admin_email%</strong> : bo spremenjen z admin emailom."
|
265 |
+
|
266 |
+
#: ../wpbe.php:512
|
267 |
+
msgid ""
|
268 |
+
"<strong>%date%</strong> : will be replaced with current date, as formatted "
|
269 |
+
"in <a href=\"options-general.php\">general options</a>."
|
270 |
+
msgstr ""
|
271 |
+
"<strong>%time%</strong> : bo zamenjan s trenutnim datumom, kot je oblikovano "
|
272 |
+
"v <a href=\"options-general.php\">splošne možnosti</a>."
|
273 |
+
|
274 |
+
#: ../wpbe.php:513
|
275 |
+
msgid ""
|
276 |
+
"<strong>%time%</strong> : will be replaced with current time, as formatted "
|
277 |
+
"in <a href=\"options-general.php\">general options</a>."
|
278 |
+
msgstr ""
|
279 |
+
"<strong>%time%</strong> : bo zamenjan s trenutnim časom, kot je oblikovano v "
|
280 |
+
"<a href=\"options-general.php\">splošne možnosti</a>."
|
281 |
+
|
282 |
+
#: ../templates/template-1.php:38
|
283 |
+
msgid "Date"
|
284 |
+
msgstr "Datum"
|
285 |
+
|
286 |
+
#: ../templates/template-1.php:38
|
287 |
+
msgid "Email sent"
|
288 |
+
msgstr "Email poslan"
|
289 |
+
|
290 |
+
#: ../templates/template-1.php:39
|
291 |
+
msgid "Contact"
|
292 |
+
msgstr "Kontakt"
|
293 |
+
|
294 |
+
#: ../templates/template-1.php:39
|
295 |
+
msgid "For any requests, please contact"
|
296 |
+
msgstr "Za vse prošnje, prosimo kontaktirajte"
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=7Q49V
|
|
3 |
Tags: email, emails, html emails, templates, notification, wp_mail, wpmu, multisite
|
4 |
Requires at least: 2.8
|
5 |
Tested up to: 4.0
|
6 |
-
Stable tag: 0.2.
|
7 |
|
8 |
Adds a customizable good looking HTML template to all WP default text/plain emails and lets you set
|
9 |
a custom sender name and email address.
|
@@ -19,6 +19,7 @@ nicely in your recipient mailbox. But you can of course design your own.
|
|
19 |
* WP Better Emails lets you send sample emails to test and preview your own custom HTML email template.
|
20 |
* Watch your HTML email template during editing with the live preview.
|
21 |
* Fancy HTML editor with CodeMirror syntax highlighting.
|
|
|
22 |
* All emails sent by this plugin are sent as 'multipart' so that email clients that don't support HTML can read them.
|
23 |
* Include some dynamic tags in your template such as your blog URL, home URL, blog name, blog description, admin email or date and time. They will all be
|
24 |
replaced when sending the email.
|
@@ -51,6 +52,7 @@ WP Better Emails is currently available in :
|
|
51 |
* Spanish - [Kaled Kelevra](http://howly-mowly.com/ "Kaled Kelevra")
|
52 |
* Swedish - [Andréas Lundgren](http://adevade.com/ "Andréas Lundgren")
|
53 |
* Dutch - [Paul Romijn](http://www.bluecloudcompany.com/)
|
|
|
54 |
|
55 |
I'm looking for translators to extend to other languages. If you have translated the plugin in your language or want to,
|
56 |
please let me know : wpbetteremails [ at ] helloni.co
|
@@ -135,14 +137,20 @@ You can place this function in your functions.php theme file or in a plugin.
|
|
135 |
|
136 |
== Changelog ==
|
137 |
|
|
|
|
|
|
|
|
|
|
|
|
|
138 |
= 0.2.6.6 =
|
139 |
|
140 |
-
*
|
141 |
|
142 |
= 0.2.6.5 =
|
143 |
|
144 |
* Fixed editor (WordPress 3.9 compatibility issue)
|
145 |
-
*
|
146 |
|
147 |
= 0.2.6.4 =
|
148 |
|
@@ -150,11 +158,11 @@ You can place this function in your functions.php theme file or in a plugin.
|
|
150 |
|
151 |
= 0.2.6.3 =
|
152 |
|
153 |
-
*
|
154 |
|
155 |
= 0.2.6.2 =
|
156 |
|
157 |
-
*
|
158 |
* Fixed translation: Arabic, Farsi
|
159 |
|
160 |
= 0.2.6.1 =
|
@@ -171,7 +179,7 @@ You can place this function in your functions.php theme file or in a plugin.
|
|
171 |
|
172 |
* Added plain text template support
|
173 |
* Fixed phpmailer_init action
|
174 |
-
* Brazilian portuguese translation
|
175 |
|
176 |
= 0.2.4.1 =
|
177 |
|
@@ -190,7 +198,7 @@ You can place this function in your functions.php theme file or in a plugin.
|
|
190 |
= 0.2.2 =
|
191 |
|
192 |
* Added 3.3 compatibility
|
193 |
-
* Turkish translation
|
194 |
|
195 |
= 0.2.1 =
|
196 |
|
@@ -203,7 +211,7 @@ You can place this function in your functions.php theme file or in a plugin.
|
|
203 |
* Live preview (> WP 3.1)
|
204 |
* Include filter to add your own tag replacements
|
205 |
* Help moved to contextual help
|
206 |
-
*
|
207 |
* Improved template email clients support
|
208 |
|
209 |
= 0.1.3 =
|
@@ -215,7 +223,8 @@ You can place this function in your functions.php theme file or in a plugin.
|
|
215 |
* Dutch translation
|
216 |
|
217 |
= 0.1.1 =
|
218 |
-
* French translation
|
219 |
|
220 |
= 0.1 =
|
221 |
* WP Better Emails first release
|
|
3 |
Tags: email, emails, html emails, templates, notification, wp_mail, wpmu, multisite
|
4 |
Requires at least: 2.8
|
5 |
Tested up to: 4.0
|
6 |
+
Stable tag: 0.2.7
|
7 |
|
8 |
Adds a customizable good looking HTML template to all WP default text/plain emails and lets you set
|
9 |
a custom sender name and email address.
|
19 |
* WP Better Emails lets you send sample emails to test and preview your own custom HTML email template.
|
20 |
* Watch your HTML email template during editing with the live preview.
|
21 |
* Fancy HTML editor with CodeMirror syntax highlighting.
|
22 |
+
* Supports WpMandrill plugin
|
23 |
* All emails sent by this plugin are sent as 'multipart' so that email clients that don't support HTML can read them.
|
24 |
* Include some dynamic tags in your template such as your blog URL, home URL, blog name, blog description, admin email or date and time. They will all be
|
25 |
replaced when sending the email.
|
52 |
* Spanish - [Kaled Kelevra](http://howly-mowly.com/ "Kaled Kelevra")
|
53 |
* Swedish - [Andréas Lundgren](http://adevade.com/ "Andréas Lundgren")
|
54 |
* Dutch - [Paul Romijn](http://www.bluecloudcompany.com/)
|
55 |
+
* Slovenian - Primož Troha
|
56 |
|
57 |
I'm looking for translators to extend to other languages. If you have translated the plugin in your language or want to,
|
58 |
please let me know : wpbetteremails [ at ] helloni.co
|
137 |
|
138 |
== Changelog ==
|
139 |
|
140 |
+
= 0.2.7 =
|
141 |
+
|
142 |
+
* Added translation: Slovenian
|
143 |
+
* Fixed bug in Dutch translation. See: https://wordpress.org/support/topic/saving-changes-to-the-email-template
|
144 |
+
* Added support for WpMandrill. See: https://wordpress.org/support/topic/plug-in-does-not-sent-html-mail-only-text
|
145 |
+
|
146 |
= 0.2.6.6 =
|
147 |
|
148 |
+
* Added translation: Dutch
|
149 |
|
150 |
= 0.2.6.5 =
|
151 |
|
152 |
* Fixed editor (WordPress 3.9 compatibility issue)
|
153 |
+
* Added translation: Swedish
|
154 |
|
155 |
= 0.2.6.4 =
|
156 |
|
158 |
|
159 |
= 0.2.6.3 =
|
160 |
|
161 |
+
* Added translation: Spanish
|
162 |
|
163 |
= 0.2.6.2 =
|
164 |
|
165 |
+
* Added translation: Indonesian
|
166 |
* Fixed translation: Arabic, Farsi
|
167 |
|
168 |
= 0.2.6.1 =
|
179 |
|
180 |
* Added plain text template support
|
181 |
* Fixed phpmailer_init action
|
182 |
+
* Added Brazilian portuguese translation
|
183 |
|
184 |
= 0.2.4.1 =
|
185 |
|
198 |
= 0.2.2 =
|
199 |
|
200 |
* Added 3.3 compatibility
|
201 |
+
* Added Turkish translation
|
202 |
|
203 |
= 0.2.1 =
|
204 |
|
211 |
* Live preview (> WP 3.1)
|
212 |
* Include filter to add your own tag replacements
|
213 |
* Help moved to contextual help
|
214 |
+
* Added translations for german, hebrew
|
215 |
* Improved template email clients support
|
216 |
|
217 |
= 0.1.3 =
|
223 |
* Dutch translation
|
224 |
|
225 |
= 0.1.1 =
|
226 |
+
* Added French translation
|
227 |
|
228 |
= 0.1 =
|
229 |
* WP Better Emails first release
|
230 |
+
|
wpbe.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: WP Better Emails
|
4 |
Plugin URI: http://wordpress.org/extend/plugins/wp-better-emails/
|
5 |
Description: Beautify the default text/plain WP mails into fully customizable HTML emails.
|
6 |
-
Version: 0.2.
|
7 |
Author: ArtyShow
|
8 |
Author URI: http://wordpress.org/extend/plugins/wp-better-emails/
|
9 |
License: GPLv2
|
@@ -54,8 +54,9 @@ if ( ! class_exists( 'WP_Better_Emails' ) ) {
|
|
54 |
// Front end filter
|
55 |
add_filter( 'wp_mail_from_name', array( $this, 'set_from_name' ) );
|
56 |
add_filter( 'wp_mail_from', array( $this, 'set_from_email' ) );
|
57 |
-
add_filter( 'wp_mail_content_type', array( $this, 'set_content_type'), 100 );
|
58 |
-
add_action('phpmailer_init',
|
|
|
59 |
|
60 |
if ( ! is_admin() )
|
61 |
return;
|
@@ -80,6 +81,7 @@ if ( ! class_exists( 'WP_Better_Emails' ) ) {
|
|
80 |
add_filter( 'mce_external_plugins', array( $this, 'tinymce_plugins' ) );
|
81 |
add_filter( 'mce_buttons', array( $this, 'tinymce_buttons' ) );
|
82 |
add_filter( 'tiny_mce_before_init', array( $this, 'tinymce_config' ) );
|
|
|
83 |
}
|
84 |
|
85 |
/**
|
@@ -100,7 +102,7 @@ if ( ! class_exists( 'WP_Better_Emails' ) ) {
|
|
100 |
|
101 |
// HTML default template
|
102 |
$template = '';
|
103 |
-
@require
|
104 |
|
105 |
// Plain-text default template
|
106 |
$plaintext = '%content%
|
@@ -140,7 +142,7 @@ For any requests, please contact %admin_email%';
|
|
140 |
*
|
141 |
* @since 0.1
|
142 |
*
|
143 |
-
* @param array
|
144 |
* @return array Plugins links with settings added
|
145 |
*/
|
146 |
function settings_link( $links ) {
|
@@ -176,7 +178,7 @@ For any requests, please contact %admin_email%';
|
|
176 |
function admin_menu() {
|
177 |
$this->page = add_options_page( __( 'Email settings', 'wp-better-emails' ), __( 'WP Better Emails', 'wp-better-emails' ), 'administrator', 'wpbe_options', array( $this, 'admin_page' ) );
|
178 |
|
179 |
-
add_action('admin_print_scripts-' . $this->page, array( $this, 'admin_print_script' ) );
|
180 |
add_action( 'admin_print_styles-' . $this->page, array( $this, 'admin_print_style' ) );
|
181 |
}
|
182 |
|
@@ -235,14 +237,14 @@ For any requests, please contact %admin_email%';
|
|
235 |
function admin_page() {
|
236 |
global $wp_version;
|
237 |
|
238 |
-
require
|
239 |
}
|
240 |
|
241 |
/**
|
242 |
* Sanitize each option value
|
243 |
*
|
244 |
* @since 0.1
|
245 |
-
* @param array
|
246 |
* @return array $input Sanitized values
|
247 |
*/
|
248 |
function validate_options( $input ) {
|
@@ -266,7 +268,7 @@ For any requests, please contact %admin_email%';
|
|
266 |
if ( empty( $input['template'] ) ) {
|
267 |
add_settings_error( 'wpbe_options', 'settings_updated', __( 'Template is empty', 'wp-better-emails' ) );
|
268 |
|
269 |
-
|
270 |
} elseif ( strpos( $input['template'], '%content%' ) === false ) {
|
271 |
add_settings_error( 'wpbe_options', 'settings_updated', __( 'No content tag found. The %content% tag is required in your template', 'wp-better-emails' ) );
|
272 |
}
|
@@ -279,7 +281,7 @@ For any requests, please contact %admin_email%';
|
|
279 |
if ( empty( $input['plaintext_template'] ) ) {
|
280 |
add_settings_error( 'wpbe_options', 'settings_updated', __( 'Plain-text template is empty', 'wp-better-emails' ) );
|
281 |
|
282 |
-
|
283 |
} elseif ( strpos( $input['plaintext_template'], '%content%' ) === false ) {
|
284 |
add_settings_error( 'wpbe_options', 'settings_updated', __( 'No content tag found. The %content% tag is required in your plain-text template', 'wp-better-emails' ) );
|
285 |
}
|
@@ -305,7 +307,7 @@ For any requests, please contact %admin_email%';
|
|
305 |
$preview_email = sanitize_email( $_POST['preview_email'] );
|
306 |
|
307 |
if ( empty( $preview_email ) )
|
308 |
-
die( '<div class="error"><p>' . __( 'Please enter an email', 'wp-better-emails') . '</p></div>' );
|
309 |
|
310 |
if ( ! is_email( $preview_email ) )
|
311 |
die( '<div class="error"><p>' . __( 'Please enter a valid email', 'wp-better-emails' ) . '</p></div>' );
|
@@ -321,7 +323,7 @@ For any requests, please contact %admin_email%';
|
|
321 |
$message .= "\r\n\r\n";
|
322 |
|
323 |
// Send the preview email
|
324 |
-
if ( wp_mail( $preview_email, '[' . wp_specialchars_decode( get_option('blogname'), ENT_QUOTES ) . '] - ' . __( 'Email template preview', 'wp-better-emails' ), $message ) ) {
|
325 |
die( '<div class="updated"><p>' . sprintf( __( 'An email preview has been successfully sent to %s' , 'wp-better-emails' ), esc_attr( $preview_email ) ) . '</p></div>' );
|
326 |
} else {
|
327 |
die( '<div class="error"><p>' . __( 'An error occured while sending email. Please check your server configuration.', 'wp-better-emails' ) . '</p></div>' );
|
@@ -337,24 +339,21 @@ For any requests, please contact %admin_email%';
|
|
337 |
*/
|
338 |
function template_vars_replacement( $template ) {
|
339 |
|
340 |
-
|
341 |
-
|
342 |
$to_replace = array(
|
343 |
-
'blog_url' => get_option('siteurl'),
|
344 |
-
'home_url' => get_option('home'),
|
345 |
-
'blog_name' => get_option('blogname'),
|
346 |
-
'blog_description' => get_option('blogdescription'),
|
347 |
-
'admin_email' => get_option('admin_email'),
|
348 |
-
'date' => date_i18n(get_option('date_format')),
|
349 |
-
'time' => date_i18n(get_option('time_format'))
|
350 |
);
|
351 |
-
$to_replace = apply_filters('wpbe_tags', $to_replace);
|
352 |
|
353 |
foreach ( $to_replace as $tag => $var ) {
|
354 |
$template = str_replace( '%' . $tag . '%', $var, $template );
|
355 |
}
|
356 |
|
357 |
-
|
358 |
return $template;
|
359 |
}
|
360 |
|
@@ -400,7 +399,7 @@ For any requests, please contact %admin_email%';
|
|
400 |
* @return string
|
401 |
*/
|
402 |
function set_from_email( $from_email ) {
|
403 |
-
if ( ! empty( $this->options['from_email']) && is_email( $this->options['from_email'] ) )
|
404 |
return $this->options['from_email'];
|
405 |
|
406 |
return $from_email;
|
@@ -431,13 +430,28 @@ For any requests, please contact %admin_email%';
|
|
431 |
// Only convert if the message is text/plain and the template is ok
|
432 |
if ( $content_type == 'text/plain' && $this->check_template() === true ) {
|
433 |
$this->send_as_html = true;
|
434 |
-
|
435 |
} else {
|
436 |
$this->send_as_html = false;
|
437 |
}
|
438 |
return $content_type;
|
439 |
}
|
440 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
441 |
/**
|
442 |
* Add the email template and set it as multipart.
|
443 |
*
|
@@ -445,30 +459,60 @@ For any requests, please contact %admin_email%';
|
|
445 |
* @param object $phpmailer
|
446 |
*/
|
447 |
function send_html( $phpmailer ) {
|
448 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
449 |
// Decode body
|
450 |
-
$
|
451 |
|
452 |
// Add plain-text template to message
|
453 |
-
$
|
454 |
|
455 |
// Replace variables in email
|
456 |
-
$
|
457 |
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
462 |
|
463 |
-
|
464 |
-
|
465 |
|
466 |
-
|
467 |
-
|
468 |
|
469 |
-
|
470 |
-
|
471 |
-
|
|
|
|
|
|
|
|
|
472 |
|
473 |
}
|
474 |
|
@@ -610,15 +654,15 @@ For any requests, please contact %admin_email%';
|
|
610 |
global $wp_version;
|
611 |
|
612 |
if ( version_compare( $wp_version, '3.2.1', '<=' ) ) {
|
613 |
-
|
614 |
<textarea id="wpbe_template" class="wpbe_template" name="wpbe_options[template]" cols="80" rows="10"><?php echo $this->options['template']; ?></textarea>
|
615 |
<?php
|
616 |
} else {
|
617 |
// WP >= 3.3
|
618 |
$settings = array(
|
619 |
-
'wpautop'
|
620 |
-
'editor_class'
|
621 |
-
'quicktags'
|
622 |
'textarea_name' => 'wpbe_options[template]'
|
623 |
);
|
624 |
|
@@ -632,10 +676,8 @@ For any requests, please contact %admin_email%';
|
|
632 |
* @since 0.2.x
|
633 |
*/
|
634 |
function plaintext_template_editor() {
|
635 |
-
|
636 |
-
|
637 |
-
<textarea id="wpbe_plaintext_template" class="wpbe_template" name="wpbe_options[plaintext_template]" cols="120" rows="10"><?php echo $this->options['plaintext_template']; ?></textarea>
|
638 |
-
|
639 |
<?php
|
640 |
}
|
641 |
|
@@ -647,4 +689,3 @@ if ( class_exists( 'WP_Better_Emails' ) ) {
|
|
647 |
$wp_better_emails = new WP_Better_Emails();
|
648 |
register_activation_hook( __FILE__, array( $wp_better_emails, 'install' ) );
|
649 |
}
|
650 |
-
?>
|
3 |
Plugin Name: WP Better Emails
|
4 |
Plugin URI: http://wordpress.org/extend/plugins/wp-better-emails/
|
5 |
Description: Beautify the default text/plain WP mails into fully customizable HTML emails.
|
6 |
+
Version: 0.2.7
|
7 |
Author: ArtyShow
|
8 |
Author URI: http://wordpress.org/extend/plugins/wp-better-emails/
|
9 |
License: GPLv2
|
54 |
// Front end filter
|
55 |
add_filter( 'wp_mail_from_name', array( $this, 'set_from_name' ) );
|
56 |
add_filter( 'wp_mail_from', array( $this, 'set_from_email' ) );
|
57 |
+
add_filter( 'wp_mail_content_type', array( $this, 'set_content_type' ), 100 );
|
58 |
+
add_action( 'phpmailer_init', array( $this, 'send_html' ) );
|
59 |
+
add_filter( 'mandrill_payload', array( $this, 'wpmandrill_compatibility' ) );
|
60 |
|
61 |
if ( ! is_admin() )
|
62 |
return;
|
81 |
add_filter( 'mce_external_plugins', array( $this, 'tinymce_plugins' ) );
|
82 |
add_filter( 'mce_buttons', array( $this, 'tinymce_buttons' ) );
|
83 |
add_filter( 'tiny_mce_before_init', array( $this, 'tinymce_config' ) );
|
84 |
+
|
85 |
}
|
86 |
|
87 |
/**
|
102 |
|
103 |
// HTML default template
|
104 |
$template = '';
|
105 |
+
@require 'templates/template-1.php';
|
106 |
|
107 |
// Plain-text default template
|
108 |
$plaintext = '%content%
|
142 |
*
|
143 |
* @since 0.1
|
144 |
*
|
145 |
+
* @param array $links Plugin links
|
146 |
* @return array Plugins links with settings added
|
147 |
*/
|
148 |
function settings_link( $links ) {
|
178 |
function admin_menu() {
|
179 |
$this->page = add_options_page( __( 'Email settings', 'wp-better-emails' ), __( 'WP Better Emails', 'wp-better-emails' ), 'administrator', 'wpbe_options', array( $this, 'admin_page' ) );
|
180 |
|
181 |
+
add_action( 'admin_print_scripts-' . $this->page, array( $this, 'admin_print_script' ) );
|
182 |
add_action( 'admin_print_styles-' . $this->page, array( $this, 'admin_print_style' ) );
|
183 |
}
|
184 |
|
237 |
function admin_page() {
|
238 |
global $wp_version;
|
239 |
|
240 |
+
require 'wpbe-options.php';
|
241 |
}
|
242 |
|
243 |
/**
|
244 |
* Sanitize each option value
|
245 |
*
|
246 |
* @since 0.1
|
247 |
+
* @param array $input The options returned by the options page
|
248 |
* @return array $input Sanitized values
|
249 |
*/
|
250 |
function validate_options( $input ) {
|
268 |
if ( empty( $input['template'] ) ) {
|
269 |
add_settings_error( 'wpbe_options', 'settings_updated', __( 'Template is empty', 'wp-better-emails' ) );
|
270 |
|
271 |
+
// Check if %content% tag is the template body
|
272 |
} elseif ( strpos( $input['template'], '%content%' ) === false ) {
|
273 |
add_settings_error( 'wpbe_options', 'settings_updated', __( 'No content tag found. The %content% tag is required in your template', 'wp-better-emails' ) );
|
274 |
}
|
281 |
if ( empty( $input['plaintext_template'] ) ) {
|
282 |
add_settings_error( 'wpbe_options', 'settings_updated', __( 'Plain-text template is empty', 'wp-better-emails' ) );
|
283 |
|
284 |
+
// Check if %content% tag is the template body
|
285 |
} elseif ( strpos( $input['plaintext_template'], '%content%' ) === false ) {
|
286 |
add_settings_error( 'wpbe_options', 'settings_updated', __( 'No content tag found. The %content% tag is required in your plain-text template', 'wp-better-emails' ) );
|
287 |
}
|
307 |
$preview_email = sanitize_email( $_POST['preview_email'] );
|
308 |
|
309 |
if ( empty( $preview_email ) )
|
310 |
+
die( '<div class="error"><p>' . __( 'Please enter an email', 'wp-better-emails' ) . '</p></div>' );
|
311 |
|
312 |
if ( ! is_email( $preview_email ) )
|
313 |
die( '<div class="error"><p>' . __( 'Please enter a valid email', 'wp-better-emails' ) . '</p></div>' );
|
323 |
$message .= "\r\n\r\n";
|
324 |
|
325 |
// Send the preview email
|
326 |
+
if ( wp_mail( $preview_email, '[' . wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ) . '] - ' . __( 'Email template preview', 'wp-better-emails' ), $message ) ) {
|
327 |
die( '<div class="updated"><p>' . sprintf( __( 'An email preview has been successfully sent to %s' , 'wp-better-emails' ), esc_attr( $preview_email ) ) . '</p></div>' );
|
328 |
} else {
|
329 |
die( '<div class="error"><p>' . __( 'An error occured while sending email. Please check your server configuration.', 'wp-better-emails' ) . '</p></div>' );
|
339 |
*/
|
340 |
function template_vars_replacement( $template ) {
|
341 |
|
|
|
|
|
342 |
$to_replace = array(
|
343 |
+
'blog_url' => get_option( 'siteurl' ),
|
344 |
+
'home_url' => get_option( 'home' ),
|
345 |
+
'blog_name' => get_option( 'blogname' ),
|
346 |
+
'blog_description' => get_option( 'blogdescription' ),
|
347 |
+
'admin_email' => get_option( 'admin_email' ),
|
348 |
+
'date' => date_i18n( get_option( 'date_format' ) ),
|
349 |
+
'time' => date_i18n( get_option( 'time_format' ) )
|
350 |
);
|
351 |
+
$to_replace = apply_filters( 'wpbe_tags', $to_replace );
|
352 |
|
353 |
foreach ( $to_replace as $tag => $var ) {
|
354 |
$template = str_replace( '%' . $tag . '%', $var, $template );
|
355 |
}
|
356 |
|
|
|
357 |
return $template;
|
358 |
}
|
359 |
|
399 |
* @return string
|
400 |
*/
|
401 |
function set_from_email( $from_email ) {
|
402 |
+
if ( ! empty( $this->options['from_email'] ) && is_email( $this->options['from_email'] ) )
|
403 |
return $this->options['from_email'];
|
404 |
|
405 |
return $from_email;
|
430 |
// Only convert if the message is text/plain and the template is ok
|
431 |
if ( $content_type == 'text/plain' && $this->check_template() === true ) {
|
432 |
$this->send_as_html = true;
|
433 |
+
return $content_type = 'text/html';
|
434 |
} else {
|
435 |
$this->send_as_html = false;
|
436 |
}
|
437 |
return $content_type;
|
438 |
}
|
439 |
|
440 |
+
/**
|
441 |
+
* Make templating compatible with WpMandrill
|
442 |
+
* @since 0.2.7
|
443 |
+
* @param array $message
|
444 |
+
* @return array
|
445 |
+
*/
|
446 |
+
function wpmandrill_compatibility( $message ) {
|
447 |
+
|
448 |
+
if ( $this->check_template() ) {
|
449 |
+
$message['html'] = $this->process_email_html( $message['html'] );
|
450 |
+
}
|
451 |
+
|
452 |
+
return $message;
|
453 |
+
}
|
454 |
+
|
455 |
/**
|
456 |
* Add the email template and set it as multipart.
|
457 |
*
|
459 |
* @param object $phpmailer
|
460 |
*/
|
461 |
function send_html( $phpmailer ) {
|
462 |
+
|
463 |
+
$phpmailer->AltBody = $this->process_email_text( $phpmailer->AltBody );
|
464 |
+
|
465 |
+
if ( $this->send_as_html ) {
|
466 |
+
$phpmailer->Body = $this->process_email_html( $phpmailer->Body );
|
467 |
+
}
|
468 |
+
|
469 |
+
}
|
470 |
+
|
471 |
+
/**
|
472 |
+
* Process the text version of the message
|
473 |
+
*
|
474 |
+
* @since 0.2.7
|
475 |
+
* @param string $message
|
476 |
+
* @return string
|
477 |
+
*/
|
478 |
+
function process_email_text( $message ) {
|
479 |
+
|
480 |
+
$message = strip_tags( $message );
|
481 |
+
|
482 |
// Decode body
|
483 |
+
$message = wp_specialchars_decode( $message, ENT_QUOTES );
|
484 |
|
485 |
// Add plain-text template to message
|
486 |
+
$message = $this->set_email_template( $message, 'plaintext_template' );
|
487 |
|
488 |
// Replace variables in email
|
489 |
+
$message = apply_filters( 'wpbe_plaintext_body', $this->template_vars_replacement( $message ) );
|
490 |
|
491 |
+
return $message;
|
492 |
+
}
|
493 |
+
|
494 |
+
/**
|
495 |
+
* Process the HTML version of the message
|
496 |
+
*
|
497 |
+
* @since 0.2.7
|
498 |
+
* @param string $message
|
499 |
+
* @return string
|
500 |
+
*/
|
501 |
+
function process_email_html( $message ) {
|
502 |
|
503 |
+
// Clean < and > around text links in WP 3.1
|
504 |
+
$message = $this->esc_textlinks( $message );
|
505 |
|
506 |
+
// Convert line breaks & make links clickable
|
507 |
+
$message = nl2br( make_clickable( $message ) );
|
508 |
|
509 |
+
// Add template to message
|
510 |
+
$message = $this->set_email_template( $message );
|
511 |
+
|
512 |
+
// Replace variables in email
|
513 |
+
$message = apply_filters( 'wpbe_html_body', $this->template_vars_replacement( $message ) );
|
514 |
+
|
515 |
+
return $message;
|
516 |
|
517 |
}
|
518 |
|
654 |
global $wp_version;
|
655 |
|
656 |
if ( version_compare( $wp_version, '3.2.1', '<=' ) ) {
|
657 |
+
?>
|
658 |
<textarea id="wpbe_template" class="wpbe_template" name="wpbe_options[template]" cols="80" rows="10"><?php echo $this->options['template']; ?></textarea>
|
659 |
<?php
|
660 |
} else {
|
661 |
// WP >= 3.3
|
662 |
$settings = array(
|
663 |
+
'wpautop' => false,
|
664 |
+
'editor_class' => 'wpbe_template',
|
665 |
+
'quicktags' => false,
|
666 |
'textarea_name' => 'wpbe_options[template]'
|
667 |
);
|
668 |
|
676 |
* @since 0.2.x
|
677 |
*/
|
678 |
function plaintext_template_editor() {
|
679 |
+
?>
|
680 |
+
<textarea id="wpbe_plaintext_template" class="wpbe_template" name="wpbe_options[plaintext_template]" cols="120" rows="10"><?php echo $this->options['plaintext_template']; ?></textarea>
|
|
|
|
|
681 |
<?php
|
682 |
}
|
683 |
|
689 |
$wp_better_emails = new WP_Better_Emails();
|
690 |
register_activation_hook( __FILE__, array( $wp_better_emails, 'install' ) );
|
691 |
}
|
|