Easy Watermark - Version 0.3

Version Description

  • added support for all image sizes (thumbnail, medium, large), not only the fullsize image
  • plugin now checks if the GD library is available, if not, it'll inform you about it instead of throw errors
Download this release

Release Info

Developer szaleq
Plugin Icon Easy Watermark
Version 0.3
Comparing to
See all releases

Code changes from version 0.2.3 to 0.3

css/style.css CHANGED
@@ -15,10 +15,6 @@
15
background:url(../images/select2.png) 50% 50%;
16
}
17
18
- #donation-link {
19
- float:right;
20
- }
21
-
22
#text-preview {
23
margin: 4px 0;
24
}
@@ -90,3 +86,15 @@ label#alignment-8-label {
90
label#alignment-9-label {
91
background-position: -162px -122px;
92
}
15
background:url(../images/select2.png) 50% 50%;
16
}
17
18
#text-preview {
19
margin: 4px 0;
20
}
86
label#alignment-9-label {
87
background-position: -162px -122px;
88
}
89
+
90
+ #icon-easy-watermark {
91
+ background: url(../images/icon-32.png) no-repeat 2px 1px;
92
+ }
93
+
94
+ .form-table {
95
+ clear:none!important;
96
+ }
97
+
98
+ #ew-font optgroup {
99
+ margin:0;
100
+ }
donation-link.php DELETED
@@ -1,11 +0,0 @@
1
- <?php defined('EASY_WATERMARK') or die(); ?>
2
-
3
- <div id="donation-link" style="float:right;">
4
- <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
5
- <input type="hidden" name="cmd" value="_s-xclick">
6
- <input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----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-----END PKCS7-----
7
- ">
8
- <input type="image" src="https://www.paypalobjects.com/en_GB/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal – The safer, easier way to pay online.">
9
- <img alt="" border="0" src="https://www.paypalobjects.com/pl_PL/i/scr/pixel.gif" width="1" height="1">
10
- </form>
11
- </div><!-- #donation-link -->
images/icon-32.png ADDED
Binary file
index.php CHANGED
@@ -2,7 +2,7 @@
2
/*
3
Plugin Name: Easy Watermark
4
Description: This plugin can automatically add image and text watermark to pictures as they are uploaded to wordpress media library. You can also watermark existing images manually (all at once or an every single image). Watermark image can be a png, gif (alpha channel supported in both cases) or jpg. It's also possibile to set watermark opacity (doesn't apply to png with alpha channel). For text watermark you can select font, set color, size, angel and opacity.
5
- Version: 0.2.3
6
Author: Wojtek Szałkiewicz
7
Author URI: http://szalkiewicz.pl/
8
License: GPLv2 or later
@@ -14,11 +14,17 @@ if(is_admin()){
14
// Define flag, that we have plugin loaded
15
define('EASY_WATERMARK', true);
16
17
// Require all needed files
18
- require_once dirname(__FILE__) . '/plugin.php';
19
- require_once dirname(__FILE__) . '/EasyWatermark.php';
20
- require_once dirname(__FILE__) . '/EasyWatermarkPlugin.php';
21
- require_once dirname(__FILE__) . '/EasyWatermarkSettings.php';
22
23
// Initiate plugin
24
EasyWatermarkPlugin::init();
2
/*
3
Plugin Name: Easy Watermark
4
Description: This plugin can automatically add image and text watermark to pictures as they are uploaded to wordpress media library. You can also watermark existing images manually (all at once or an every single image). Watermark image can be a png, gif (alpha channel supported in both cases) or jpg. It's also possibile to set watermark opacity (doesn't apply to png with alpha channel). For text watermark you can select font, set color, size, angel and opacity.
5
+ Version: 0.3
6
Author: Wojtek Szałkiewicz
7
Author URI: http://szalkiewicz.pl/
8
License: GPLv2 or later
14
// Define flag, that we have plugin loaded
15
define('EASY_WATERMARK', true);
16
17
+ define('EWDS', DIRECTORY_SEPARATOR);
18
+ define('EWBASE', dirname(__FILE__));
19
+ define('EWLIB', EWBASE . EWDS . 'lib');
20
+ define('EWVIEWS', EWBASE . EWDS . 'views');
21
+
22
// Require all needed files
23
+ require_once EWLIB . EWDS . 'EWPlugable.php';
24
+ require_once EWLIB . EWDS . 'EWPlugin.php';
25
+ require_once EWLIB . EWDS . 'EasyWatermark.php';
26
+ require_once EWLIB . EWDS . 'EasyWatermarkPlugin.php';
27
+ require_once EWLIB . EWDS . 'EasyWatermarkSettings.php';
28
29
// Initiate plugin
30
EasyWatermarkPlugin::init();
languages/easy-watermark-pl_PL.mo CHANGED
Binary file
languages/easy-watermark-pl_PL.po CHANGED
@@ -1,9 +1,9 @@
1
msgid ""
2
msgstr ""
3
- "Project-Id-Version: Easy Watermark 0.2.3\n"
4
"Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2013-04-06 23:53+0100\n"
6
- "PO-Revision-Date: 2013-04-06 23:53+0100\n"
7
"Last-Translator: Wojtek Szałkiewicz <wojtek@szalkiewicz.pl>\n"
8
"Language-Team: Wojtek Szałkiewicz <wojtek@szalkiewicz.pl>\n"
9
"Language: Polish\n"
@@ -11,223 +11,274 @@ msgstr ""
11
"Content-Type: text/plain; charset=UTF-8\n"
12
"Content-Transfer-Encoding: 8bit\n"
13
14
- #: /media/szaleq/Data/easy-watermark/trunk/EasyWatermarkPlugin.php:159
15
- #: /media/szaleq/Data/easy-watermark/trunk/EasyWatermarkPlugin.php:446
16
msgid "Watermark successfully added."
17
msgstr "Znak wodny został dodany."
18
19
- #: /media/szaleq/Data/easy-watermark/trunk/EasyWatermarkPlugin.php:166
20
msgid "Invalid mime type."
21
msgstr "Błędny typ mime."
22
23
- #: /media/szaleq/Data/easy-watermark/trunk/EasyWatermarkPlugin.php:169
24
msgid "No watermark image selected and no watermark text set."
25
msgstr "Nie ustawiono obrazu ani tekstu znaku wodnego."
26
27
- #: /media/szaleq/Data/easy-watermark/trunk/EasyWatermarkPlugin.php:171
28
msgid "Go to settings page"
29
msgstr "Przejdź do ustawień"
30
31
- #: /media/szaleq/Data/easy-watermark/trunk/EasyWatermarkPlugin.php:175
32
msgid "An error has occurred."
33
msgstr "Wystąpił błąd."
34
35
- #: /media/szaleq/Data/easy-watermark/trunk/EasyWatermarkPlugin.php:194
36
- #: /media/szaleq/Data/easy-watermark/trunk/EasyWatermarkPlugin.php:195
37
msgid "Add Watermark"
38
msgstr "Dodaj znak wodny"
39
40
- #: /media/szaleq/Data/easy-watermark/trunk/EasyWatermarkPlugin.php:209
41
- #: /media/szaleq/Data/easy-watermark/trunk/EasyWatermarkPlugin.php:225
42
msgid "Add watermark"
43
msgstr "Dodaj znak wodny"
44
45
- #: /media/szaleq/Data/easy-watermark/trunk/EasyWatermarkPlugin.php:358
46
#, php-format
47
msgid "Not supported mime type of %s. Skipping..."
48
msgstr "Nieobsługiwany typ pliku %s. Omijanie..."
49
50
- #: /media/szaleq/Data/easy-watermark/trunk/EasyWatermarkPlugin.php:363
51
#, php-format
52
msgid "Watermark successfully added to %s"
53
msgstr "Znak wodny dodany do %s"
54
55
- #: /media/szaleq/Data/easy-watermark/trunk/EasyWatermarkPlugin.php:439
56
- #: /media/szaleq/Data/easy-watermark/trunk/EasyWatermarkSettings.php:89
57
msgid "Easy Watermark"
58
msgstr ""
59
60
- #: /media/szaleq/Data/easy-watermark/trunk/EasyWatermarkPlugin.php:446
61
msgid "Go to Media Library"
62
msgstr "Idź do biblioteki mediów"
63
64
- #: /media/szaleq/Data/easy-watermark/trunk/EasyWatermarkPlugin.php:458
65
msgid "Add watermark to all images"
66
msgstr "Dodaj znak wodny do wszystkich obrazów"
67
68
- #: /media/szaleq/Data/easy-watermark/trunk/EasyWatermarkPlugin.php:458
69
msgid "Be carefull with that option. If some images alredy has watermark, it will be added though."
70
msgstr "Bądź ostrożny używając tej opcji. Jeśli któreś zdjęcia posiadają już znak wodny, zostanie on dodany po raz drugi."
71
72
- #: /media/szaleq/Data/easy-watermark/trunk/EasyWatermarkSettings.php:74
73
msgid "General"
74
msgstr "Ogólne"
75
76
- #: /media/szaleq/Data/easy-watermark/trunk/EasyWatermarkSettings.php:75
77
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-general.php:16
78
msgid "Image"
79
msgstr "Obraz"
80
81
- #: /media/szaleq/Data/easy-watermark/trunk/EasyWatermarkSettings.php:76
82
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-general.php:17
83
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-text.php:3
84
msgid "Text"
85
msgstr "Tekst"
86
87
- #: /media/szaleq/Data/easy-watermark/trunk/EasyWatermarkSettings.php:255
88
msgid "Settings"
89
msgstr "Ustawienia"
90
91
- #: /media/szaleq/Data/easy-watermark/trunk/EasyWatermarkSettings.php:269
92
msgid "Donate"
93
msgstr "Przekaż dotację"
94
95
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-general.php:3
96
- msgid "Auto watermark"
97
msgstr "Automatyczne dodawanie"
98
99
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-general.php:4
100
msgid "Add watermark when uploading images"
101
msgstr "Dodawaj znak wodny podczas wgrywania obrazów"
102
103
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-general.php:6
104
- msgid "Image types"
105
msgstr "Typy obrazów"
106
107
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-general.php:10
108
msgid "Select image types which should be watermarked"
109
msgstr "Zaznacz typy obrazów, które mają być oznaczane znakiem wodnym"
110
111
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-general.php:13
112
msgid "Watermark Type"
113
msgstr "Typ znaku wodnego"
114
115
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-general.php:18
116
msgid "Image + Text"
117
msgstr "Obraz i tekst"
118
119
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-general.php:20
120
msgid "Choose, whether to apply image, text, or both."
121
msgstr "Wybierz, czy jako znak wodny zastosować obraz, tekst, czy tekst z obrazem."
122
123
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-image.php:3
124
msgid "Watermark image"
125
msgstr "Znak wodny"
126
127
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-image.php:8
128
msgid "Choose Watermark Image"
129
msgstr "Wybierz znak wodny"
130
131
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-image.php:8
132
msgid "Set as Watermark Image"
133
msgstr "Ustaw jako znak wodny"
134
135
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-image.php:8
136
msgid "Select/Upload Image"
137
msgstr "Wybierz/wgraj obraz"
138
139
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-image.php:8
140
msgid "Note: If you want to upload a new image, make sure that \"Auto watermark\" option is unticked or text watermark is not set. Otherwise uploaded image will be watermarked."
141
msgstr "Uwaga: Jeśli chcesz wgrać nowy obraz, upewnij się, że opcja \"Automatyczne dodawanie\" jest odznaczona, lub tekstowy znak wodny nie jest ustawiony. W przeciwnym wypadku wgrywany obraz zostanie oznaczony znakiem wodnym."
142
143
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-image.php:17
144
msgid "Loading preview..."
145
msgstr "Ładowanie podglądu..."
146
147
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-image.php:18
148
msgid "Click on image to change it."
149
msgstr "Kliknij na obraz by go zmienić."
150
151
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-image.php:18
152
msgid "Remove image"
153
msgstr "Usuń obraz"
154
155
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-image.php:19
156
msgid "Note: If you want to upload a new image, make sure that \"Auto watermark\" option is unticked, or remove current image and unset text watermark first. Otherwise uploaded image will be watermarked."
157
msgstr "Uwaga: Jeśli chcesz wgrać nowy obraz, upewnij się, że opcja \"Automatyczne dodawanie\" jest odznaczona, lub usuń bieżący obraz i zresetuj tekstowy znak wodny. W przeciwnym wypadku wgrywany obraz zostanie oznaczony znakiem wodnym."
158
159
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-image.php:22
160
msgid "Image alignment"
161
msgstr "Wyrównanie obrazu"
162
163
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-image.php:35
164
msgid "Image offset"
165
msgstr "Offset obrazu"
166
167
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-image.php:36
168
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-text.php:26
169
msgid "x"
170
msgstr ""
171
172
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-image.php:38
173
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-text.php:28
174
msgid "y"
175
msgstr ""
176
177
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-image.php:39
178
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-text.php:29
179
msgid "Offset can be defined in pixels (just numeric value) or as percentage (e.g. '33%')"
180
msgstr "Offset może być ustawiony w pikselach (po porstu numer) lub procentowo (np. '33%')"
181
182
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-image.php:41
183
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-text.php:53
184
msgid "Opacity"
185
msgstr "Nieprzezroczystość"
186
187
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-image.php:41
188
- msgid "Opacity does not affect the png images with opacity chanel."
189
msgstr "Ta opcja nie dotyczy obrazów png posiadających kanał alfa."
190
191
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-text.php:7
192
msgid "Preview"
193
msgstr "Podgląd"
194
195
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-text.php:12
196
msgid "Text alignment"
197
msgstr "Wyrównanie tekstu"
198
199
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-text.php:25
200
msgid "Text offset"
201
msgstr "Offset tekstu"
202
203
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-text.php:31
204
msgid "Font"
205
msgstr "Czcionka"
206
207
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-text.php:42
208
msgid "Text color"
209
msgstr "Kolor tekstu"
210
211
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-text.php:45
212
msgid "Text size"
213
msgstr "Rozmiar tekstu"
214
215
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-text.php:49
216
msgid "Text angle"
217
msgstr "Kąt obrotu tekstu"
218
219
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form.php:2
220
msgid "Easy Watermark Settings"
221
msgstr "Ustawienia Easy Watermark"
222
223
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form.php:5
224
- msgid "Go to Easy Watermark Tool"
225
- msgstr "Przejdź do Easy Watermark"
226
-
227
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form.php:21
228
msgid "Save Changes"
229
msgstr "Zapisz zmiany"
230
231
#~ msgid "Go back"
232
#~ msgstr "Wróć"
233
1
msgid ""
2
msgstr ""
3
+ "Project-Id-Version: Easy Watermark 0.3\n"
4
"Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2013-04-18 00:02+0100\n"
6
+ "PO-Revision-Date: 2013-04-18 00:06+0100\n"
7
"Last-Translator: Wojtek Szałkiewicz <wojtek@szalkiewicz.pl>\n"
8
"Language-Team: Wojtek Szałkiewicz <wojtek@szalkiewicz.pl>\n"
9
"Language: Polish\n"
11
"Content-Type: text/plain; charset=UTF-8\n"
12
"Content-Transfer-Encoding: 8bit\n"
13
14
+ #: /media/szaleq/Data/easy-watermark/trunk/lib/EasyWatermarkPlugin.php:182
15
+ #: /media/szaleq/Data/easy-watermark/trunk/lib/EasyWatermarkPlugin.php:524
16
msgid "Watermark successfully added."
17
msgstr "Znak wodny został dodany."
18
19
+ #: /media/szaleq/Data/easy-watermark/trunk/lib/EasyWatermarkPlugin.php:189
20
msgid "Invalid mime type."
21
msgstr "Błędny typ mime."
22
23
+ #: /media/szaleq/Data/easy-watermark/trunk/lib/EasyWatermarkPlugin.php:192
24
msgid "No watermark image selected and no watermark text set."
25
msgstr "Nie ustawiono obrazu ani tekstu znaku wodnego."
26
27
+ #: /media/szaleq/Data/easy-watermark/trunk/lib/EasyWatermarkPlugin.php:194
28
msgid "Go to settings page"
29
msgstr "Przejdź do ustawień"
30
31
+ #: /media/szaleq/Data/easy-watermark/trunk/lib/EasyWatermarkPlugin.php:198
32
msgid "An error has occurred."
33
msgstr "Wystąpił błąd."
34
35
+ #: /media/szaleq/Data/easy-watermark/trunk/lib/EasyWatermarkPlugin.php:204
36
+ msgid "Easy Watermark is active, but requires GD library to work. Please enable this extension."
37
+ msgstr "Easy Watermark jest aktywny, ale wymaga biblioteki GD do działania. Proszę, włącz to rozszerzenie."
38
+
39
+ #: /media/szaleq/Data/easy-watermark/trunk/lib/EasyWatermarkPlugin.php:204
40
+ msgid "Read more"
41
+ msgstr "Czytaj więcej"
42
+
43
+ #: /media/szaleq/Data/easy-watermark/trunk/lib/EasyWatermarkPlugin.php:224
44
+ #: /media/szaleq/Data/easy-watermark/trunk/lib/EasyWatermarkPlugin.php:225
45
msgid "Add Watermark"
46
msgstr "Dodaj znak wodny"
47
48
+ #: /media/szaleq/Data/easy-watermark/trunk/lib/EasyWatermarkPlugin.php:240
49
+ #: /media/szaleq/Data/easy-watermark/trunk/lib/EasyWatermarkPlugin.php:256
50
msgid "Add watermark"
51
msgstr "Dodaj znak wodny"
52
53
+ #: /media/szaleq/Data/easy-watermark/trunk/lib/EasyWatermarkPlugin.php:395
54
#, php-format
55
msgid "Not supported mime type of %s. Skipping..."
56
msgstr "Nieobsługiwany typ pliku %s. Omijanie..."
57
58
+ #: /media/szaleq/Data/easy-watermark/trunk/lib/EasyWatermarkPlugin.php:400
59
#, php-format
60
msgid "Watermark successfully added to %s"
61
msgstr "Znak wodny dodany do %s"
62
63
+ #: /media/szaleq/Data/easy-watermark/trunk/lib/EasyWatermarkPlugin.php:517
64
+ #: /media/szaleq/Data/easy-watermark/trunk/lib/EasyWatermarkSettings.php:97
65
msgid "Easy Watermark"
66
msgstr ""
67
68
+ #: /media/szaleq/Data/easy-watermark/trunk/lib/EasyWatermarkPlugin.php:524
69
msgid "Go to Media Library"
70
msgstr "Idź do biblioteki mediów"
71
72
+ #: /media/szaleq/Data/easy-watermark/trunk/lib/EasyWatermarkPlugin.php:534
73
msgid "Add watermark to all images"
74
msgstr "Dodaj znak wodny do wszystkich obrazów"
75
76
+ #: /media/szaleq/Data/easy-watermark/trunk/lib/EasyWatermarkPlugin.php:534
77
msgid "Be carefull with that option. If some images alredy has watermark, it will be added though."
78
msgstr "Bądź ostrożny używając tej opcji. Jeśli któreś zdjęcia posiadają już znak wodny, zostanie on dodany po raz drugi."
79
80
+ #: /media/szaleq/Data/easy-watermark/trunk/lib/EasyWatermarkSettings.php:77
81
msgid "General"
82
msgstr "Ogólne"
83
84
+ #: /media/szaleq/Data/easy-watermark/trunk/lib/EasyWatermarkSettings.php:78
85
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-general.php:24
86
msgid "Image"
87
msgstr "Obraz"
88
89
+ #: /media/szaleq/Data/easy-watermark/trunk/lib/EasyWatermarkSettings.php:79
90
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-general.php:25
91
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-text.php:3
92
msgid "Text"
93
msgstr "Tekst"
94
95
+ #: /media/szaleq/Data/easy-watermark/trunk/lib/EasyWatermarkSettings.php:268
96
msgid "Settings"
97
msgstr "Ustawienia"
98
99
+ #: /media/szaleq/Data/easy-watermark/trunk/lib/EasyWatermarkSettings.php:282
100
msgid "Donate"
101
msgstr "Przekaż dotację"
102
103
+ #: /media/szaleq/Data/easy-watermark/trunk/views/about.php:2
104
+ msgid "About"
105
+ msgstr "O wtyczce"
106
+
107
+ #: /media/szaleq/Data/easy-watermark/trunk/views/about.php:4
108
+ msgid "Plugin Version"
109
+ msgstr "Wersja wtyczki"
110
+
111
+ #: /media/szaleq/Data/easy-watermark/trunk/views/about.php:5
112
+ msgid "Plugin Author"
113
+ msgstr "Autor wtyczki"
114
+
115
+ #: /media/szaleq/Data/easy-watermark/trunk/views/about.php:6
116
+ msgid "GD library is enabled."
117
+ msgstr "Biblioteka GD jest włączona."
118
+
119
+ #: /media/szaleq/Data/easy-watermark/trunk/views/about.php:6
120
+ msgid "GD library is not available! Easy Watermark can't work without it."
121
+ msgstr "Biblioteka GD jest niedostępna! Easy Watermark nie może bez niej pracować."
122
+
123
+ #: /media/szaleq/Data/easy-watermark/trunk/views/about.php:8
124
+ msgid "Plugin page in WP repository"
125
+ msgstr "Strona wtyczki w repozytorium WP"
126
+
127
+ #: /media/szaleq/Data/easy-watermark/trunk/views/about.php:10
128
+ msgid "FAQ"
129
+ msgstr ""
130
+
131
+ #: /media/szaleq/Data/easy-watermark/trunk/views/about.php:12
132
+ msgid "Support"
133
+ msgstr "Wsparcie"
134
+
135
+ #: /media/szaleq/Data/easy-watermark/trunk/views/about.php:13
136
+ msgid "Want to buy me a coffee?"
137
+ msgstr "Chciałbyś postawić mi kawę?"
138
+
139
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-general.php:3
140
+ msgid "Auto Watermark"
141
msgstr "Automatyczne dodawanie"
142
143
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-general.php:4
144
msgid "Add watermark when uploading images"
145
msgstr "Dodawaj znak wodny podczas wgrywania obrazów"
146
147
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-general.php:6
148
+ msgid "Image Types"
149
msgstr "Typy obrazów"
150
151
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-general.php:10
152
msgid "Select image types which should be watermarked"
153
msgstr "Zaznacz typy obrazów, które mają być oznaczane znakiem wodnym"
154
155
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-general.php:12
156
+ msgid "Image Sizes"
157
+ msgstr "Rozmiary obrazów"
158
+
159
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-general.php:18
160
+ msgid "Select image sizes which should be watermarked"
161
+ msgstr "Zaznacz rozmiary obrazów, które mają być oznaczane znakiem wodnym"
162
+
163
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-general.php:21
164
msgid "Watermark Type"
165
msgstr "Typ znaku wodnego"
166
167
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-general.php:26
168
msgid "Image + Text"
169
msgstr "Obraz i tekst"
170
171
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-general.php:28
172
msgid "Choose, whether to apply image, text, or both."
173
msgstr "Wybierz, czy jako znak wodny zastosować obraz, tekst, czy tekst z obrazem."
174
175
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-image.php:3
176
msgid "Watermark image"
177
msgstr "Znak wodny"
178
179
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-image.php:8
180
msgid "Choose Watermark Image"
181
msgstr "Wybierz znak wodny"
182
183
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-image.php:8
184
msgid "Set as Watermark Image"
185
msgstr "Ustaw jako znak wodny"
186
187
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-image.php:8
188
msgid "Select/Upload Image"
189
msgstr "Wybierz/wgraj obraz"
190
191
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-image.php:8
192
msgid "Note: If you want to upload a new image, make sure that \"Auto watermark\" option is unticked or text watermark is not set. Otherwise uploaded image will be watermarked."
193
msgstr "Uwaga: Jeśli chcesz wgrać nowy obraz, upewnij się, że opcja \"Automatyczne dodawanie\" jest odznaczona, lub tekstowy znak wodny nie jest ustawiony. W przeciwnym wypadku wgrywany obraz zostanie oznaczony znakiem wodnym."
194
195
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-image.php:17
196
msgid "Loading preview..."
197
msgstr "Ładowanie podglądu..."
198
199
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-image.php:18
200
msgid "Click on image to change it."
201
msgstr "Kliknij na obraz by go zmienić."
202
203
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-image.php:18
204
msgid "Remove image"
205
msgstr "Usuń obraz"
206
207
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-image.php:19
208
msgid "Note: If you want to upload a new image, make sure that \"Auto watermark\" option is unticked, or remove current image and unset text watermark first. Otherwise uploaded image will be watermarked."
209
msgstr "Uwaga: Jeśli chcesz wgrać nowy obraz, upewnij się, że opcja \"Automatyczne dodawanie\" jest odznaczona, lub usuń bieżący obraz i zresetuj tekstowy znak wodny. W przeciwnym wypadku wgrywany obraz zostanie oznaczony znakiem wodnym."
210
211
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-image.php:22
212
msgid "Image alignment"
213
msgstr "Wyrównanie obrazu"
214
215
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-image.php:35
216
msgid "Image offset"
217
msgstr "Offset obrazu"
218
219
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-image.php:36
220
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-text.php:28
221
msgid "x"
222
msgstr ""
223
224
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-image.php:38
225
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-text.php:30
226
msgid "y"
227
msgstr ""
228
229
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-image.php:39
230
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-text.php:31
231
msgid "Offset can be defined in pixels (just numeric value) or as percentage (e.g. '33%')"
232
msgstr "Offset może być ustawiony w pikselach (po porstu numer) lub procentowo (np. '33%')"
233
234
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-image.php:41
235
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-text.php:55
236
msgid "Opacity"
237
msgstr "Nieprzezroczystość"
238
239
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-image.php:41
240
+ msgid "Opacity does not affect the png images with alpha chanel."
241
msgstr "Ta opcja nie dotyczy obrazów png posiadających kanał alfa."
242
243
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-text.php:8
244
msgid "Preview"
245
msgstr "Podgląd"
246
247
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-text.php:14
248
msgid "Text alignment"
249
msgstr "Wyrównanie tekstu"
250
251
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-text.php:27
252
msgid "Text offset"
253
msgstr "Offset tekstu"
254
255
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-text.php:33
256
msgid "Font"
257
msgstr "Czcionka"
258
259
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-text.php:44
260
msgid "Text color"
261
msgstr "Kolor tekstu"
262
263
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-text.php:47
264
msgid "Text size"
265
msgstr "Rozmiar tekstu"
266
267
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-text.php:51
268
msgid "Text angle"
269
msgstr "Kąt obrotu tekstu"
270
271
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-page.php:6
272
msgid "Easy Watermark Settings"
273
msgstr "Ustawienia Easy Watermark"
274
275
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-page.php:22
276
msgid "Save Changes"
277
msgstr "Zapisz zmiany"
278
279
+ #~ msgid "Go to Easy Watermark Tool"
280
+ #~ msgstr "Przejdź do Easy Watermark"
281
+
282
#~ msgid "Go back"
283
#~ msgstr "Wróć"
284
languages/easy-watermark.pot CHANGED
@@ -1,9 +1,9 @@
1
msgid ""
2
msgstr ""
3
- "Project-Id-Version: Easy Watermark 0.2.3\n"
4
"Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2013-04-06 23:52+0100\n"
6
- "PO-Revision-Date: 2013-04-06 23:52+0100\n"
7
"Last-Translator: Wojtek Szałkiewicz <wojtek@szalkiewicz.pl>\n"
8
"Language-Team: Wojtek Szałkiewicz <wojtek@szalkiewicz.pl>\n"
9
"Language: \n"
@@ -11,220 +11,268 @@ msgstr ""
11
"Content-Type: text/plain; charset=UTF-8\n"
12
"Content-Transfer-Encoding: 8bit\n"
13
14
- #: /media/szaleq/Data/easy-watermark/trunk/EasyWatermarkPlugin.php:159
15
- #: /media/szaleq/Data/easy-watermark/trunk/EasyWatermarkPlugin.php:446
16
msgid "Watermark successfully added."
17
msgstr ""
18
19
- #: /media/szaleq/Data/easy-watermark/trunk/EasyWatermarkPlugin.php:166
20
msgid "Invalid mime type."
21
msgstr ""
22
23
- #: /media/szaleq/Data/easy-watermark/trunk/EasyWatermarkPlugin.php:169
24
msgid "No watermark image selected and no watermark text set."
25
msgstr ""
26
27
- #: /media/szaleq/Data/easy-watermark/trunk/EasyWatermarkPlugin.php:171
28
msgid "Go to settings page"
29
msgstr ""
30
31
- #: /media/szaleq/Data/easy-watermark/trunk/EasyWatermarkPlugin.php:175
32
msgid "An error has occurred."
33
msgstr ""
34
35
- #: /media/szaleq/Data/easy-watermark/trunk/EasyWatermarkPlugin.php:194
36
- #: /media/szaleq/Data/easy-watermark/trunk/EasyWatermarkPlugin.php:195
37
msgid "Add Watermark"
38
msgstr ""
39
40
- #: /media/szaleq/Data/easy-watermark/trunk/EasyWatermarkPlugin.php:209
41
- #: /media/szaleq/Data/easy-watermark/trunk/EasyWatermarkPlugin.php:225
42
msgid "Add watermark"
43
msgstr ""
44
45
- #: /media/szaleq/Data/easy-watermark/trunk/EasyWatermarkPlugin.php:358
46
#, php-format
47
msgid "Not supported mime type of %s. Skipping..."
48
msgstr ""
49
50
- #: /media/szaleq/Data/easy-watermark/trunk/EasyWatermarkPlugin.php:363
51
#, php-format
52
msgid "Watermark successfully added to %s"
53
msgstr ""
54
55
- #: /media/szaleq/Data/easy-watermark/trunk/EasyWatermarkPlugin.php:439
56
- #: /media/szaleq/Data/easy-watermark/trunk/EasyWatermarkSettings.php:89
57
msgid "Easy Watermark"
58
msgstr ""
59
60
- #: /media/szaleq/Data/easy-watermark/trunk/EasyWatermarkPlugin.php:446
61
msgid "Go to Media Library"
62
msgstr ""
63
64
- #: /media/szaleq/Data/easy-watermark/trunk/EasyWatermarkPlugin.php:458
65
msgid "Add watermark to all images"
66
msgstr ""
67
68
- #: /media/szaleq/Data/easy-watermark/trunk/EasyWatermarkPlugin.php:458
69
msgid "Be carefull with that option. If some images alredy has watermark, it will be added though."
70
msgstr ""
71
72
- #: /media/szaleq/Data/easy-watermark/trunk/EasyWatermarkSettings.php:74
73
msgid "General"
74
msgstr ""
75
76
- #: /media/szaleq/Data/easy-watermark/trunk/EasyWatermarkSettings.php:75
77
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-general.php:16
78
msgid "Image"
79
msgstr ""
80
81
- #: /media/szaleq/Data/easy-watermark/trunk/EasyWatermarkSettings.php:76
82
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-general.php:17
83
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-text.php:3
84
msgid "Text"
85
msgstr ""
86
87
- #: /media/szaleq/Data/easy-watermark/trunk/EasyWatermarkSettings.php:255
88
msgid "Settings"
89
msgstr ""
90
91
- #: /media/szaleq/Data/easy-watermark/trunk/EasyWatermarkSettings.php:269
92
msgid "Donate"
93
msgstr ""
94
95
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-general.php:3
96
- msgid "Auto watermark"
97
msgstr ""
98
99
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-general.php:4
100
msgid "Add watermark when uploading images"
101
msgstr ""
102
103
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-general.php:6
104
- msgid "Image types"
105
msgstr ""
106
107
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-general.php:10
108
msgid "Select image types which should be watermarked"
109
msgstr ""
110
111
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-general.php:13
112
msgid "Watermark Type"
113
msgstr ""
114
115
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-general.php:18
116
msgid "Image + Text"
117
msgstr ""
118
119
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-general.php:20
120
msgid "Choose, whether to apply image, text, or both."
121
msgstr ""
122
123
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-image.php:3
124
msgid "Watermark image"
125
msgstr ""
126
127
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-image.php:8
128
msgid "Choose Watermark Image"
129
msgstr ""
130
131
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-image.php:8
132
msgid "Set as Watermark Image"
133
msgstr ""
134
135
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-image.php:8
136
msgid "Select/Upload Image"
137
msgstr ""
138
139
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-image.php:8
140
msgid "Note: If you want to upload a new image, make sure that \"Auto watermark\" option is unticked or text watermark is not set. Otherwise uploaded image will be watermarked."
141
msgstr ""
142
143
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-image.php:17
144
msgid "Loading preview..."
145
msgstr ""
146
147
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-image.php:18
148
msgid "Click on image to change it."
149
msgstr ""
150
151
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-image.php:18
152
msgid "Remove image"
153
msgstr ""
154
155
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-image.php:19
156
msgid "Note: If you want to upload a new image, make sure that \"Auto watermark\" option is unticked, or remove current image and unset text watermark first. Otherwise uploaded image will be watermarked."
157
msgstr ""
158
159
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-image.php:22
160
msgid "Image alignment"
161
msgstr ""
162
163
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-image.php:35
164
msgid "Image offset"
165
msgstr ""
166
167
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-image.php:36
168
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-text.php:26
169
msgid "x"
170
msgstr ""
171
172
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-image.php:38
173
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-text.php:28
174
msgid "y"
175
msgstr ""
176
177
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-image.php:39
178
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-text.php:29
179
msgid "Offset can be defined in pixels (just numeric value) or as percentage (e.g. '33%')"
180
msgstr ""
181
182
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-image.php:41
183
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-text.php:53
184
msgid "Opacity"
185
msgstr ""
186
187
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-image.php:41
188
- msgid "Opacity does not affect the png images with opacity chanel."
189
msgstr ""
190
191
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-text.php:7
192
msgid "Preview"
193
msgstr ""
194
195
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-text.php:12
196
msgid "Text alignment"
197
msgstr ""
198
199
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-text.php:25
200
msgid "Text offset"
201
msgstr ""
202
203
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-text.php:31
204
msgid "Font"
205
msgstr ""
206
207
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-text.php:42
208
msgid "Text color"
209
msgstr ""
210
211
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-text.php:45
212
msgid "Text size"
213
msgstr ""
214
215
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form-text.php:49
216
msgid "Text angle"
217
msgstr ""
218
219
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form.php:2
220
msgid "Easy Watermark Settings"
221
msgstr ""
222
223
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form.php:5
224
- msgid "Go to Easy Watermark Tool"
225
- msgstr ""
226
-
227
- #: /media/szaleq/Data/easy-watermark/trunk/settings-form.php:21
228
msgid "Save Changes"
229
msgstr ""
230
1
msgid ""
2
msgstr ""
3
+ "Project-Id-Version: Easy Watermark 0.3\n"
4
"Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2013-04-18 00:01+0100\n"
6
+ "PO-Revision-Date: 2013-04-18 00:01+0100\n"
7
"Last-Translator: Wojtek Szałkiewicz <wojtek@szalkiewicz.pl>\n"
8
"Language-Team: Wojtek Szałkiewicz <wojtek@szalkiewicz.pl>\n"
9
"Language: \n"
11
"Content-Type: text/plain; charset=UTF-8\n"
12
"Content-Transfer-Encoding: 8bit\n"
13
14
+ #: /media/szaleq/Data/easy-watermark/trunk/lib/EasyWatermarkPlugin.php:182
15
+ #: /media/szaleq/Data/easy-watermark/trunk/lib/EasyWatermarkPlugin.php:524
16
msgid "Watermark successfully added."
17
msgstr ""
18
19
+ #: /media/szaleq/Data/easy-watermark/trunk/lib/EasyWatermarkPlugin.php:189
20
msgid "Invalid mime type."
21
msgstr ""
22
23
+ #: /media/szaleq/Data/easy-watermark/trunk/lib/EasyWatermarkPlugin.php:192
24
msgid "No watermark image selected and no watermark text set."
25
msgstr ""
26
27
+ #: /media/szaleq/Data/easy-watermark/trunk/lib/EasyWatermarkPlugin.php:194
28
msgid "Go to settings page"
29
msgstr ""
30
31
+ #: /media/szaleq/Data/easy-watermark/trunk/lib/EasyWatermarkPlugin.php:198
32
msgid "An error has occurred."
33
msgstr ""
34
35
+ #: /media/szaleq/Data/easy-watermark/trunk/lib/EasyWatermarkPlugin.php:204
36
+ msgid "Easy Watermark is active, but requires GD library to work. Please enable this extension."
37
+ msgstr ""
38
+
39
+ #: /media/szaleq/Data/easy-watermark/trunk/lib/EasyWatermarkPlugin.php:204
40
+ msgid "Read more"
41
+ msgstr ""
42
+
43
+ #: /media/szaleq/Data/easy-watermark/trunk/lib/EasyWatermarkPlugin.php:224
44
+ #: /media/szaleq/Data/easy-watermark/trunk/lib/EasyWatermarkPlugin.php:225
45
msgid "Add Watermark"
46
msgstr ""
47
48
+ #: /media/szaleq/Data/easy-watermark/trunk/lib/EasyWatermarkPlugin.php:240
49
+ #: /media/szaleq/Data/easy-watermark/trunk/lib/EasyWatermarkPlugin.php:256
50
msgid "Add watermark"
51
msgstr ""
52
53
+ #: /media/szaleq/Data/easy-watermark/trunk/lib/EasyWatermarkPlugin.php:395
54
#, php-format
55
msgid "Not supported mime type of %s. Skipping..."
56
msgstr ""
57
58
+ #: /media/szaleq/Data/easy-watermark/trunk/lib/EasyWatermarkPlugin.php:400
59
#, php-format
60
msgid "Watermark successfully added to %s"
61
msgstr ""
62
63
+ #: /media/szaleq/Data/easy-watermark/trunk/lib/EasyWatermarkPlugin.php:517
64
+ #: /media/szaleq/Data/easy-watermark/trunk/lib/EasyWatermarkSettings.php:97
65
msgid "Easy Watermark"
66
msgstr ""
67
68
+ #: /media/szaleq/Data/easy-watermark/trunk/lib/EasyWatermarkPlugin.php:524
69
msgid "Go to Media Library"
70
msgstr ""
71
72
+ #: /media/szaleq/Data/easy-watermark/trunk/lib/EasyWatermarkPlugin.php:534
73
msgid "Add watermark to all images"
74
msgstr ""
75
76
+ #: /media/szaleq/Data/easy-watermark/trunk/lib/EasyWatermarkPlugin.php:534
77
msgid "Be carefull with that option. If some images alredy has watermark, it will be added though."
78
msgstr ""
79
80
+ #: /media/szaleq/Data/easy-watermark/trunk/lib/EasyWatermarkSettings.php:77
81
msgid "General"
82
msgstr ""
83
84
+ #: /media/szaleq/Data/easy-watermark/trunk/lib/EasyWatermarkSettings.php:78
85
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-general.php:24
86
msgid "Image"
87
msgstr ""
88
89
+ #: /media/szaleq/Data/easy-watermark/trunk/lib/EasyWatermarkSettings.php:79
90
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-general.php:25
91
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-text.php:3
92
msgid "Text"
93
msgstr ""
94
95
+ #: /media/szaleq/Data/easy-watermark/trunk/lib/EasyWatermarkSettings.php:268
96
msgid "Settings"
97
msgstr ""
98
99
+ #: /media/szaleq/Data/easy-watermark/trunk/lib/EasyWatermarkSettings.php:282
100
msgid "Donate"
101
msgstr ""
102
103
+ #: /media/szaleq/Data/easy-watermark/trunk/views/about.php:2
104
+ msgid "About"
105
+ msgstr ""
106
+
107
+ #: /media/szaleq/Data/easy-watermark/trunk/views/about.php:4
108
+ msgid "Plugin Version"
109
+ msgstr ""
110
+
111
+ #: /media/szaleq/Data/easy-watermark/trunk/views/about.php:5
112
+ msgid "Plugin Author"
113
+ msgstr ""
114
+
115
+ #: /media/szaleq/Data/easy-watermark/trunk/views/about.php:6
116
+ msgid "GD library is enabled."
117
+ msgstr ""
118
+
119
+ #: /media/szaleq/Data/easy-watermark/trunk/views/about.php:6
120
+ msgid "GD library is not available! Easy Watermark can't work without it."
121
+ msgstr ""
122
+
123
+ #: /media/szaleq/Data/easy-watermark/trunk/views/about.php:8
124
+ msgid "Plugin page in WP repository"
125
msgstr ""
126
127
+ #: /media/szaleq/Data/easy-watermark/trunk/views/about.php:10
128
+ msgid "FAQ"
129
+ msgstr ""
130
+
131
+ #: /media/szaleq/Data/easy-watermark/trunk/views/about.php:12
132
+ msgid "Support"
133
+ msgstr ""
134
+
135
+ #: /media/szaleq/Data/easy-watermark/trunk/views/about.php:13
136
+ msgid "Want to buy me a coffee?"
137
+ msgstr ""
138
+
139
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-general.php:3
140
+ msgid "Auto Watermark"
141
+ msgstr ""
142
+
143
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-general.php:4
144
msgid "Add watermark when uploading images"
145
msgstr ""
146
147
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-general.php:6
148
+ msgid "Image Types"
149
msgstr ""
150
151
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-general.php:10
152
msgid "Select image types which should be watermarked"
153
msgstr ""
154
155
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-general.php:12
156
+ msgid "Image Sizes"
157
+ msgstr ""
158
+
159
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-general.php:18
160
+ msgid "Select image sizes which should be watermarked"
161
+ msgstr ""
162
+
163
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-general.php:21
164
msgid "Watermark Type"
165
msgstr ""
166
167
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-general.php:26
168
msgid "Image + Text"
169
msgstr ""
170
171
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-general.php:28
172
msgid "Choose, whether to apply image, text, or both."
173
msgstr ""
174
175
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-image.php:3
176
msgid "Watermark image"
177
msgstr ""
178
179
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-image.php:8
180
msgid "Choose Watermark Image"
181
msgstr ""
182
183
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-image.php:8
184
msgid "Set as Watermark Image"
185
msgstr ""
186
187
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-image.php:8
188
msgid "Select/Upload Image"
189
msgstr ""
190
191
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-image.php:8
192
msgid "Note: If you want to upload a new image, make sure that \"Auto watermark\" option is unticked or text watermark is not set. Otherwise uploaded image will be watermarked."
193
msgstr ""
194
195
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-image.php:17
196
msgid "Loading preview..."
197
msgstr ""
198
199
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-image.php:18
200
msgid "Click on image to change it."
201
msgstr ""
202
203
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-image.php:18
204
msgid "Remove image"
205
msgstr ""
206
207
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-image.php:19
208
msgid "Note: If you want to upload a new image, make sure that \"Auto watermark\" option is unticked, or remove current image and unset text watermark first. Otherwise uploaded image will be watermarked."
209
msgstr ""
210
211
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-image.php:22
212
msgid "Image alignment"
213
msgstr ""
214
215
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-image.php:35
216
msgid "Image offset"
217
msgstr ""
218
219
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-image.php:36
220
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-text.php:28
221
msgid "x"
222
msgstr ""
223
224
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-image.php:38
225
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-text.php:30
226
msgid "y"
227
msgstr ""
228
229
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-image.php:39
230
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-text.php:31
231
msgid "Offset can be defined in pixels (just numeric value) or as percentage (e.g. '33%')"
232
msgstr ""
233
234
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-image.php:41
235
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-text.php:55
236
msgid "Opacity"
237
msgstr ""
238
239
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-image.php:41
240
+ msgid "Opacity does not affect the png images with alpha chanel."
241
msgstr ""
242
243
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-text.php:8
244
msgid "Preview"
245
msgstr ""
246
247
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-text.php:14
248
msgid "Text alignment"
249
msgstr ""
250
251
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-text.php:27
252
msgid "Text offset"
253
msgstr ""
254
255
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-text.php:33
256
msgid "Font"
257
msgstr ""
258
259
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-text.php:44
260
msgid "Text color"
261
msgstr ""
262
263
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-text.php:47
264
msgid "Text size"
265
msgstr ""
266
267
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-form-text.php:51
268
msgid "Text angle"
269
msgstr ""
270
271
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-page.php:6
272
msgid "Easy Watermark Settings"
273
msgstr ""
274
275
+ #: /media/szaleq/Data/easy-watermark/trunk/views/settings-page.php:22
276
msgid "Save Changes"
277
msgstr ""
278
lib/EWPlugable.php ADDED
@@ -0,0 +1,48 @@
1
+ <?php
2
+ /**
3
+ * @copyright: Wojtek Szałkiewicz
4
+ * @license: GPLv2 or later
5
+ *
6
+ * This class is a base class for wordpress plugins.
7
+ * It's a part of package in which you found it.
8
+ * See readme.txt for more information.
9
+ */
10
+
11
+ class EWPlugable
12
+ {
13
+ /**
14
+ * Adds wordpress action
15
+ *
16
+ * @chainable
17
+ * @param string action name
18
+ * @param string function name
19
+ * @param integer priority
20
+ * @param integer accepted arguments
21
+ * @return object
22
+ */
23
+ protected function add_action($actionName, $funcName = null, $priority = 10, $accepted_args = 1){
24
+ add_action($actionName,
25
+ array($this, (!empty($funcName) ? $funcName : $actionName)),
26
+ $priority, $accepted_args);
27
+
28
+ return $this;
29
+ }
30
+
31
+ /**
32
+ * Adds wordpress filter
33
+ *
34
+ * @chainable
35
+ * @param string filter name
36
+ * @param string function name
37
+ * @param integer priority
38
+ * @param integer accepted arguments
39
+ * @return object
40
+ */
41
+ protected function add_filter($filterName, $funcName = null, $priority = 10, $accepted_args = 1){
42
+ add_filter($filterName,
43
+ array($this, (!empty($funcName) ? $funcName : $filterName)),
44
+ $priority, $accepted_args);
45
+
46
+ return $this;
47
+ }
48
+ }
plugin.php → lib/EWPlugin.php RENAMED
@@ -8,7 +8,7 @@
8
* See readme.txt for more information.
9
*/
10
11
- class ewPluginCore
12
{
13
/**
14
* @var string plugin name
@@ -60,48 +60,12 @@ class ewPluginCore
60
return new static();
61
}
62
63
- /**
64
- * Adds wordpress action
65
- *
66
- * @chainable
67
- * @param string action name
68
- * @param string function name
69
- * @param integer priority
70
- * @param integer accepted arguments
71
- * @return object
72
- */
73
- protected function add_action($actionName, $funcName = null, $priority = 10, $accepted_args = 1){
74
- add_action($actionName,
75
- array($this, (!empty($funcName) ? $funcName : $actionName)),
76
- $priority, $accepted_args);
77
-
78
- return $this;
79
- }
80
-
81
- /**
82
- * Adds wordpress filter
83
- *
84
- * @chainable
85
- * @param string filter name
86
- * @param string function name
87
- * @param integer priority
88
- * @param integer accepted arguments
89
- * @return object
90
- */
91
- protected function add_filter($filterName, $funcName = null, $priority = 10, $accepted_args = 1){
92
- add_filter($filterName,
93
- array($this, (!empty($funcName) ? $funcName : $filterName)),
94
- $priority, $accepted_args);
95
-
96
- return $this;
97
- }
98
-
99
/**
100
* Returns plugin name
101
*
102
* @return string
103
*/
104
- public function getName(){
105
return static::$pluginName;
106
}
107
@@ -110,7 +74,7 @@ class ewPluginCore
110
*
111
* @return string
112
*/
113
- public function getSlug(){
114
return static::$pluginSlug;
115
}
116
@@ -120,8 +84,8 @@ class ewPluginCore
120
*
121
* @return string
122
*/
123
- public function getVersion(){
124
- return static::$vertion;
125
}
126
127
/**
@@ -146,4 +110,12 @@ class ewPluginCore
146
* @return void
147
*/
148
protected static function upgrade($version){}
149
}
8
* See readme.txt for more information.
9
*/
10
11
+ class EWPluginCore extends EWPlugable
12
{
13
/**
14
* @var string plugin name
60
return new static();
61
}
62
63
/**
64
* Returns plugin name
65
*
66
* @return string
67
*/
68
+ public static function getName(){
69
return static::$pluginName;
70
}
71
74
*
75
* @return string
76
*/
77
+ public static function getSlug(){
78
return static::$pluginSlug;
79
}
80
84
*
85
* @return string
86
*/
87
+ public static function getVersion(){
88
+ return static::$version;
89
}
90
91
/**
110
* @return void
111
*/
112
protected static function upgrade($version){}
113
+
114
+ public function __call($name, $args){
115
+ if(method_exists('static::'.$name)){
116
+ return static::$name();
117
+ }
118
+
119
+ return false;
120
+ }
121
}
EasyWatermark.php → lib/EasyWatermark.php RENAMED
@@ -850,11 +850,19 @@ class EasyWatermark
850
}
851
852
/**
853
- * cleans up everything when object is destructed
854
*/
855
public function __destruct(){
856
- if($this->inputImage) imagedestroy($this->inputImage);
857
- if($this->watermarkImage) imagedestroy($this->watermarkImage);
858
- if($this->outputImage) imagedestroy($this->outputImage);
859
}
860
}
850
}
851
852
/**
853
+ * cleans up image resources when object is destructed
854
+ */
855
+ public function clean(){
856
+ if($this->inputImage) imagedestroy($this->inputImage); $this->inputImage = null;
857
+ if($this->watermarkImage) imagedestroy($this->watermarkImage); $this->watermarkImage = null;
858
+ if($this->outputImage) imagedestroy($this->outputImage); $this->outputImage = null;
859
+ $this->imageSize = null;
860
+ }
861
+
862
+ /**
863
+ * cleans up image resources when object is destructed
864
*/
865
public function __destruct(){
866
+ $this->clean();
867
}
868
}
EasyWatermarkPlugin.php → lib/EasyWatermarkPlugin.php RENAMED
@@ -22,13 +22,15 @@ class EasyWatermarkPlugin extends ewPluginCore
22
/**
23
* @var string plugin version
24
*/
25
- protected static $version = '0.2.3';
26
27
/**
28
* @var string plugin class name
29
*/
30
protected static $className = 'EasyWatermarkPlugin';
31
32
private $settings;
33
34
private $messages = array();
@@ -52,7 +54,23 @@ class EasyWatermarkPlugin extends ewPluginCore
52
->add_action('add_attachment', 'add_watermark_after_upload')
53
->add_action('admin_notices')
54
->add_action('admin_head-upload.php', 'add_bulk_action_script')
55
- ->add_action('admin_action_ew_add_watermark', 'bulk_action_handler');
56
}
57
58
/**
@@ -80,11 +98,13 @@ class EasyWatermarkPlugin extends ewPluginCore
80
* @return void
81
*/
82
private function print_text_preview(){
83
$ew = $this->getEasyWatermark();
84
if($this->settings['general']['watermark_type'] == '1'){
85
$settings = $this->settings['text'];
86
87
- $fontFile = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'fonts' . DIRECTORY_SEPARATOR . $settings['font'];
88
if(file_exists($fontFile))
89
$settings['font'] = $fontFile;
90
@@ -103,12 +123,15 @@ class EasyWatermarkPlugin extends ewPluginCore
103
$ew->textSet('opacity', $_GET['opacity']);
104
105
if(isset($_GET['font'])){
106
- $fontFile = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'fonts' . DIRECTORY_SEPARATOR . $_GET['font'];
107
if(file_exists($fontFile))
108
$ew->textSet('font', $fontFile);
109
}
110
111
$ew->printTextPreview();
112
exit;
113
}
114
@@ -118,12 +141,12 @@ class EasyWatermarkPlugin extends ewPluginCore
118
* @return void
119
*/
120
private function add_watermark(){
121
- if(isset($_GET['attachment_id'])){
122
$url = false;
123
if($this->watermark_single($_GET['attachment_id'])){
124
switch($_GET['r']){
125
case 'library':
126
- $url = admin_url('upload.php?watermarked=true');
127
break;
128
case 'post':
129
$url = admin_url('post.php?post='.$_GET['attachment_id'].'&action=edit&watermarked=1');
@@ -153,7 +176,7 @@ class EasyWatermarkPlugin extends ewPluginCore
153
* @return void
154
*/
155
public function admin_notices(){
156
- if(isset($_GET['watermarked']) && $_GET['watermarked'] == 'true'):
157
?>
158
<div class="updated">
159
<p><?php _e('Watermark successfully added.', 'easy-watermark'); ?></p>
@@ -176,6 +199,11 @@ class EasyWatermarkPlugin extends ewPluginCore
176
endswitch;
177
echo '</p></div>';
178
endif;
179
}
180
181
/**
@@ -184,10 +212,12 @@ class EasyWatermarkPlugin extends ewPluginCore
184
* @return void
185
*/
186
public function add_media_page(){
187
- add_media_page( 'Easy Watermark', 'Easy Watermark', 'upload_files', 'easy-watermark', array($this, 'easy_watermark'));
188
}
189
190
function add_bulk_action_script() {
191
?>
192
<script type="text/javascript">
193
jQuery(document).ready(function() {
@@ -196,6 +226,7 @@ class EasyWatermarkPlugin extends ewPluginCore
196
});
197
</script>
198
<?php
199
}
200
201
/**
@@ -204,7 +235,7 @@ class EasyWatermarkPlugin extends ewPluginCore
204
* @return array
205
*/
206
public function add_media_row_action($actions, $post, $detached){
207
- if($post->post_mime_type == 'image/jpeg' || $post->post_mime_type == 'image/png' || $post->post_mime_type == 'image/gif'){
208
// Add link if it's supported image type
209
$actions['add_watermark'] = '<a href="' . wp_nonce_url(admin_url('upload.php?page=easy-watermark&attachment_id='.$post->ID.'&r=library')) . '">'.__('Add watermark', 'easy-watermark').'</a>';
210
}
@@ -218,7 +249,7 @@ class EasyWatermarkPlugin extends ewPluginCore
218
* @return array
219
*/
220
public function add_attachment_field($form_fields, $post){
221
- if($post->post_mime_type == 'image/jpeg' || $post->post_mime_type == 'image/png' || $post->post_mime_type == 'image/gif'){
222
// Add link if it's supported image type
223
$form_fields = array_reverse($form_fields);
224
$form_fields['easy-watermark'] = array(
@@ -278,7 +309,7 @@ class EasyWatermarkPlugin extends ewPluginCore
278
* @return array
279
*/
280
public function add_watermark_after_upload($id){
281
- if($this->settings['general']['auto_add']){
282
$this->watermark_uploaded = true;
283
$this->uploaded_id = $id;
284
$this->add_filter('wp_generate_attachment_metadata', null, 10, 2);
@@ -315,6 +346,8 @@ class EasyWatermarkPlugin extends ewPluginCore
315
* @return boolean
316
*/
317
private function watermark_single($id, $checkMime = false){
318
if($this->settings['image']['watermark_path'] != '' || $this->settings['text']['text'] != null){
319
$post = get_post($id);
320
$filepath = get_attached_file($id);
@@ -326,12 +359,14 @@ class EasyWatermarkPlugin extends ewPluginCore
326
return false;
327
}
328
329
- return $this->create_watermark($filepath, $post->post_mime_type);
330
}
331
else {
332
$this->error = 2;
333
return false;
334
}
335
}
336
337
/**
@@ -341,6 +376,8 @@ class EasyWatermarkPlugin extends ewPluginCore
341
* @return boolean
342
*/
343
private function watermark_all(){
344
global $wpdb;
345
346
$images = $wpdb->get_results("
@@ -359,7 +396,7 @@ class EasyWatermarkPlugin extends ewPluginCore
359
continue;
360
}
361
362
- if($this->create_watermark($filepath, $img->post_mime_type)){
363
$output .= sprintf(__('Watermark successfully added to %s', 'easy-watermark'), '<strong>'.$filepath.'</strong>') . '<br/>';
364
}
365
}
@@ -369,6 +406,41 @@ class EasyWatermarkPlugin extends ewPluginCore
369
$output = '<p>'.$output.'</p>';
370
371
return $output;
372
}
373
374
/**
@@ -378,7 +450,9 @@ class EasyWatermarkPlugin extends ewPluginCore
378
* @param string image mime type
379
* @return boolean
380
*/
381
- private function create_watermark($imageFile, $imageType){
382
if(empty($this->settings['image']['watermark_path']) || $this->settings['image']['watermark_path'] != $imageFile){
383
$ew = $this->getEasyWatermark();
384
$ew->setImagePath($imageFile)
@@ -391,11 +465,14 @@ class EasyWatermarkPlugin extends ewPluginCore
391
return false;
392
}
393
394
return true;
395
}
396
else {
397
return false;
398
}
399
}
400
401
/**
@@ -409,23 +486,23 @@ class EasyWatermarkPlugin extends ewPluginCore
409
* @return object
410
*/
411
public function getEasyWatermark(){
412
- if(!($ew instanceof EasyWatermark)){
413
$imageSettings = $this->settings['image'];
414
$textSettings = $this->settings['text'];
415
- $ew = new EasyWatermark();
416
417
- $fontFile = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'fonts' . DIRECTORY_SEPARATOR . $textSettings['font'];
418
if(file_exists($fontFile))
419
$textSettings['font'] = $fontFile;
420
421
$wType = $this->settings['general']['watermark_type'];
422
if($wType == 1 || $wType == 3)
423
- $ew->imageSet($imageSettings);
424
if($wType == 2 || $wType == 3)
425
- $ew->textSet($textSettings);
426
}
427
428
- return $ew;
429
}
430
431
/**
@@ -436,6 +513,7 @@ class EasyWatermarkPlugin extends ewPluginCore
436
public function easy_watermark(){
437
?>
438
<div class="wrap easy-watermark">
439
<h2><?php _e('Easy Watermark', 'easy-watermark'); ?></h2>
440
<?php
441
if(isset($_GET['_wpnonce']) && wp_verify_nonce($_GET['_wpnonce'])){
@@ -453,8 +531,6 @@ class EasyWatermarkPlugin extends ewPluginCore
453
else {
454
?>
455
<br/>
456
- <?php require_once dirname(__FILE__) . '/donation.php';
457
- ewDonation::showButton(); ?>
458
<a class="button-primary" href="<?php echo wp_nonce_url(admin_url('/upload.php?page=easy-watermark&watermark_all=1')); ?>"><?php _e('Add watermark to all images', 'easy-watermark'); ?></a><p class="description"><?php _e('Be carefull with that option. If some images alredy has watermark, it will be added though.', 'easy-watermark'); ?></p>
459
<?php
460
}
@@ -463,6 +539,16 @@ class EasyWatermarkPlugin extends ewPluginCore
463
<?php
464
}
465
466
/**
467
* Method run when activating plugin
468
*
@@ -500,9 +586,10 @@ class EasyWatermarkPlugin extends ewPluginCore
500
*/
501
protected static function upgrade($version){
502
if($version == '0.2.2'){
503
- return;
504
}
505
elseif($version == '0.2' || $version == '0.2.1'){
506
$settings['image'] = get_option(static::$pluginSlug.'-settings-image');
507
$settings['text'] = get_option(static::$pluginSlug.'-settings-text');
508
}
@@ -557,8 +644,12 @@ class EasyWatermarkPlugin extends ewPluginCore
557
delete_option(static::$pluginSlug.'-settings');
558
}
559
560
- $settings['image']['alignment'] = static::getAlignment($settings['image']['position_x'], $settings['image']['position_y']);
561
- $settings['text']['alignment'] = static::getAlignment($settings['text']['position_x'], $settings['text']['position_y']);
562
563
static::install($settings);
564
}
22
/**
23
* @var string plugin version
24
*/
25
+ protected static $version = '0.3.0';
26
27
/**
28
* @var string plugin class name
29
*/
30
protected static $className = 'EasyWatermarkPlugin';
31
32
+ private static $GDEnabled;
33
+
34
private $settings;
35
36
private $messages = array();
54
->add_action('add_attachment', 'add_watermark_after_upload')
55
->add_action('admin_notices')
56
->add_action('admin_head-upload.php', 'add_bulk_action_script')
57
+ ->add_action('admin_action_ew_add_watermark', 'bulk_action_handler')
58
+ ->add_action('admin_print_scripts', 'easy_watermark_style');
59
+
60
+ $this->test_GD();
61
+ }
62
+
63
+ private function test_GD(){
64
+ if(extension_loaded('gd') && function_exists('gd_info')){
65
+ self::$GDEnabled = true;
66
+ }
67
+ else {
68
+ self::$GDEnabled = false;
69
+ }
70
+ }
71
+
72
+ public static function isGDEnabled(){
73
+ return self::$GDEnabled;
74
}
75
76
/**
98
* @return void
99
*/
100
private function print_text_preview(){
101
+ if($this->isGDEnabled()) :
102
+
103
$ew = $this->getEasyWatermark();
104
if($this->settings['general']['watermark_type'] == '1'){
105
$settings = $this->settings['text'];
106
107
+ $fontFile = EWBASE . EWDS . 'fonts' . EWDS . $settings['font'];
108
if(file_exists($fontFile))
109
$settings['font'] = $fontFile;
110
123
$ew->textSet('opacity', $_GET['opacity']);
124
125
if(isset($_GET['font'])){
126
+ $fontFile = EWBASE . EWDS . 'fonts' . EWDS . $_GET['font'];
127
if(file_exists($fontFile))
128
$ew->textSet('font', $fontFile);
129
}
130
131
$ew->printTextPreview();
132
+
133
+ endif;
134
+
135
exit;
136
}
137
141
* @return void
142
*/
143
private function add_watermark(){
144
+ if(isset($_GET['attachment_id']) && $this->isGDEnabled()){
145
$url = false;
146
if($this->watermark_single($_GET['attachment_id'])){
147
switch($_GET['r']){
148
case 'library':
149
+ $url = admin_url('upload.php?watermarked=1');
150
break;
151
case 'post':
152
$url = admin_url('post.php?post='.$_GET['attachment_id'].'&action=edit&watermarked=1');
176
* @return void
177
*/
178
public function admin_notices(){
179
+ if(isset($_GET['watermarked']) && $_GET['watermarked'] == '1'):
180
?>
181
<div class="updated">
182
<p><?php _e('Watermark successfully added.', 'easy-watermark'); ?></p>
199
endswitch;
200
echo '</p></div>';
201
endif;
202
+ if(!EasyWatermarkPlugin::isGDEnabled() && get_current_screen()->id == 'plugins') : ?>
203
+ <div class="error">
204
+ <p><?php _e('Easy Watermark is active, but requires GD library to work. Please enable this extension.', 'easy-watermark'); ?> <a href="http://www.php.net/manual/en/image.setup.php" target="_blank"><?php _e('Read more', 'easy-watermark'); ?></p>
205
+ </div>
206
+ <?php endif;
207
}
208
209
/**
212
* @return void
213
*/
214
public function add_media_page(){
215
+ if($this->isGDEnabled())
216
+ add_media_page( 'Easy Watermark', 'Easy Watermark', 'upload_files', 'easy-watermark', array($this, 'easy_watermark'));
217
}
218
219
function add_bulk_action_script() {
220
+ if($this->isGDEnabled()) :
221
?>
222
<script type="text/javascript">
223
jQuery(document).ready(function() {
226
});
227
</script>
228
<?php
229
+ endif;
230
}
231
232
/**
235
* @return array
236
*/
237
public function add_media_row_action($actions, $post, $detached){
238
+ if($this->isGDEnabled() && in_array($post->post_mime_type, $this->allowedMime)){
239
// Add link if it's supported image type
240
$actions['add_watermark'] = '<a href="' . wp_nonce_url(admin_url('upload.php?page=easy-watermark&attachment_id='.$post->ID.'&r=library')) . '">'.__('Add watermark', 'easy-watermark').'</a>';
241
}
249
* @return array
250
*/
251
public function add_attachment_field($form_fields, $post){
252
+ if($this->isGDEnabled() && in_array($post->post_mime_type, $this->allowedMime)){
253
// Add link if it's supported image type
254
$form_fields = array_reverse($form_fields);
255
$form_fields['easy-watermark'] = array(
309
* @return array
310
*/
311
public function add_watermark_after_upload($id){
312
+ if($this->isGDEnabled() && $this->settings['general']['auto_add']){
313
$this->watermark_uploaded = true;
314
$this->uploaded_id = $id;
315
$this->add_filter('wp_generate_attachment_metadata', null, 10, 2);
346
* @return boolean
347
*/
348
private function watermark_single($id, $checkMime = false){
349
+ if($this->isGDEnabled()) :
350
+
351
if($this->settings['image']['watermark_path'] != '' || $this->settings['text']['text'] != null){
352
$post = get_post($id);
353
$filepath = get_attached_file($id);
359
return false;
360
}
361
362
+ return $this->create_watermark($post);
363
}
364
else {
365
$this->error = 2;
366
return false;
367
}
368
+
369
+ endif;
370
}
371
372
/**
376
* @return boolean
377
*/
378
private function watermark_all(){
379
+ if($this->isGDEnabled()) :
380
+
381
global $wpdb;
382
383
$images = $wpdb->get_results("
396
continue;
397
}
398
399
+ if($this->create_watermark($img)){
400
$output .= sprintf(__('Watermark successfully added to %s', 'easy-watermark'), '<strong>'.$filepath.'</strong>') . '<br/>';
401
}
402
}
406
$output = '<p>'.$output.'</p>';
407
408
return $output;
409
+
410
+ endif;
411
+ }
412
+
413
+ /**
414
+ * Applies the watermark to the defined image sizes
415
+ *
416
+ * @use self::watermark_image()
417
+ * @param object wp post
418
+ * @return boolean
419
+ */
420
+ public function create_watermark($post){
421
+ $meta = get_post_meta($post->ID, '_wp_attachment_metadata');
422
+ $meta = $meta[0];
423
+ $images = $meta['sizes'];
424
+ $images['full'] = array(
425
+ 'file' => $meta['file'],
426
+ 'mime-type' => $post->post_mime_type
427
+ );
428
+
429
+ $filepath = get_attached_file($post->ID);
430
+ $filebasename = wp_basename($meta['file']);
431
+
432
+ $allowedSizes = $this->settings['general']['image_sizes'];
433
+
434
+ $return = true;
435
+ foreach($images as $size => $img){
436
+ if(in_array($size, $allowedSizes)){
437
+ $imgFile = str_replace($filebasename, wp_basename($img['file']), $filepath);
438
+ if(!$this->watermark_image($imgFile, $img['mime-type']))
439
+ $return = false;
440
+ }
441
+ }
442
+
443
+ return $return;
444
}
445
446
/**
450
* @param string image mime type
451
* @return boolean
452
*/
453
+ private function watermark_image($imageFile, $imageType){
454
+ if($this->isGDEnabled()) :
455
+
456
if(empty($this->settings['image']['watermark_path']) || $this->settings['image']['watermark_path'] != $imageFile){
457
$ew = $this->getEasyWatermark();
458
$ew->setImagePath($imageFile)
465
return false;
466
}
467
468
+ $ew->clean();
469
return true;
470
}
471
else {
472
return false;
473
}
474
+
475
+ endif;
476
}
477
478
/**
486
* @return object
487
*/
488
public function getEasyWatermark(){
489
+ if(!($this->ew instanceof EasyWatermark) && $this->isGDEnabled()){
490
$imageSettings = $this->settings['image'];
491
$textSettings = $this->settings['text'];
492
+ $this->ew = new EasyWatermark();
493
494
+ $fontFile = EWBASE . EWDS . 'fonts' . EWDS . $textSettings['font'];
495
if(file_exists($fontFile))
496
$textSettings['font'] = $fontFile;
497
498
$wType = $this->settings['general']['watermark_type'];
499
if($wType == 1 || $wType == 3)
500
+ $this->ew->imageSet($imageSettings);
501
if($wType == 2 || $wType == 3)
502
+ $this->ew->textSet($textSettings);
503
}
504
505
+ return $this->ew;
506
}
507
508
/**
513
public function easy_watermark(){
514
?>
515
<div class="wrap easy-watermark">
516
+ <div id="icon-easy-watermark" class="icon32"><br /></div>
517
<h2><?php _e('Easy Watermark', 'easy-watermark'); ?></h2>
518
<?php
519
if(isset($_GET['_wpnonce']) && wp_verify_nonce($_GET['_wpnonce'])){
531
else {
532
?>
533
<br/>
534
<a class="button-primary" href="<?php echo wp_nonce_url(admin_url('/upload.php?page=easy-watermark&watermark_all=1')); ?>"><?php _e('Add watermark to all images', 'easy-watermark'); ?></a><p class="description"><?php _e('Be carefull with that option. If some images alredy has watermark, it will be added though.', 'easy-watermark'); ?></p>
535
<?php
536
}
539
<?php
540
}
541
542
+ public function easy_watermark_style(){
543
+ if(get_current_screen()->id == 'media_page_easy-watermark') :
544
+ ?>
545
+ <style type="text/css" media="screen">
546
+ #icon-easy-watermark {background: url(<?php echo plugins_url(); ?>/<?php echo self::$pluginSlug; ?>/images/icon-32.png) no-repeat 2px 0;}
547
+ </style>
548
+ <?
549
+ endif;
550
+ }
551
+
552
/**
553
* Method run when activating plugin
554
*
586
*/
587
protected static function upgrade($version){
588
if($version == '0.2.2'){
589
+ $settings['general'] = get_option(static::$pluginSlug.'-settings-general');
590
}
591
elseif($version == '0.2' || $version == '0.2.1'){
592
+ $settings['general'] = get_option(static::$pluginSlug.'-settings-general');
593
$settings['image'] = get_option(static::$pluginSlug.'-settings-image');
594
$settings['text'] = get_option(static::$pluginSlug.'-settings-text');
595
}
644
delete_option(static::$pluginSlug.'-settings');
645
}
646
647
+ if($version != '0.2.2'){
648
+ $settings['image']['alignment'] = static::getAlignment($settings['image']['position_x'], $settings['image']['position_y']);
649
+ $settings['text']['alignment'] = static::getAlignment($settings['text']['position_x'], $settings['text']['position_y']);
650
+ }
651
+
652
+ $settings['general'] = array_merge(EasyWatermarkSettings::getDefaults('general'), $settings['general']);
653
654
static::install($settings);
655
}
EasyWatermarkSettings.php → lib/EasyWatermarkSettings.php RENAMED
@@ -1,15 +1,29 @@
1
<?php
2
3
class EasyWatermarkSettings
4
{
5
- private $settings = array();
6
-
7
- private $plugin;
8
9
private static $defaults = array(
10
'general' => array(
11
'auto_add' => '1',
12
'image_types' => array('image/jpeg', 'image/png', 'image/gif'),
13
'watermark_type' => 3
14
),
15
'image' => array(
@@ -39,22 +53,16 @@ class EasyWatermarkSettings
39
)
40
);
41
42
private $tabs;
43
44
- private $fonts = array(
45
- 'Arial.ttf' => 'Arial',
46
- 'Arial_Black.ttf' => 'Arial Black',
47
- 'Comic_Sans_MS.ttf' => 'Comic Sans MS',
48
- 'Courier_New.ttf' => 'Courier New',
49
- 'Georgia.ttf' => 'Georgia',
50
- 'Impact.ttf' => 'Impact',
51
- 'Tahoma.ttf' => 'Tahoma',
52
- 'Times_New_Roman.ttf' => 'Times New Roman',
53
- 'Trebuchet_MS.ttf' => 'Trebuchet MS',
54
- 'Verdana.ttf' => 'Verdana',
55
- );
56
57
- public static function getDefaults(){
58
return self::$defaults;
59
}
60
@@ -82,7 +90,7 @@ class EasyWatermarkSettings
82
}
83
84
public function get($key){
85
- return $this->options[$key];
86
}
87
88
public function add_options_page(){
@@ -108,7 +116,11 @@ class EasyWatermarkSettings
108
$input['image_types'] = array();
109
}
110
111
- $input = wp_parse_args($input, $this->options);
112
113
return $input;
114
}
@@ -222,34 +234,35 @@ class EasyWatermarkSettings
222
}
223
224
public function settings_page(){
225
- wp_enqueue_script('ew-colorpicker', plugin_dir_url(dirname(__File__) . '/index.php') . 'js/colorpicker.js');
226
- wp_enqueue_script('ew-interface', plugin_dir_url(dirname(__File__) . '/index.php') . 'js/interface.js');
227
- wp_enqueue_style('ew-style', plugin_dir_url(dirname(__File__) . '/index.php') . 'css/style.css');
228
- wp_enqueue_style('ew-cp-style', plugin_dir_url(dirname(__File__) . '/index.php') . 'css/colorpicker.css');
229
if(function_exists('wp_enqueue_media')){
230
// load new media manager (since wp 3.5)
231
wp_enqueue_media();
232
- wp_enqueue_script('ew-media-libraby', plugin_dir_url(dirname(__File__) . '/index.php') . 'js/media-library.js');
233
}
234
else {
235
// load old-style thiskbox
236
wp_enqueue_script('thickbox');
237
wp_enqueue_style('thickbox');
238
- wp_enqueue_script('ew-media-libraby', plugin_dir_url(dirname(__File__) . '/index.php') . 'js/old-media-library.js');
239
}
240
241
$fonts = $this->fonts;
242
243
$current_tab = (isset($_GET['tab']) && array_key_exists($_GET['tab'], $this->tabs)) ? $_GET['tab'] : 'general';
244
extract($this->settings[$current_tab]);
245
- include dirname(__File__) . '/settings-form.php';
246
}
247
248
function settings_link($links, $file){
249
static $this_plugin;
250
251
if (!$this_plugin) {
252
- $this_plugin = plugin_basename(dirname(__FILE__) . '/index.php');
253
}
254
if ($file == $this_plugin) {
255
$settings_link = '<a href="options-general.php?page=easy-watermark-settings">'.__('Settings').'</a>';
@@ -262,10 +275,10 @@ class EasyWatermarkSettings
262
static $this_plugin;
263
264
if (!$this_plugin) {
265
- $this_plugin = plugin_basename(dirname(__FILE__) . '/index.php');
266
}
267
if ($file == $this_plugin) {
268
- require_once dirname(__FILE__) . '/donation.php';
269
$donate_link = '<a href="'.ewDonation::getUrl().'">'.__('Donate', 'easy-watermark').'</a>';
270
array_push($links, $donate_link);
271
}
1
<?php
2
+ /**
3
+ * This file is a part of EasyWatermark Wordpress plugin.
4
+ * @see readme.txt
5
+ */
6
7
class EasyWatermarkSettings
8
{
9
+ private $fonts = array(
10
+ 'Arial.ttf' => 'Arial',
11
+ 'Arial_Black.ttf' => 'Arial Black',
12
+ 'Comic_Sans_MS.ttf' => 'Comic Sans MS',
13
+ 'Courier_New.ttf' => 'Courier New',
14
+ 'Georgia.ttf' => 'Georgia',
15
+ 'Impact.ttf' => 'Impact',
16
+ 'Tahoma.ttf' => 'Tahoma',
17
+ 'Times_New_Roman.ttf' => 'Times New Roman',
18
+ 'Trebuchet_MS.ttf' => 'Trebuchet MS',
19
+ 'Verdana.ttf' => 'Verdana',
20
+ );
21
22
private static $defaults = array(
23
'general' => array(
24
'auto_add' => '1',
25
'image_types' => array('image/jpeg', 'image/png', 'image/gif'),
26
+ 'image_sizes' => array('medium', 'large', 'full'),
27
'watermark_type' => 3
28
),
29
'image' => array(
53
)
54
);
55
56
+ private $settings = array();
57
+
58
+ private $plugin;
59
+
60
private $tabs;
61
62
+ public static function getDefaults($section = false){
63
+ if($section && isset(self::$defaults[$section]))
64
+ return self::$defaults[$section];
65
66
return self::$defaults;
67
}
68
90
}
91
92
public function get($key){
93
+ return $this->settings[$key];
94
}
95
96
public function add_options_page(){
116
$input['image_types'] = array();
117
}
118
119
+ if(!isset($input['image_sizes'])){
120
+ $input['image_sizes'] = array();
121
+ }
122
+
123
+ $input = wp_parse_args($input, $this->settings['general']);
124
125
return $input;
126
}
234
}
235
236
public function settings_page(){
237
+ wp_enqueue_script('ew-colorpicker', plugin_dir_url(EWBASE . '/index.php') . 'js/colorpicker.js');
238
+ wp_enqueue_script('ew-interface', plugin_dir_url(EWBASE . '/index.php') . 'js/interface.js');
239
+ wp_enqueue_style('ew-style', plugin_dir_url(EWBASE . '/index.php') . 'css/style.css');
240
+ wp_enqueue_style('ew-cp-style', plugin_dir_url(EWBASE . '/index.php') . 'css/colorpicker.css');
241
if(function_exists('wp_enqueue_media')){
242
// load new media manager (since wp 3.5)
243
wp_enqueue_media();
244
+ wp_enqueue_script('ew-media-libraby', plugin_dir_url(EWBASE . '/index.php') . 'js/media-library.js');
245
}
246
else {
247
// load old-style thiskbox
248
wp_enqueue_script('thickbox');
249
wp_enqueue_style('thickbox');
250
+ wp_enqueue_script('ew-media-libraby', plugin_dir_url(EWBASE . '/index.php') . 'js/old-media-library.js');
251
}
252
253
$fonts = $this->fonts;
254
255
$current_tab = (isset($_GET['tab']) && array_key_exists($_GET['tab'], $this->tabs)) ? $_GET['tab'] : 'general';
256
extract($this->settings[$current_tab]);
257
+
258
+ include EWVIEWS . EWDS . 'settings-page.php';
259
}
260
261
function settings_link($links, $file){
262
static $this_plugin;
263
264
if (!$this_plugin) {
265
+ $this_plugin = plugin_basename(EWBASE . EWDS . 'index.php');
266
}
267
if ($file == $this_plugin) {
268
$settings_link = '<a href="options-general.php?page=easy-watermark-settings">'.__('Settings').'</a>';
275
static $this_plugin;
276
277
if (!$this_plugin) {
278
+ $this_plugin = plugin_basename(EWBASE . EWDS . 'index.php');
279
}
280
if ($file == $this_plugin) {
281
+ require_once EWVIEWS . EWDS . 'donation.php';
282
$donate_link = '<a href="'.ewDonation::getUrl().'">'.__('Donate', 'easy-watermark').'</a>';
283
array_push($links, $donate_link);
284
}
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=wojte
4
Tags: watermark, image, picture, photo, media, gallery, signature, transparent, upload, admin
5
Requires at least: 3.3
6
Tested up to: 3.5.1
7
- Stable tag: 0.2.3
8
License: GPLv2 or later
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
@@ -14,10 +14,6 @@ Automatically adds watermark to images when they are uploaded to the WordPress M
14
15
This plugin can automatically add image and text watermark to pictures as they are uploaded to wordpress media library. You can also watermark existing images manually (all at once or an every single image). Watermark image can be a png, gif (alpha channel supported in both cases) or jpg. It's also possibile to set watermark opacity (doesn't apply to png with alpha channel). For text watermark you can select font, set color, size, angel and opacity.
16
17
- The possibility of defining many watermarks is coming soon. Check for updates.
18
-
19
- Please, contact me if you have any questions/ideas or issues.
20
-
21
== Installation ==
22
23
Note: Easy Watermark requires GD extension installed and enabled on a server to work.
@@ -43,18 +39,23 @@ Yes, there is a posibility to add only image, only text or both.
43
= How Can I adjust text watermark? =
44
You can choose text font from the list of ten fonts included to this plugin. In future releases you will be able to upload your own font file. You can also set font size, color, angel and opacity. Position of text watermark can be adjusted exactly like image position.
45
46
-
47
- If you have any other questions, please contact me.
48
49
== Screenshots ==
50
51
- 1. Text settings page
52
- 2. Image settings page
53
- 3. Easy Watermark Tool
54
- 4. `Add Watermark` link in media library
55
56
== Changelog ==
57
58
= 0.2.3 =
59
* added bulk action on media library page
60
4
Tags: watermark, image, picture, photo, media, gallery, signature, transparent, upload, admin
5
Requires at least: 3.3
6
Tested up to: 3.5.1
7
+ Stable tag: 0.3
8
License: GPLv2 or later
9
License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
14
15
This plugin can automatically add image and text watermark to pictures as they are uploaded to wordpress media library. You can also watermark existing images manually (all at once or an every single image). Watermark image can be a png, gif (alpha channel supported in both cases) or jpg. It's also possibile to set watermark opacity (doesn't apply to png with alpha channel). For text watermark you can select font, set color, size, angel and opacity.
16
17
== Installation ==
18
19
Note: Easy Watermark requires GD extension installed and enabled on a server to work.
39
= How Can I adjust text watermark? =
40
You can choose text font from the list of ten fonts included to this plugin. In future releases you will be able to upload your own font file. You can also set font size, color, angel and opacity. Position of text watermark can be adjusted exactly like image position.
41
42
+ = Can I use my font for text watermark? =
43
+ There is no user-friendly way to do this, however if you know what you do, you can upload your truetype font file to the %plugin_dir%/fonts. Then edit %plugin_dir%/lib/EasyWatermarkSettings.php and add your font file name to $fonts array.
44
45
== Screenshots ==
46
47
+ 1. General settings page
48
+ 2. Text settings page
49
+ 3. Image settings page
50
+ 4. Easy Watermark Tool
51
+ 5. 'Add Watermark' link in media library
52
53
== Changelog ==
54
55
+ = 0.3 =
56
+ * added support for all image sizes (thumbnail, medium, large), not only the fullsize image
57
+ * plugin now checks if the GD library is available, if not, it'll inform you about it instead of throw errors
58
+
59
= 0.2.3 =
60
* added bulk action on media library page
61
settings-form.php DELETED
@@ -1,24 +0,0 @@
1
- <div class="wrap easy-watermark">
2
- <h2><?php _e('Easy Watermark Settings', 'easy-watermark'); ?></h2>
3
- <?php require_once dirname(__FILE__) . '/donation.php';
4
- ewDonation::showButton(); ?>
5
- <a href="<?php echo admin_url('/upload.php?page=easy-watermark'); ?>"><?php _e('Go to Easy Watermark Tool', 'easy-watermark'); ?></a>
6
- <h3 class="nav-tab-wrapper">
7
- <?php
8
- foreach ( $this->tabs as $name => $caption ) {
9
- $active = $current_tab == $name ? 'nav-tab-active' : '';
10
- echo '<a class="nav-tab ' . $active . '" href="?page=' . $this->plugin->getSlug() . '-settings&tab=' . $name . '">' . $caption . '</a>';
11
- }
12
- ?></h3>
13
- <form method="post" action="options.php" id="easy-watermark-settings-form">
14
- <?php settings_fields('easy-watermark-settings-' . $current_tab); ?>
15
- <?php
16
- $filename = dirname(__FILE__) . '/settings-form-' . $current_tab . '.php';
17
- if(file_exists($filename))
18
- include $filename;
19
- ?>
20
- <p class="submit">
21
- <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
22
- </p>
23
- </form>
24
- </div>
views/about.php ADDED
@@ -0,0 +1,17 @@
1
+ <div class="metabox-holder inner-sidebar"><div class="postbox">
2
+ <h3><?php _e('About', 'easy-watermark'); ?></h3>
3
+ <div class="inside">
4
+ <p><?php _e('Plugin Version', 'easy-watermark'); ?>: <strong><?php echo EasyWatermarkPlugin::getVersion();?></strong></p>
5
+ <p><?php _e('Plugin Author', 'easy-watermark'); ?>: <a href="mailto:wojtek@szalkiewicz.pl">Wojtek Szałkiewicz</a></p>
6
+ <p><?php if(EasyWatermarkPlugin::isGDEnabled()) : _e('GD library is enabled.', 'easy-watermark'); else : ?><span style="color:red;"><?php _e('GD library is not available! Easy Watermark can\'t work without it.', 'easy-watermark'); ?></span><?php endif; ?></p>
7
+ <a href="http://wordpress.org/extend/plugins/easy-watermark" target="_blank">
8
+ <?php _e('Plugin page in WP repository', 'easy-watermark'); ?></a><br/>
9
+ <a href="http://wordpress.org/extend/plugins/easy-watermark/faq" target="_blank">
10
+ <?php _e('FAQ', 'easy-watermark'); ?></a><br/>
11
+ <a href="http://wordpress.org/support/plugin/easy-watermark" target="_blank">
12
+ <?php _e('Support', 'easy-watermark'); ?></a><br/><br/>
13
+ <strong><?php _e('Want to buy me a coffee?', 'easy-watermark'); ?></strong>
14
+ <?php require_once dirname(__FILE__) . '/donation.php';
15
+ ewDonation::showButton(); ?>
16
+ </div><!-- .inside -->
17
+ </div></div><!-- .metabox-holder -->
donation.php → views/donation.php RENAMED
@@ -4,7 +4,7 @@ class ewDonation
4
{
5
public static function showButton(){
6
?>
7
- <div id="donation-link" style="float:right;">
8
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
9
<input type="hidden" name="cmd" value="_s-xclick">
10
<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----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-----END PKCS7-----
4
{
5
public static function showButton(){
6
?>
7
+ <div id="donation-link">
8
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
9
<input type="hidden" name="cmd" value="_s-xclick">
10
<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----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-----END PKCS7-----
settings-form-general.php → views/settings-form-general.php RENAMED
@@ -1,13 +1,21 @@
1
2
<table class="form-table">
3
- <tr valign="top"><th scope="row"><?php _e('Auto watermark', 'easy-watermark'); ?></th>
4
<td><label for="easy-watermark-autoadd"><input id="easy-watermark-autoadd" name="easy-watermark-settings-general[auto_add]" type="checkbox" value="1" <?php checked('1', $auto_add); ?> /> <?php _e('Add watermark when uploading images', 'easy-watermark'); ?></label></td>
5
</tr>
6
- <tr valign="top" class="auto-add-options" style="display:none;"><th scope="row"><?php _e('Image types', 'easy-watermark'); ?></th>
7
<td>
8
<label for="image-type-jpg"><input id="image-type-jpg" type="checkbox" name="easy-watermark-settings-general[image_types][]" value="image/jpeg" <?php checked('1', in_array('image/jpeg', $image_types)); ?> /> jpg/jpeg</label><br/></fieldset>
9
<label for="image-type-png"><input id="image-type-png" type="checkbox" name="easy-watermark-settings-general[image_types][]" value="image/png" <?php checked('1', in_array('image/png', $image_types)); ?> /> png</label><br/>
10
<label for="image-type-gif"><input id="image-type-gif" type="checkbox" name="easy-watermark-settings-general[image_types][]" value="image/gif" <?php checked('1', in_array('image/gif', $image_types)); ?> /> gif</label><p class="description"><?php _e('Select image types which should be watermarked', 'easy-watermark'); ?></p></td>
11
</tr>
12
<tr><th scope="row">
13
<?php _e('Watermark Type', 'easy-watermark'); ?>
1
2
<table class="form-table">
3
+ <tr valign="top"><th scope="row"><?php _e('Auto Watermark', 'easy-watermark'); ?></th>
4
<td><label for="easy-watermark-autoadd"><input id="easy-watermark-autoadd" name="easy-watermark-settings-general[auto_add]" type="checkbox" value="1" <?php checked('1', $auto_add); ?> /> <?php _e('Add watermark when uploading images', 'easy-watermark'); ?></label></td>
5
</tr>
6
+ <tr valign="top" class="auto-add-options" style="display:none;"><th scope="row"><?php _e('Image Types', 'easy-watermark'); ?></th>
7
<td>
8
<label for="image-type-jpg"><input id="image-type-jpg" type="checkbox" name="easy-watermark-settings-general[image_types][]" value="image/jpeg" <?php checked('1', in_array('image/jpeg', $image_types)); ?> /> jpg/jpeg</label><br/></fieldset>
9
<label for="image-type-png"><input id="image-type-png" type="checkbox" name="easy-watermark-settings-general[image_types][]" value="image/png" <?php checked('1', in_array('image/png', $image_types)); ?> /> png</label><br/>
10
<label for="image-type-gif"><input id="image-type-gif" type="checkbox" name="easy-watermark-settings-general[image_types][]" value="image/gif" <?php checked('1', in_array('image/gif', $image_types)); ?> /> gif</label><p class="description"><?php _e('Select image types which should be watermarked', 'easy-watermark'); ?></p></td>
11
+ </tr>
12
+ <tr valign="top"><th scope="row"><?php _e('Image Sizes', 'easy-watermark'); ?></th>
13
+ <td>
14
+ <label for="image-size-thumb"><input id="image-size-thumb" type="checkbox" name="easy-watermark-settings-general[image_sizes][]" value="thumbnail" <?php checked('1', in_array('thumbnail', $image_sizes)); ?> /> Thumb</label><br/></fieldset>
15
+ <label for="image-size-medium"><input id="image-size-medium" type="checkbox" name="easy-watermark-settings-general[image_sizes][]" value="medium" <?php checked('1', in_array('medium', $image_sizes)); ?> /> Medium</label><br/>
16
+ <label for="image-size-large"><input id="image-size-large" type="checkbox" name="easy-watermark-settings-general[image_sizes][]" value="large" <?php checked('1', in_array('large', $image_sizes)); ?> /> Large</label><br/>
17
+ <label for="image-size-full"><input id="image-size-full" type="checkbox" name="easy-watermark-settings-general[image_sizes][]" value="full" <?php checked('1', in_array('full', $image_sizes)); ?> /> Fullsize</label>
18
+ <p class="description"><?php _e('Select image sizes which should be watermarked', 'easy-watermark'); ?></p></td>
19
</tr>
20
<tr><th scope="row">
21
<?php _e('Watermark Type', 'easy-watermark'); ?>
settings-form-image.php → views/settings-form-image.php RENAMED
@@ -38,7 +38,7 @@ if(empty($watermark_url)) :
38
<label for="easy-watermark-position-offset_y"><?php _e('y', 'easy-watermark'); ?>: </label>
39
<input type="text" size="3" id="easy-watermark-position-offset_y" name="easy-watermark-settings-image[offset_y]" value="<?php echo $offset_y; ?>"/><p class="description"><?php _e('Offset can be defined in pixels (just numeric value) or as percentage (e.g. \'33%\')', 'easy-watermark'); ?></p>
40
</td></tr>
41
- <tr valign="top" class="watermark-options"><th scope="row"><?php _e('Opacity', 'easy-watermark'); ?></th><td><input id="easy-watermark-opacity" name="easy-watermark-settings-image[opacity]" size="3" type="text" value="<?php echo $opacity; ?>" /> %<p class="description"><?php _e('Opacity does not affect the png images with opacity chanel.', 'easy-watermark'); ?></p>
42
<?php endif; ?>
43
</td>
44
</tr>
38
<label for="easy-watermark-position-offset_y"><?php _e('y', 'easy-watermark'); ?>: </label>
39
<input type="text" size="3" id="easy-watermark-position-offset_y" name="easy-watermark-settings-image[offset_y]" value="<?php echo $offset_y; ?>"/><p class="description"><?php _e('Offset can be defined in pixels (just numeric value) or as percentage (e.g. \'33%\')', 'easy-watermark'); ?></p>
40
</td></tr>
41
+ <tr valign="top" class="watermark-options"><th scope="row"><?php _e('Opacity', 'easy-watermark'); ?></th><td><input id="easy-watermark-opacity" name="easy-watermark-settings-image[opacity]" size="3" type="text" value="<?php echo $opacity; ?>" /> %<p class="description"><?php _e('Opacity does not affect the png images with alpha chanel.', 'easy-watermark'); ?></p>
42
<?php endif; ?>
43
</td>
44
</tr>
settings-form-text.php → views/settings-form-text.php RENAMED
@@ -4,11 +4,13 @@
4
<input type="text" value="<?php echo $text; ?>" id="ew-text" name="easy-watermark-settings-text[text]" />
5
</td></tr>
6
<?php $class = empty($text) ? ' class="hidden"' : ''; ?>
7
<tr<?php echo $class; ?> id="ew-preview-row"><th scope="row"><?php _e('Preview', 'easy-watermark'); ?></th><td>
8
<div id="text-preview">
9
<img id="ew-text-preview" src="<?php echo admin_url('options-general.php?page=easy-watermark-settings&tp=1'); ?>">
10
</div>
11
</td></tr>
12
<tr valign="top" class="watermark-options"><th scope="row"><?php _e('Text alignment', 'easy-watermark'); ?></th><td>
13
<div id="alignmentbox">
14
<label for="alignment-1" id="alignment-1-label"><input type="radio" name="easy-watermark-settings-text[alignment]" value="1" id="alignment-1" <?php checked('1', $alignment); ?> /></label>
@@ -33,7 +35,7 @@
33
<?php
34
foreach($fonts as $val => $name){
35
?>
36
- <option value="<?php echo $val; ?>" <?php selected($val, $font); ?>><?php _e($name, 'easy-watermark') ?></option>
37
<?
38
}
39
?>
4
<input type="text" value="<?php echo $text; ?>" id="ew-text" name="easy-watermark-settings-text[text]" />
5
</td></tr>
6
<?php $class = empty($text) ? ' class="hidden"' : ''; ?>
7
+ <?php if(EasyWatermarkPlugin::isGDEnabled()) : ?>
8
<tr<?php echo $class; ?> id="ew-preview-row"><th scope="row"><?php _e('Preview', 'easy-watermark'); ?></th><td>
9
<div id="text-preview">
10
<img id="ew-text-preview" src="<?php echo admin_url('options-general.php?page=easy-watermark-settings&tp=1'); ?>">
11
</div>
12
</td></tr>
13
+ <?php endif; ?>
14
<tr valign="top" class="watermark-options"><th scope="row"><?php _e('Text alignment', 'easy-watermark'); ?></th><td>
15
<div id="alignmentbox">
16
<label for="alignment-1" id="alignment-1-label"><input type="radio" name="easy-watermark-settings-text[alignment]" value="1" id="alignment-1" <?php checked('1', $alignment); ?> /></label>
35
<?php
36
foreach($fonts as $val => $name){
37
?>
38
+ <option value="<?php echo $val; ?>" style="font-family:<?php echo $name; ?>!important;font-size:1.2em;" <?php selected($val, $font); ?>><?php echo $name; ?></option>
39
<?
40
}
41
?>
views/settings-page.php ADDED
@@ -0,0 +1,27 @@
1
+ <div class="wrap easy-watermark">
2
+ <div class="has-right-sidebar">
3
+ <?php include dirname(__FILE__) . EWDS . 'about.php'; ?>
4
+ <div id="post-body-content" class="has-sidebar-content">
5
+ <?php screen_icon(); ?>
6
+ <h2><?php _e('Easy Watermark Settings', 'easy-watermark'); ?></h2>
7
+ <h3 class="nav-tab-wrapper">
8
+ <?php
9
+ foreach ( $this->tabs as $name => $caption ) {
10
+ $active = $current_tab == $name ? 'nav-tab-active' : '';
11
+ echo '<a class="nav-tab ' . $active . '" href="?page=' . $this->plugin->getSlug() . '-settings&tab=' . $name . '">' . $caption . '</a>';
12
+ }
13
+ ?></h3>
14
+ <form method="post" action="options.php" id="easy-watermark-settings-form">
15
+ <?php settings_fields('easy-watermark-settings-' . $current_tab); ?>
16
+ <?php
17
+ $filename = dirname(__FILE__) . EWDS . 'settings-form-' . $current_tab . '.php';
18
+ if(file_exists($filename))
19
+ include $filename;
20
+ ?>
21
+ <p class="submit">
22
+ <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
23
+ </p>
24
+ </form>
25
+ </div>
26
+ </div>
27
+ </div>