Version Description
- Switch from using site_url() to home_url() in email subject line so not to link to a 404 page.
Download this release
Release Info
Developer | l3rady |
Plugin | WP Updates Notifier |
Version | 1.4.1 |
Comparing to | |
See all releases |
Code changes from version 1.3.2 to 1.4.1
- languages/wp-updates-notifier-de_DE.po +260 -260
- readme.txt +99 -88
- uninstall.php +24 -24
- wp-updates-notifier.php +739 -546
languages/wp-updates-notifier-de_DE.po
CHANGED
@@ -1,260 +1,260 @@
|
|
1 |
-
msgid ""
|
2 |
-
msgstr ""
|
3 |
-
"Project-Id-Version: WP Updates Notifier v1.3.1\n"
|
4 |
-
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: \n"
|
6 |
-
"PO-Revision-Date: 2012-09-29 20:18:52+0000\n"
|
7 |
-
"Last-Translator: \n"
|
8 |
-
"Language-Team: \n"
|
9 |
-
"MIME-Version: 1.0\n"
|
10 |
-
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
-
"Content-Transfer-Encoding: 8bit\n"
|
12 |
-
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
13 |
-
"X-Poedit-Language: \n"
|
14 |
-
"X-Poedit-Country: \n"
|
15 |
-
"X-Poedit-SourceCharset: utf-8\n"
|
16 |
-
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;\n"
|
17 |
-
"X-Poedit-Basepath: \n"
|
18 |
-
"X-Poedit-Bookmarks: \n"
|
19 |
-
"X-Poedit-SearchPath-0: .\n"
|
20 |
-
"X-Textdomain-Support: yes"
|
21 |
-
|
22 |
-
#. translators: plugin header field 'Name'
|
23 |
-
#: wp-updates-notifier.php:0
|
24 |
-
#: wp-updates-notifier.php:367
|
25 |
-
#: wp-updates-notifier.php:400
|
26 |
-
#@ wp-updates-notifier
|
27 |
-
msgid "WP Updates Notifier"
|
28 |
-
msgstr "Aktualisierungsalarm"
|
29 |
-
|
30 |
-
#. translators: plugin header field 'PluginURI'
|
31 |
-
#: wp-updates-notifier.php:0
|
32 |
-
#@ wp-updates-notifier
|
33 |
-
msgid "http://l3rady.com/projects/wp-updates-notifier/"
|
34 |
-
msgstr ""
|
35 |
-
|
36 |
-
#. translators: plugin header field 'Description'
|
37 |
-
#: wp-updates-notifier.php:0
|
38 |
-
#@ wp-updates-notifier
|
39 |
-
msgid "Sends email to notify you if there are any updates for your WordPress site. Can notify about core, plugin and theme updates."
|
40 |
-
msgstr "Sendet E-Mails, um Sie zu benachrichtigen, wenn es irgendwelche Aktualisierungen für Ihre WordPress-Website gibt. Kann über Aktualisierungen für WordPress, Plugins und Themes benachrichtigen."
|
41 |
-
|
42 |
-
#. translators: plugin header field 'Author'
|
43 |
-
#: wp-updates-notifier.php:0
|
44 |
-
#@ wp-updates-notifier
|
45 |
-
msgid "Scott Cariss"
|
46 |
-
msgstr ""
|
47 |
-
|
48 |
-
#. translators: plugin header field 'AuthorURI'
|
49 |
-
#: wp-updates-notifier.php:0
|
50 |
-
#@ wp-updates-notifier
|
51 |
-
msgid "http://l3rady.com/"
|
52 |
-
msgstr ""
|
53 |
-
|
54 |
-
#: wp-updates-notifier.php:159
|
55 |
-
#: wp-updates-notifier.php:414
|
56 |
-
#@ wp-updates-notifier
|
57 |
-
msgid "Settings"
|
58 |
-
msgstr "Einstellungen"
|
59 |
-
|
60 |
-
#: wp-updates-notifier.php:187
|
61 |
-
#@ wp-updates-notifier
|
62 |
-
msgid "There are updates available for your WordPress site:"
|
63 |
-
msgstr "Es sind Aktualisierungen für Ihre WordPress-Webseite verfügbar:"
|
64 |
-
|
65 |
-
#: wp-updates-notifier.php:188
|
66 |
-
#, php-format
|
67 |
-
#@ wp-updates-notifier
|
68 |
-
msgid "Please visit %s to update."
|
69 |
-
msgstr "Bitte besuche %s um zu updaten."
|
70 |
-
|
71 |
-
#: wp-updates-notifier.php:209
|
72 |
-
#, php-format
|
73 |
-
#@ wp-updates-notifier
|
74 |
-
msgid "WP-Core: WordPress is out of date. Please update from version %s to %s"
|
75 |
-
msgstr "WordPress: WordPress ist veraltet. Bitte update von Version %s auf %s"
|
76 |
-
|
77 |
-
#: wp-updates-notifier.php:247
|
78 |
-
#, php-format
|
79 |
-
#@ wp-updates-notifier
|
80 |
-
msgid "Plugin: %s is out of date. Please update from version %s to %s"
|
81 |
-
msgstr "Plugin: %s ist veraltet. Bitte aktualisiere von Version %s auf %s"
|
82 |
-
|
83 |
-
#: wp-updates-notifier.php:248
|
84 |
-
#, php-format
|
85 |
-
#@ wp-updates-notifier
|
86 |
-
msgid "Details: %s"
|
87 |
-
msgstr "Details: %s"
|
88 |
-
|
89 |
-
#: wp-updates-notifier.php:249
|
90 |
-
#, php-format
|
91 |
-
#@ wp-updates-notifier
|
92 |
-
msgid "Changelog: %s%s"
|
93 |
-
msgstr "Änderungen: %s%s"
|
94 |
-
|
95 |
-
#: wp-updates-notifier.php:251
|
96 |
-
#, php-format
|
97 |
-
#@ default
|
98 |
-
msgid "Compatibility with WordPress %1$s: 100%% (according to its author)"
|
99 |
-
msgstr ""
|
100 |
-
|
101 |
-
#: wp-updates-notifier.php:254
|
102 |
-
#, php-format
|
103 |
-
#@ default
|
104 |
-
msgid "Compatibility with WordPress %1$s: %2$d%% (%3$d \"works\" votes out of %4$d total)"
|
105 |
-
msgstr ""
|
106 |
-
|
107 |
-
#: wp-updates-notifier.php:256
|
108 |
-
#, php-format
|
109 |
-
#@ default
|
110 |
-
msgid "Compatibility with WordPress %1$s: Unknown"
|
111 |
-
msgstr ""
|
112 |
-
|
113 |
-
#: wp-updates-notifier.php:258
|
114 |
-
#, php-format
|
115 |
-
#@ wp-updates-notifier
|
116 |
-
msgid "Compatibility: %s"
|
117 |
-
msgstr "Kompatibilität: %s"
|
118 |
-
|
119 |
-
#: wp-updates-notifier.php:295
|
120 |
-
#, php-format
|
121 |
-
#@ wp-updates-notifier
|
122 |
-
msgid "Theme: %s is out of date. Please update from version %s to %s"
|
123 |
-
msgstr "Theme: %s ist veraltet. Bitte aktualisiere von Version %s auf %s"
|
124 |
-
|
125 |
-
#: wp-updates-notifier.php:357
|
126 |
-
#, php-format
|
127 |
-
#@ wp-updates-notifier
|
128 |
-
msgid "WP Updates Notifier: Updates Available @ %s"
|
129 |
-
msgstr "WP Updates Notifier: Aktualisierungen stehen bereit @ %s"
|
130 |
-
|
131 |
-
#: wp-updates-notifier.php:406
|
132 |
-
#@ wp-updates-notifier
|
133 |
-
msgid "Save settings"
|
134 |
-
msgstr "Einstellungen speichern"
|
135 |
-
|
136 |
-
#: wp-updates-notifier.php:407
|
137 |
-
#@ wp-updates-notifier
|
138 |
-
msgid "Save settings with test email"
|
139 |
-
msgstr "Einstellungen speichern und Test-E-Mail versenden"
|
140 |
-
|
141 |
-
#: wp-updates-notifier.php:415
|
142 |
-
#@ wp-updates-notifier
|
143 |
-
msgid "Frequency to check"
|
144 |
-
msgstr "Check-Häufigkeit"
|
145 |
-
|
146 |
-
#: wp-updates-notifier.php:416
|
147 |
-
#@ wp-updates-notifier
|
148 |
-
msgid "Notify email to"
|
149 |
-
msgstr "Benachrichtigungs-E-Mail an"
|
150 |
-
|
151 |
-
#: wp-updates-notifier.php:417
|
152 |
-
#@ wp-updates-notifier
|
153 |
-
msgid "Notify email from"
|
154 |
-
msgstr "Benachrichtigungs-E-Mail-Absender"
|
155 |
-
|
156 |
-
#: wp-updates-notifier.php:418
|
157 |
-
#@ wp-updates-notifier
|
158 |
-
msgid "Notify about plugin updates?"
|
159 |
-
msgstr "Über Plugin-Aktualisierungen benachrichtigen?"
|
160 |
-
|
161 |
-
#: wp-updates-notifier.php:419
|
162 |
-
#@ wp-updates-notifier
|
163 |
-
msgid "Notify about theme updates?"
|
164 |
-
msgstr "Über Theme-Aktualisierungen benachrichtigen?"
|
165 |
-
|
166 |
-
#: wp-updates-notifier.php:420
|
167 |
-
#@ wp-updates-notifier
|
168 |
-
msgid "Hide core WP update nag from non-admin users?"
|
169 |
-
msgstr "WordPress-Aktualisierungen vor Nicht-Admins verstecken?"
|
170 |
-
|
171 |
-
#: wp-updates-notifier.php:429
|
172 |
-
#@ wp-updates-notifier
|
173 |
-
msgid "Invalid frequency entered"
|
174 |
-
msgstr "Ungültige Häufigkeit eingegeben"
|
175 |
-
|
176 |
-
#: wp-updates-notifier.php:439
|
177 |
-
#@ wp-updates-notifier
|
178 |
-
msgid "One or more email to addresses are invalid"
|
179 |
-
msgstr "Eine oder mehrere E-Mail-Adressen sind ungültig"
|
180 |
-
|
181 |
-
#: wp-updates-notifier.php:449
|
182 |
-
#@ wp-updates-notifier
|
183 |
-
msgid "No email to address entered"
|
184 |
-
msgstr "Keine E-Mail-Adresse eingegeben"
|
185 |
-
|
186 |
-
#: wp-updates-notifier.php:456
|
187 |
-
#@ wp-updates-notifier
|
188 |
-
msgid "Invalid email from entered"
|
189 |
-
msgstr "Ungültige Absender-E-Mail-Adresse eingegeben"
|
190 |
-
|
191 |
-
#: wp-updates-notifier.php:463
|
192 |
-
#@ wp-updates-notifier
|
193 |
-
msgid "Invalid plugin updates value entered"
|
194 |
-
msgstr "Ungültiger Wert für Plugin-Updates eingegeben"
|
195 |
-
|
196 |
-
#: wp-updates-notifier.php:470
|
197 |
-
#@ wp-updates-notifier
|
198 |
-
msgid "Invalid theme updates value entered"
|
199 |
-
msgstr "Ungültiger Wert für Theme-Updates eingegeben"
|
200 |
-
|
201 |
-
#: wp-updates-notifier.php:477
|
202 |
-
#@ wp-updates-notifier
|
203 |
-
msgid "Invalid hide updates value entered"
|
204 |
-
msgstr "Ungültiger Wert für \\\"Updates verstecken\\\" eingegeben"
|
205 |
-
|
206 |
-
#: wp-updates-notifier.php:488
|
207 |
-
#@ wp-updates-notifier
|
208 |
-
msgid "This is a test message from WP Updates Notifier."
|
209 |
-
msgstr "Dies ist eine Test-Nachricht von WP Updates Notifier."
|
210 |
-
|
211 |
-
#: wp-updates-notifier.php:496
|
212 |
-
#@ wp-updates-notifier
|
213 |
-
msgid "Hourly"
|
214 |
-
msgstr "Stündlich"
|
215 |
-
|
216 |
-
#: wp-updates-notifier.php:497
|
217 |
-
#@ wp-updates-notifier
|
218 |
-
msgid "Twice Daily"
|
219 |
-
msgstr "Zweimal täglich"
|
220 |
-
|
221 |
-
#: wp-updates-notifier.php:498
|
222 |
-
#@ wp-updates-notifier
|
223 |
-
msgid "Daily"
|
224 |
-
msgstr "Täglich"
|
225 |
-
|
226 |
-
#: wp-updates-notifier.php:504
|
227 |
-
#@ wp-updates-notifier
|
228 |
-
msgid "Separate multiple email address with a comma (,)"
|
229 |
-
msgstr "Trenne mehrere E-Mail-Adressen durch Komma (,)"
|
230 |
-
|
231 |
-
#: wp-updates-notifier.php:513
|
232 |
-
#: wp-updates-notifier.php:521
|
233 |
-
#: wp-updates-notifier.php:531
|
234 |
-
#@ wp-updates-notifier
|
235 |
-
msgid "No"
|
236 |
-
msgstr "Nein"
|
237 |
-
|
238 |
-
#: wp-updates-notifier.php:514
|
239 |
-
#: wp-updates-notifier.php:522
|
240 |
-
#: wp-updates-notifier.php:530
|
241 |
-
#@ wp-updates-notifier
|
242 |
-
msgid "Yes"
|
243 |
-
msgstr "Ja"
|
244 |
-
|
245 |
-
#: wp-updates-notifier.php:515
|
246 |
-
#@ wp-updates-notifier
|
247 |
-
msgid "Yes but only active plugins"
|
248 |
-
msgstr "Ja, aber nur aktive Plugins"
|
249 |
-
|
250 |
-
#: wp-updates-notifier.php:523
|
251 |
-
#@ wp-updates-notifier
|
252 |
-
msgid "Yes but only active themes"
|
253 |
-
msgstr "Ja, aber nur aktives Theme"
|
254 |
-
|
255 |
-
#. translators: plugin header field 'Version'
|
256 |
-
#: wp-updates-notifier.php:0
|
257 |
-
#@ wp-updates-notifier
|
258 |
-
msgid "1.3.1"
|
259 |
-
msgstr ""
|
260 |
-
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: WP Updates Notifier v1.3.1\n"
|
4 |
+
"Report-Msgid-Bugs-To: \n"
|
5 |
+
"POT-Creation-Date: \n"
|
6 |
+
"PO-Revision-Date: 2012-09-29 20:18:52+0000\n"
|
7 |
+
"Last-Translator: \n"
|
8 |
+
"Language-Team: \n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
13 |
+
"X-Poedit-Language: \n"
|
14 |
+
"X-Poedit-Country: \n"
|
15 |
+
"X-Poedit-SourceCharset: utf-8\n"
|
16 |
+
"X-Poedit-KeywordsList: __;_e;__ngettext:1,2;_n:1,2;__ngettext_noop:1,2;_n_noop:1,2;_c,_nc:4c,1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;\n"
|
17 |
+
"X-Poedit-Basepath: \n"
|
18 |
+
"X-Poedit-Bookmarks: \n"
|
19 |
+
"X-Poedit-SearchPath-0: .\n"
|
20 |
+
"X-Textdomain-Support: yes"
|
21 |
+
|
22 |
+
#. translators: plugin header field 'Name'
|
23 |
+
#: wp-updates-notifier.php:0
|
24 |
+
#: wp-updates-notifier.php:367
|
25 |
+
#: wp-updates-notifier.php:400
|
26 |
+
#@ wp-updates-notifier
|
27 |
+
msgid "WP Updates Notifier"
|
28 |
+
msgstr "Aktualisierungsalarm"
|
29 |
+
|
30 |
+
#. translators: plugin header field 'PluginURI'
|
31 |
+
#: wp-updates-notifier.php:0
|
32 |
+
#@ wp-updates-notifier
|
33 |
+
msgid "http://l3rady.com/projects/wp-updates-notifier/"
|
34 |
+
msgstr ""
|
35 |
+
|
36 |
+
#. translators: plugin header field 'Description'
|
37 |
+
#: wp-updates-notifier.php:0
|
38 |
+
#@ wp-updates-notifier
|
39 |
+
msgid "Sends email to notify you if there are any updates for your WordPress site. Can notify about core, plugin and theme updates."
|
40 |
+
msgstr "Sendet E-Mails, um Sie zu benachrichtigen, wenn es irgendwelche Aktualisierungen für Ihre WordPress-Website gibt. Kann über Aktualisierungen für WordPress, Plugins und Themes benachrichtigen."
|
41 |
+
|
42 |
+
#. translators: plugin header field 'Author'
|
43 |
+
#: wp-updates-notifier.php:0
|
44 |
+
#@ wp-updates-notifier
|
45 |
+
msgid "Scott Cariss"
|
46 |
+
msgstr ""
|
47 |
+
|
48 |
+
#. translators: plugin header field 'AuthorURI'
|
49 |
+
#: wp-updates-notifier.php:0
|
50 |
+
#@ wp-updates-notifier
|
51 |
+
msgid "http://l3rady.com/"
|
52 |
+
msgstr ""
|
53 |
+
|
54 |
+
#: wp-updates-notifier.php:159
|
55 |
+
#: wp-updates-notifier.php:414
|
56 |
+
#@ wp-updates-notifier
|
57 |
+
msgid "Settings"
|
58 |
+
msgstr "Einstellungen"
|
59 |
+
|
60 |
+
#: wp-updates-notifier.php:187
|
61 |
+
#@ wp-updates-notifier
|
62 |
+
msgid "There are updates available for your WordPress site:"
|
63 |
+
msgstr "Es sind Aktualisierungen für Ihre WordPress-Webseite verfügbar:"
|
64 |
+
|
65 |
+
#: wp-updates-notifier.php:188
|
66 |
+
#, php-format
|
67 |
+
#@ wp-updates-notifier
|
68 |
+
msgid "Please visit %s to update."
|
69 |
+
msgstr "Bitte besuche %s um zu updaten."
|
70 |
+
|
71 |
+
#: wp-updates-notifier.php:209
|
72 |
+
#, php-format
|
73 |
+
#@ wp-updates-notifier
|
74 |
+
msgid "WP-Core: WordPress is out of date. Please update from version %s to %s"
|
75 |
+
msgstr "WordPress: WordPress ist veraltet. Bitte update von Version %s auf %s"
|
76 |
+
|
77 |
+
#: wp-updates-notifier.php:247
|
78 |
+
#, php-format
|
79 |
+
#@ wp-updates-notifier
|
80 |
+
msgid "Plugin: %s is out of date. Please update from version %s to %s"
|
81 |
+
msgstr "Plugin: %s ist veraltet. Bitte aktualisiere von Version %s auf %s"
|
82 |
+
|
83 |
+
#: wp-updates-notifier.php:248
|
84 |
+
#, php-format
|
85 |
+
#@ wp-updates-notifier
|
86 |
+
msgid "Details: %s"
|
87 |
+
msgstr "Details: %s"
|
88 |
+
|
89 |
+
#: wp-updates-notifier.php:249
|
90 |
+
#, php-format
|
91 |
+
#@ wp-updates-notifier
|
92 |
+
msgid "Changelog: %s%s"
|
93 |
+
msgstr "Änderungen: %s%s"
|
94 |
+
|
95 |
+
#: wp-updates-notifier.php:251
|
96 |
+
#, php-format
|
97 |
+
#@ default
|
98 |
+
msgid "Compatibility with WordPress %1$s: 100%% (according to its author)"
|
99 |
+
msgstr ""
|
100 |
+
|
101 |
+
#: wp-updates-notifier.php:254
|
102 |
+
#, php-format
|
103 |
+
#@ default
|
104 |
+
msgid "Compatibility with WordPress %1$s: %2$d%% (%3$d \"works\" votes out of %4$d total)"
|
105 |
+
msgstr ""
|
106 |
+
|
107 |
+
#: wp-updates-notifier.php:256
|
108 |
+
#, php-format
|
109 |
+
#@ default
|
110 |
+
msgid "Compatibility with WordPress %1$s: Unknown"
|
111 |
+
msgstr ""
|
112 |
+
|
113 |
+
#: wp-updates-notifier.php:258
|
114 |
+
#, php-format
|
115 |
+
#@ wp-updates-notifier
|
116 |
+
msgid "Compatibility: %s"
|
117 |
+
msgstr "Kompatibilität: %s"
|
118 |
+
|
119 |
+
#: wp-updates-notifier.php:295
|
120 |
+
#, php-format
|
121 |
+
#@ wp-updates-notifier
|
122 |
+
msgid "Theme: %s is out of date. Please update from version %s to %s"
|
123 |
+
msgstr "Theme: %s ist veraltet. Bitte aktualisiere von Version %s auf %s"
|
124 |
+
|
125 |
+
#: wp-updates-notifier.php:357
|
126 |
+
#, php-format
|
127 |
+
#@ wp-updates-notifier
|
128 |
+
msgid "WP Updates Notifier: Updates Available @ %s"
|
129 |
+
msgstr "WP Updates Notifier: Aktualisierungen stehen bereit @ %s"
|
130 |
+
|
131 |
+
#: wp-updates-notifier.php:406
|
132 |
+
#@ wp-updates-notifier
|
133 |
+
msgid "Save settings"
|
134 |
+
msgstr "Einstellungen speichern"
|
135 |
+
|
136 |
+
#: wp-updates-notifier.php:407
|
137 |
+
#@ wp-updates-notifier
|
138 |
+
msgid "Save settings with test email"
|
139 |
+
msgstr "Einstellungen speichern und Test-E-Mail versenden"
|
140 |
+
|
141 |
+
#: wp-updates-notifier.php:415
|
142 |
+
#@ wp-updates-notifier
|
143 |
+
msgid "Frequency to check"
|
144 |
+
msgstr "Check-Häufigkeit"
|
145 |
+
|
146 |
+
#: wp-updates-notifier.php:416
|
147 |
+
#@ wp-updates-notifier
|
148 |
+
msgid "Notify email to"
|
149 |
+
msgstr "Benachrichtigungs-E-Mail an"
|
150 |
+
|
151 |
+
#: wp-updates-notifier.php:417
|
152 |
+
#@ wp-updates-notifier
|
153 |
+
msgid "Notify email from"
|
154 |
+
msgstr "Benachrichtigungs-E-Mail-Absender"
|
155 |
+
|
156 |
+
#: wp-updates-notifier.php:418
|
157 |
+
#@ wp-updates-notifier
|
158 |
+
msgid "Notify about plugin updates?"
|
159 |
+
msgstr "Über Plugin-Aktualisierungen benachrichtigen?"
|
160 |
+
|
161 |
+
#: wp-updates-notifier.php:419
|
162 |
+
#@ wp-updates-notifier
|
163 |
+
msgid "Notify about theme updates?"
|
164 |
+
msgstr "Über Theme-Aktualisierungen benachrichtigen?"
|
165 |
+
|
166 |
+
#: wp-updates-notifier.php:420
|
167 |
+
#@ wp-updates-notifier
|
168 |
+
msgid "Hide core WP update nag from non-admin users?"
|
169 |
+
msgstr "WordPress-Aktualisierungen vor Nicht-Admins verstecken?"
|
170 |
+
|
171 |
+
#: wp-updates-notifier.php:429
|
172 |
+
#@ wp-updates-notifier
|
173 |
+
msgid "Invalid frequency entered"
|
174 |
+
msgstr "Ungültige Häufigkeit eingegeben"
|
175 |
+
|
176 |
+
#: wp-updates-notifier.php:439
|
177 |
+
#@ wp-updates-notifier
|
178 |
+
msgid "One or more email to addresses are invalid"
|
179 |
+
msgstr "Eine oder mehrere E-Mail-Adressen sind ungültig"
|
180 |
+
|
181 |
+
#: wp-updates-notifier.php:449
|
182 |
+
#@ wp-updates-notifier
|
183 |
+
msgid "No email to address entered"
|
184 |
+
msgstr "Keine E-Mail-Adresse eingegeben"
|
185 |
+
|
186 |
+
#: wp-updates-notifier.php:456
|
187 |
+
#@ wp-updates-notifier
|
188 |
+
msgid "Invalid email from entered"
|
189 |
+
msgstr "Ungültige Absender-E-Mail-Adresse eingegeben"
|
190 |
+
|
191 |
+
#: wp-updates-notifier.php:463
|
192 |
+
#@ wp-updates-notifier
|
193 |
+
msgid "Invalid plugin updates value entered"
|
194 |
+
msgstr "Ungültiger Wert für Plugin-Updates eingegeben"
|
195 |
+
|
196 |
+
#: wp-updates-notifier.php:470
|
197 |
+
#@ wp-updates-notifier
|
198 |
+
msgid "Invalid theme updates value entered"
|
199 |
+
msgstr "Ungültiger Wert für Theme-Updates eingegeben"
|
200 |
+
|
201 |
+
#: wp-updates-notifier.php:477
|
202 |
+
#@ wp-updates-notifier
|
203 |
+
msgid "Invalid hide updates value entered"
|
204 |
+
msgstr "Ungültiger Wert für \\\"Updates verstecken\\\" eingegeben"
|
205 |
+
|
206 |
+
#: wp-updates-notifier.php:488
|
207 |
+
#@ wp-updates-notifier
|
208 |
+
msgid "This is a test message from WP Updates Notifier."
|
209 |
+
msgstr "Dies ist eine Test-Nachricht von WP Updates Notifier."
|
210 |
+
|
211 |
+
#: wp-updates-notifier.php:496
|
212 |
+
#@ wp-updates-notifier
|
213 |
+
msgid "Hourly"
|
214 |
+
msgstr "Stündlich"
|
215 |
+
|
216 |
+
#: wp-updates-notifier.php:497
|
217 |
+
#@ wp-updates-notifier
|
218 |
+
msgid "Twice Daily"
|
219 |
+
msgstr "Zweimal täglich"
|
220 |
+
|
221 |
+
#: wp-updates-notifier.php:498
|
222 |
+
#@ wp-updates-notifier
|
223 |
+
msgid "Daily"
|
224 |
+
msgstr "Täglich"
|
225 |
+
|
226 |
+
#: wp-updates-notifier.php:504
|
227 |
+
#@ wp-updates-notifier
|
228 |
+
msgid "Separate multiple email address with a comma (,)"
|
229 |
+
msgstr "Trenne mehrere E-Mail-Adressen durch Komma (,)"
|
230 |
+
|
231 |
+
#: wp-updates-notifier.php:513
|
232 |
+
#: wp-updates-notifier.php:521
|
233 |
+
#: wp-updates-notifier.php:531
|
234 |
+
#@ wp-updates-notifier
|
235 |
+
msgid "No"
|
236 |
+
msgstr "Nein"
|
237 |
+
|
238 |
+
#: wp-updates-notifier.php:514
|
239 |
+
#: wp-updates-notifier.php:522
|
240 |
+
#: wp-updates-notifier.php:530
|
241 |
+
#@ wp-updates-notifier
|
242 |
+
msgid "Yes"
|
243 |
+
msgstr "Ja"
|
244 |
+
|
245 |
+
#: wp-updates-notifier.php:515
|
246 |
+
#@ wp-updates-notifier
|
247 |
+
msgid "Yes but only active plugins"
|
248 |
+
msgstr "Ja, aber nur aktive Plugins"
|
249 |
+
|
250 |
+
#: wp-updates-notifier.php:523
|
251 |
+
#@ wp-updates-notifier
|
252 |
+
msgid "Yes but only active themes"
|
253 |
+
msgstr "Ja, aber nur aktives Theme"
|
254 |
+
|
255 |
+
#. translators: plugin header field 'Version'
|
256 |
+
#: wp-updates-notifier.php:0
|
257 |
+
#@ wp-updates-notifier
|
258 |
+
msgid "1.3.1"
|
259 |
+
msgstr ""
|
260 |
+
|
readme.txt
CHANGED
@@ -1,88 +1,99 @@
|
|
1 |
-
=== Plugin Name ===
|
2 |
-
Contributors: l3rady
|
3 |
-
Donate link: http://l3rady.com/donate
|
4 |
-
Tags: admin, theme, monitor, plugin, notification, upgrade, security
|
5 |
-
Requires at least: 3.1
|
6 |
-
Tested up to: 3.
|
7 |
-
Stable tag: 1.
|
8 |
-
|
9 |
-
Sends email to notify you if there are any updates for your WordPress site. Can notify about core, plugin and theme updates.
|
10 |
-
|
11 |
-
== Description ==
|
12 |
-
|
13 |
-
Monitors your WordPress installation for core, plugin and theme updates and emails you when they are available. This plugin is ideal if you don't login to your WordPress admin regularly or you support a client's website.
|
14 |
-
|
15 |
-
*Features*
|
16 |
-
|
17 |
-
- Set the interval of how often to check for updates; hourly, twice daily or daily.
|
18 |
-
- Sets WordPress to check for updates more often meaning you get to know about updates sooner.
|
19 |
-
- Get emailed about core, plugin and theme updates.
|
20 |
-
- Chose if you want to be notified about active only themes and plugins updates.
|
21 |
-
- Remove upgrade nag message to non-admin users.
|
22 |
-
- For advanced users there are a number of filters and actions you can use. More coming soon.
|
23 |
-
|
24 |
-
This plugin is a fork of [Update Notifier](http://wordpress.org/extend/plugins/update-notifier/). This plugin was forked because there seemed to be no further development on the existing plugin and there was no way to contact the original author to ask about taking ownership. WP Updates Notifier has the following improvements over Updates Notifier:
|
25 |
-
|
26 |
-
- Completely rewritten from the ground up using best practises for writing WordPress plugins
|
27 |
-
- Code wrapped in a class so better namespace.
|
28 |
-
- You can set the cron interval, allowing for more frequent checks.
|
29 |
-
- Update checks trigger WordPress internal update check before notification.
|
30 |
-
- Allows you to set the 'from address'.
|
31 |
-
- Allows you to set multiple 'to addresses'.
|
32 |
-
- Makes use of the Settings API.
|
33 |
-
- A number of available hooks and filters for advanced users.
|
34 |
-
- Active support and development.
|
35 |
-
|
36 |
-
*Languages*
|
37 |
-
|
38 |
-
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
*
|
44 |
-
*
|
45 |
-
*
|
46 |
-
*
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
*
|
58 |
-
|
59 |
-
= 1.
|
60 |
-
*
|
61 |
-
|
62 |
-
|
63 |
-
* Added
|
64 |
-
*
|
65 |
-
|
66 |
-
= 1.2 =
|
67 |
-
* Added
|
68 |
-
*
|
69 |
-
|
70 |
-
= 1.1 =
|
71 |
-
*
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
*
|
80 |
-
|
81 |
-
= 1.
|
82 |
-
*
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== Plugin Name ===
|
2 |
+
Contributors: l3rady
|
3 |
+
Donate link: http://l3rady.com/donate
|
4 |
+
Tags: admin, theme, monitor, plugin, notification, upgrade, security
|
5 |
+
Requires at least: 3.1
|
6 |
+
Tested up to: 3.8.1
|
7 |
+
Stable tag: 1.4.1
|
8 |
+
|
9 |
+
Sends email to notify you if there are any updates for your WordPress site. Can notify about core, plugin and theme updates.
|
10 |
+
|
11 |
+
== Description ==
|
12 |
+
|
13 |
+
Monitors your WordPress installation for core, plugin and theme updates and emails you when they are available. This plugin is ideal if you don't login to your WordPress admin regularly or you support a client's website.
|
14 |
+
|
15 |
+
*Features*
|
16 |
+
|
17 |
+
- Set the interval of how often to check for updates; hourly, twice daily or daily.
|
18 |
+
- Sets WordPress to check for updates more often meaning you get to know about updates sooner.
|
19 |
+
- Get emailed about core, plugin and theme updates.
|
20 |
+
- Chose if you want to be notified about active only themes and plugins updates.
|
21 |
+
- Remove upgrade nag message to non-admin users.
|
22 |
+
- For advanced users there are a number of filters and actions you can use. More coming soon.
|
23 |
+
|
24 |
+
This plugin is a fork of [Update Notifier](http://wordpress.org/extend/plugins/update-notifier/). This plugin was forked because there seemed to be no further development on the existing plugin and there was no way to contact the original author to ask about taking ownership. WP Updates Notifier has the following improvements over Updates Notifier:
|
25 |
+
|
26 |
+
- Completely rewritten from the ground up using best practises for writing WordPress plugins
|
27 |
+
- Code wrapped in a class so better namespace.
|
28 |
+
- You can set the cron interval, allowing for more frequent checks.
|
29 |
+
- Update checks trigger WordPress internal update check before notification.
|
30 |
+
- Allows you to set the 'from address'.
|
31 |
+
- Allows you to set multiple 'to addresses'.
|
32 |
+
- Makes use of the Settings API.
|
33 |
+
- A number of available hooks and filters for advanced users.
|
34 |
+
- Active support and development.
|
35 |
+
|
36 |
+
*Languages*
|
37 |
+
|
38 |
+
- French by [Christophe Catarina](http://www.ordilibre.com/) - *Added 03 July 2013*
|
39 |
+
- German by [Alexander Pfabel](http://alexander.pfabel.de/) - *Added 02 October 2012*
|
40 |
+
|
41 |
+
== Installation ==
|
42 |
+
|
43 |
+
* Unzip and upload contents to your plugins directory (usually wp-content/plugins/).
|
44 |
+
* Activate plugin
|
45 |
+
* Visit Settings page under Settings -> WP Updates Monitor in your WordPress Administration Area
|
46 |
+
* Configure plugin settings
|
47 |
+
* Wait for email notifications of updates
|
48 |
+
|
49 |
+
== Screenshots ==
|
50 |
+
|
51 |
+
1. Settings page
|
52 |
+
2. Email alert
|
53 |
+
|
54 |
+
== Changelog ==
|
55 |
+
|
56 |
+
= 1.4.1 =
|
57 |
+
* Switch from using site_url() to home_url() in email subject line so not to link to a 404 page.
|
58 |
+
|
59 |
+
= 1.4 =
|
60 |
+
* Added external cron method allowing users check for updates as often or as little as they want
|
61 |
+
* Added sc_wpun_get_options_filter and sc_wpun_put_options_filter filters to allow filtering of this plugins settings
|
62 |
+
* Now using wp_get_schedules() rather than statically assigned schedules. This allows admins to set their own schedules such as a weekly one
|
63 |
+
* Added French translations
|
64 |
+
* Added date and time of when this plugin last did an update check on the settings screen
|
65 |
+
|
66 |
+
= 1.3.2 =
|
67 |
+
* Added $wp_version globals ( Explains why WordPress Core Updates notifications haven't been working )
|
68 |
+
* Added missed variable $cur_wp_version
|
69 |
+
|
70 |
+
= 1.3.1 =
|
71 |
+
* Fixed PHP Fatal error on line 175.
|
72 |
+
|
73 |
+
= 1.3 =
|
74 |
+
* Added send test email functionality in settings page.
|
75 |
+
* Fixed `Call-time pass-by-reference has been deprecated` PHP errors.
|
76 |
+
|
77 |
+
= 1.2 =
|
78 |
+
* Added the ability to allow multiple email address to be added to the `notify to` setting. Multiple email addresses to be comma separated.
|
79 |
+
* Removed code from last version that was left in from dev. Caused WP to check for update on every admin page load.
|
80 |
+
|
81 |
+
= 1.1 =
|
82 |
+
* Plugin update notification email now includes links to new plugin description and changelog page.
|
83 |
+
* Plugin update notification email now shows compatibility of a new plugin. This is same functionality that appears in the WP update area.
|
84 |
+
* On plugin activation the first update check is scheduled to run an hour after rather than straight away. This stops current awaiting updates being sent to admin email before you've had chance to change the email settings.
|
85 |
+
|
86 |
+
= 1.0.4 =
|
87 |
+
* Fixed code to not report multiple times of core upgrades. Plugin now only notifies you once of core upgrade until upgrade is done.
|
88 |
+
|
89 |
+
= 1.0.3 =
|
90 |
+
* When plugin was deactivated then reactivated the cron was not rescheduled unless the settings were saved. This has now been fixed.
|
91 |
+
|
92 |
+
= 1.0.2 =
|
93 |
+
* Fixed plugin version
|
94 |
+
|
95 |
+
= 1.0.1 =
|
96 |
+
* Fixed spelling mistake in deactivate hook that stopped deactivate running properly.
|
97 |
+
|
98 |
+
= 1.0 =
|
99 |
+
* Initial release
|
uninstall.php
CHANGED
@@ -1,24 +1,24 @@
|
|
1 |
-
<?php
|
2 |
-
/* Copyright
|
3 |
-
|
4 |
-
This program is free software; you can redistribute it and/or modify
|
5 |
-
it under the terms of the GNU General Public License as published by
|
6 |
-
the Free Software Foundation; either version 2 of the License, or
|
7 |
-
(at your option) any later version.
|
8 |
-
|
9 |
-
This program is distributed in the hope that it will be useful,
|
10 |
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11 |
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12 |
-
GNU General Public License for more details.
|
13 |
-
|
14 |
-
You should have received a copy of the GNU General Public License
|
15 |
-
along with this program; if not, write to the Free Software
|
16 |
-
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
17 |
-
*/
|
18 |
-
|
19 |
-
if(!defined(
|
20 |
-
exit();
|
21 |
-
}
|
22 |
-
|
23 |
-
delete_option("
|
24 |
-
|
1 |
+
<?php
|
2 |
+
/* Copyright 2014 Scott Cariss (email : scott@l3rady.com)
|
3 |
+
|
4 |
+
This program is free software; you can redistribute it and/or modify
|
5 |
+
it under the terms of the GNU General Public License as published by
|
6 |
+
the Free Software Foundation; either version 2 of the License, or
|
7 |
+
(at your option) any later version.
|
8 |
+
|
9 |
+
This program is distributed in the hope that it will be useful,
|
10 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
11 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
12 |
+
GNU General Public License for more details.
|
13 |
+
|
14 |
+
You should have received a copy of the GNU General Public License
|
15 |
+
along with this program; if not, write to the Free Software
|
16 |
+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
17 |
+
*/
|
18 |
+
|
19 |
+
if ( !defined( "WP_UNINSTALL_PLUGIN" ) ) {
|
20 |
+
exit();
|
21 |
+
}
|
22 |
+
|
23 |
+
delete_option( "sc_wpun_settings" );
|
24 |
+
delete_option( "sc_wpun_settings_ver" );
|
wp-updates-notifier.php
CHANGED
@@ -1,547 +1,740 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Plugin Name: WP Updates Notifier
|
4 |
-
Plugin URI:
|
5 |
-
Description: Sends email to notify you if there are any updates for your WordPress site. Can notify about core, plugin and theme updates.
|
6 |
-
Author: Scott Cariss
|
7 |
-
Version: 1.
|
8 |
-
Author URI: http://l3rady.com/
|
9 |
-
Text Domain: wp-updates-notifier
|
10 |
-
Domain Path: /languages
|
11 |
-
*/
|
12 |
-
|
13 |
-
/* Copyright
|
14 |
-
|
15 |
-
This program is free software; you can redistribute it and/or modify
|
16 |
-
it under the terms of the GNU General Public License as published by
|
17 |
-
the Free Software Foundation; either version 2 of the License, or
|
18 |
-
(at your option) any later version.
|
19 |
-
|
20 |
-
This program is distributed in the hope that it will be useful,
|
21 |
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
22 |
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
23 |
-
GNU General Public License for more details.
|
24 |
-
|
25 |
-
You should have received a copy of the GNU General Public License
|
26 |
-
along with this program; if not, write to the Free Software
|
27 |
-
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
28 |
-
*/
|
29 |
-
|
30 |
-
// Only load class if it hasn't already been loaded
|
31 |
-
if (!class_exists('sc_WPUpdatesNotifier')) {
|
32 |
-
|
33 |
-
// WP Updates Notifier - All the magic happens here!
|
34 |
-
class sc_WPUpdatesNotifier {
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
// Add
|
50 |
-
add_filter('
|
51 |
-
|
52 |
-
|
53 |
-
// Add
|
54 |
-
add_action('
|
55 |
-
add_action('admin_init', array(__CLASS__, '
|
56 |
-
|
57 |
-
add_action('sc_wpun_enable_cron', array(__CLASS__, 'enable_cron')); // action to enable cron
|
58 |
-
add_action('sc_wpun_disable_cron', array(__CLASS__, 'disable_cron')); // action to disable cron
|
59 |
-
add_action(self
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
if (
|
156 |
-
|
157 |
-
}
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
public function
|
397 |
-
$
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
$
|
456 |
-
if(
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
}
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
$
|
523 |
-
?>
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
}
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
547 |
?>
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Plugin Name: WP Updates Notifier
|
4 |
+
Plugin URI: https://github.com/l3rady/wp-updates-notifier
|
5 |
+
Description: Sends email to notify you if there are any updates for your WordPress site. Can notify about core, plugin and theme updates.
|
6 |
+
Author: Scott Cariss
|
7 |
+
Version: 1.4.1
|
8 |
+
Author URI: http://l3rady.com/
|
9 |
+
Text Domain: wp-updates-notifier
|
10 |
+
Domain Path: /languages
|
11 |
+
*/
|
12 |
+
|
13 |
+
/* Copyright 2014 Scott Cariss (email : scott@l3rady.com)
|
14 |
+
|
15 |
+
This program is free software; you can redistribute it and/or modify
|
16 |
+
it under the terms of the GNU General Public License as published by
|
17 |
+
the Free Software Foundation; either version 2 of the License, or
|
18 |
+
(at your option) any later version.
|
19 |
+
|
20 |
+
This program is distributed in the hope that it will be useful,
|
21 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
22 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
23 |
+
GNU General Public License for more details.
|
24 |
+
|
25 |
+
You should have received a copy of the GNU General Public License
|
26 |
+
along with this program; if not, write to the Free Software
|
27 |
+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
28 |
+
*/
|
29 |
+
|
30 |
+
// Only load class if it hasn't already been loaded
|
31 |
+
if ( !class_exists( 'sc_WPUpdatesNotifier' ) ) {
|
32 |
+
|
33 |
+
// WP Updates Notifier - All the magic happens here!
|
34 |
+
class sc_WPUpdatesNotifier {
|
35 |
+
const OPT_FIELD = "sc_wpun_settings";
|
36 |
+
const OPT_VERSION_FIELD = "sc_wpun_settings_ver";
|
37 |
+
const OPT_VERSION = "5.0";
|
38 |
+
const CRON_NAME = "sc_wpun_update_check";
|
39 |
+
|
40 |
+
public static function init() {
|
41 |
+
// Check settings are up to date
|
42 |
+
self::settingsUpToDate();
|
43 |
+
// Create Activation and Deactivation Hooks
|
44 |
+
register_activation_hook( __FILE__, array( __CLASS__, 'activate' ) );
|
45 |
+
register_deactivation_hook( __FILE__, array( __CLASS__, 'deactivate' ) );
|
46 |
+
// Internationalization
|
47 |
+
load_plugin_textdomain( 'wp-updates-notifier', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
|
48 |
+
// Add Filters
|
49 |
+
add_filter( 'plugin_action_links', array( __CLASS__, 'plugin_action_links' ), 10, 2 ); // Add settings link to plugin in plugin list
|
50 |
+
add_filter( 'sc_wpun_plugins_need_update', array( __CLASS__, 'check_plugins_against_notified' ) ); // Filter out plugins that need update if already been notified
|
51 |
+
add_filter( 'sc_wpun_themes_need_update', array( __CLASS__, 'check_themes_against_notified' ) ); // Filter out themes that need update if already been notified
|
52 |
+
// Add Actions
|
53 |
+
add_action( 'admin_menu', array( __CLASS__, 'admin_settings_menu' ) ); // Add menu to options
|
54 |
+
add_action( 'admin_init', array( __CLASS__, 'admin_settings_init' ) ); // Add admin init functions
|
55 |
+
add_action( 'admin_init', array( __CLASS__, 'remove_update_nag_for_nonadmins' ) ); // See if we remove update nag for non admins
|
56 |
+
add_action( 'admin_init', array( __CLASS__, 'admin_register_scripts_styles' ) );
|
57 |
+
add_action( 'sc_wpun_enable_cron', array( __CLASS__, 'enable_cron' ) ); // action to enable cron
|
58 |
+
add_action( 'sc_wpun_disable_cron', array( __CLASS__, 'disable_cron' ) ); // action to disable cron
|
59 |
+
add_action( self::CRON_NAME, array( __CLASS__, 'do_update_check' ) ); // action to link cron task to actual task
|
60 |
+
add_action( 'wp_ajax_sc_wpun_check', array( __CLASS__, 'sc_wpun_check' ) ); // Admin ajax hook for remote cron method.
|
61 |
+
add_action( 'wp_ajax_nopriv_sc_wpun_check', array( __CLASS__, 'sc_wpun_check' ) ); // Admin ajax hook for remote cron method.
|
62 |
+
}
|
63 |
+
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Check if this plugin settings are up to date. Firstly check the version in
|
67 |
+
* the DB. If they don't match then load in defaults but don't override values
|
68 |
+
* already set. Also this will remove obsolete settings that are not needed.
|
69 |
+
*
|
70 |
+
* @return void
|
71 |
+
*/
|
72 |
+
private function settingsUpToDate() {
|
73 |
+
$current_ver = self::getSetOptions( self::OPT_VERSION_FIELD ); // Get current plugin version
|
74 |
+
if ( self::OPT_VERSION != $current_ver ) { // is the version the same as this plugin?
|
75 |
+
$options = (array) get_option( self::OPT_FIELD ); // get current settings from DB
|
76 |
+
$defaults = array( // Here are our default values for this plugin
|
77 |
+
'cron_method' => 'wordpress', // Cron method to be used for scheduling scans
|
78 |
+
'frequency' => 'hourly',
|
79 |
+
'notify_to' => get_option( 'admin_email' ),
|
80 |
+
'notify_from' => get_option( 'admin_email' ),
|
81 |
+
'notify_plugins' => 1,
|
82 |
+
'notify_themes' => 1,
|
83 |
+
'hide_updates' => 1,
|
84 |
+
'notified' => array(
|
85 |
+
'core' => "",
|
86 |
+
'plugin' => array(),
|
87 |
+
'theme' => array(),
|
88 |
+
),
|
89 |
+
'security_key' => sha1( microtime( true ) . mt_rand( 10000, 90000 ) ), // Generate a random key to be used for Other Cron Method,
|
90 |
+
'last_check_time' => false
|
91 |
+
);
|
92 |
+
// Intersect current options with defaults. Basically removing settings that are obsolete
|
93 |
+
$options = array_intersect_key( $options, $defaults );
|
94 |
+
// Merge current settings with defaults. Basically adding any new settings with defaults that we dont have.
|
95 |
+
$options = array_merge( $defaults, $options );
|
96 |
+
self::getSetOptions( self::OPT_FIELD, $options ); // update settings
|
97 |
+
self::getSetOptions( self::OPT_VERSION_FIELD, self::OPT_VERSION ); // update settings version
|
98 |
+
}
|
99 |
+
}
|
100 |
+
|
101 |
+
|
102 |
+
/**
|
103 |
+
* Filter for when getting or settings this plugins settings
|
104 |
+
*
|
105 |
+
* @param string $field Option field name of where we are getting or setting plugin settings
|
106 |
+
* @param bool|mixed $settings False if getting settings else an array with settings you are saving
|
107 |
+
*
|
108 |
+
* @return bool|mixed True or false if setting or an array of settings if getting
|
109 |
+
*/
|
110 |
+
private static function getSetOptions( $field, $settings = false ) {
|
111 |
+
if ( $settings === false ) {
|
112 |
+
return apply_filters( 'sc_wpun_get_options_filter', get_option( $field ), $field );
|
113 |
+
}
|
114 |
+
|
115 |
+
return update_option( $field, apply_filters( 'sc_wpun_put_options_filter', $settings, $field ) );
|
116 |
+
}
|
117 |
+
|
118 |
+
|
119 |
+
/**
|
120 |
+
* Function that deals with activation of this plugin
|
121 |
+
*
|
122 |
+
* @return void
|
123 |
+
*/
|
124 |
+
public static function activate() {
|
125 |
+
do_action( "sc_wpun_enable_cron" ); // Enable cron
|
126 |
+
}
|
127 |
+
|
128 |
+
|
129 |
+
/**
|
130 |
+
* Function that deals with de-activation of this plugin
|
131 |
+
*
|
132 |
+
* @return void
|
133 |
+
*/
|
134 |
+
public static function deactivate() {
|
135 |
+
do_action( "sc_wpun_disable_cron" ); // Disable cron
|
136 |
+
}
|
137 |
+
|
138 |
+
|
139 |
+
/**
|
140 |
+
* Enable cron for this plugin. Check if a cron should be scheduled.
|
141 |
+
*
|
142 |
+
* @param bool|string $manual_interval For setting a manual cron interval.
|
143 |
+
*
|
144 |
+
* @return void
|
145 |
+
*/
|
146 |
+
public function enable_cron( $manual_interval = false ) {
|
147 |
+
$options = self::getSetOptions( self::OPT_FIELD ); // Get settings
|
148 |
+
$currentSchedule = wp_get_schedule( self::CRON_NAME ); // find if a schedule already exists
|
149 |
+
|
150 |
+
// if a manual cron interval is set, use this
|
151 |
+
if ( false !== $manual_interval ) {
|
152 |
+
$options['frequency'] = $manual_interval;
|
153 |
+
}
|
154 |
+
|
155 |
+
if ( "manual" == $options['frequency'] ) {
|
156 |
+
do_action( "sc_wpun_disable_cron" ); // Make sure no cron is setup as we are manual
|
157 |
+
}
|
158 |
+
else {
|
159 |
+
// check if the current schedule matches the one set in settings
|
160 |
+
if ( $currentSchedule == $options['frequency'] ) {
|
161 |
+
return;
|
162 |
+
}
|
163 |
+
|
164 |
+
// check the cron setting is valid
|
165 |
+
if ( !in_array( $options['frequency'], self::get_intervals() ) ) {
|
166 |
+
return;
|
167 |
+
}
|
168 |
+
|
169 |
+
// Remove any cron's for this plugin first so we don't end up with multiple cron's doing the same thing.
|
170 |
+
do_action( "sc_wpun_disable_cron" );
|
171 |
+
|
172 |
+
// Schedule cron for this plugin.
|
173 |
+
wp_schedule_event( time(), $options['frequency'], self::CRON_NAME );
|
174 |
+
}
|
175 |
+
}
|
176 |
+
|
177 |
+
|
178 |
+
/**
|
179 |
+
* Removes cron for this plugin.
|
180 |
+
*
|
181 |
+
* @return void
|
182 |
+
*/
|
183 |
+
public function disable_cron() {
|
184 |
+
wp_clear_scheduled_hook( self::CRON_NAME ); // clear cron
|
185 |
+
}
|
186 |
+
|
187 |
+
|
188 |
+
/**
|
189 |
+
* Adds the settings link under the plugin on the plugin screen.
|
190 |
+
*
|
191 |
+
* @param array $links
|
192 |
+
* @param string $file
|
193 |
+
*
|
194 |
+
* @return array $links
|
195 |
+
*/
|
196 |
+
public static function plugin_action_links( $links, $file ) {
|
197 |
+
static $this_plugin;
|
198 |
+
if ( !$this_plugin ) {
|
199 |
+
$this_plugin = plugin_basename( __FILE__ );
|
200 |
+
}
|
201 |
+
if ( $file == $this_plugin ) {
|
202 |
+
$settings_link = '<a href="' . admin_url( 'options-general.php?page=wp-updates-notifier' ) . '">' . __( "Settings", "wp-updates-notifier" ) . '</a>';
|
203 |
+
array_unshift( $links, $settings_link );
|
204 |
+
}
|
205 |
+
return $links;
|
206 |
+
}
|
207 |
+
|
208 |
+
|
209 |
+
/**
|
210 |
+
* This is run by the cron. The update check checks the core always, the
|
211 |
+
* plugins and themes if asked. If updates found email notification sent.
|
212 |
+
*
|
213 |
+
* @return void
|
214 |
+
*/
|
215 |
+
public function do_update_check() {
|
216 |
+
$options = self::getSetOptions( self::OPT_FIELD ); // get settings
|
217 |
+
$message = ""; // start with a blank message
|
218 |
+
$core_updated = self::core_update_check( $message ); // check the WP core for updates
|
219 |
+
if ( 0 != $options['notify_plugins'] ) { // are we to check for plugin updates?
|
220 |
+
$plugins_updated = self::plugins_update_check( $message, $options['notify_plugins'] ); // check for plugin updates
|
221 |
+
}
|
222 |
+
else {
|
223 |
+
$plugins_updated = false; // no plugin updates
|
224 |
+
}
|
225 |
+
if ( 0 != $options['notify_themes'] ) { // are we to check for theme updates?
|
226 |
+
$themes_updated = self::themes_update_check( $message, $options['notify_themes'] ); // check for theme updates
|
227 |
+
}
|
228 |
+
else {
|
229 |
+
$themes_updated = false; // no theme updates
|
230 |
+
}
|
231 |
+
if ( $core_updated || $plugins_updated || $themes_updated ) { // Did anything come back as need updating?
|
232 |
+
$message = __( "There are updates available for your WordPress site:", "wp-updates-notifier" ) . "\n" . $message . "\n";
|
233 |
+
$message .= sprintf( __( "Please visit %s to update.", "wp-updates-notifier" ), admin_url( 'update-core.php' ) );
|
234 |
+
self::send_notification_email( $message ); // send our notification email.
|
235 |
+
}
|
236 |
+
|
237 |
+
self::log_last_check_time();
|
238 |
+
}
|
239 |
+
|
240 |
+
|
241 |
+
/**
|
242 |
+
* Checks to see if any WP core updates
|
243 |
+
*
|
244 |
+
* @param string $message holds message to be sent via notification
|
245 |
+
*
|
246 |
+
* @return bool
|
247 |
+
*/
|
248 |
+
private static function core_update_check( &$message ) {
|
249 |
+
global $wp_version;
|
250 |
+
$settings = self::getSetOptions( self::OPT_FIELD ); // get settings
|
251 |
+
do_action( "wp_version_check" ); // force WP to check its core for updates
|
252 |
+
$update_core = get_site_transient( "update_core" ); // get information of updates
|
253 |
+
if ( 'upgrade' == $update_core->updates[0]->response ) { // is WP core update available?
|
254 |
+
if ( $update_core->updates[0]->current != $settings['notified']['core'] ) { // have we already notified about this version?
|
255 |
+
require_once( ABSPATH . WPINC . '/version.php' ); // Including this because some plugins can mess with the real version stored in the DB.
|
256 |
+
$new_core_ver = $update_core->updates[0]->current; // The new WP core version
|
257 |
+
$old_core_ver = $wp_version; // the old WP core version
|
258 |
+
$message .= "\n" . sprintf( __( "WP-Core: WordPress is out of date. Please update from version %s to %s", "wp-updates-notifier" ), $old_core_ver, $new_core_ver ) . "\n";
|
259 |
+
$settings['notified']['core'] = $new_core_ver; // set core version we are notifying about
|
260 |
+
self::getSetOptions( self::OPT_FIELD, $settings ); // update settings
|
261 |
+
return true; // we have updates so return true
|
262 |
+
}
|
263 |
+
else {
|
264 |
+
return false; // There are updates but we have already notified in the past.
|
265 |
+
}
|
266 |
+
}
|
267 |
+
$settings['notified']['core'] = ""; // no updates lets set this nothing
|
268 |
+
self::getSetOptions( self::OPT_FIELD, $settings ); // update settings
|
269 |
+
return false; // no updates return false
|
270 |
+
}
|
271 |
+
|
272 |
+
|
273 |
+
/**
|
274 |
+
* Check to see if any plugin updates.
|
275 |
+
*
|
276 |
+
* @param string $message holds message to be sent via notification
|
277 |
+
* @param int $allOrActive should we look for all plugins or just active ones
|
278 |
+
*
|
279 |
+
* @return bool
|
280 |
+
*/
|
281 |
+
private static function plugins_update_check( &$message, $allOrActive ) {
|
282 |
+
global $wp_version;
|
283 |
+
$cur_wp_version = preg_replace( '/-.*$/', '', $wp_version );
|
284 |
+
$settings = self::getSetOptions( self::OPT_FIELD ); // get settings
|
285 |
+
do_action( "wp_update_plugins" ); // force WP to check plugins for updates
|
286 |
+
$update_plugins = get_site_transient( 'update_plugins' ); // get information of updates
|
287 |
+
if ( !empty( $update_plugins->response ) ) { // any plugin updates available?
|
288 |
+
$plugins_need_update = $update_plugins->response; // plugins that need updating
|
289 |
+
if ( 2 == $allOrActive ) { // are we to check just active plugins?
|
290 |
+
$active_plugins = array_flip( get_option( 'active_plugins' ) ); // find which plugins are active
|
291 |
+
$plugins_need_update = array_intersect_key( $plugins_need_update, $active_plugins ); // only keep plugins that are active
|
292 |
+
}
|
293 |
+
$plugins_need_update = apply_filters( 'sc_wpun_plugins_need_update', $plugins_need_update ); // additional filtering of plugins need update
|
294 |
+
if ( count( $plugins_need_update ) >= 1 ) { // any plugins need updating after all the filtering gone on above?
|
295 |
+
require_once( ABSPATH . 'wp-admin/includes/plugin-install.php' ); // Required for plugin API
|
296 |
+
require_once( ABSPATH . WPINC . '/version.php' ); // Required for WP core version
|
297 |
+
foreach ( $plugins_need_update as $key => $data ) { // loop through the plugins that need updating
|
298 |
+
$plugin_info = get_plugin_data( WP_PLUGIN_DIR . "/" . $key ); // get local plugin info
|
299 |
+
$info = plugins_api( 'plugin_information', array( 'slug' => $data->slug ) ); // get repository plugin info
|
300 |
+
$message .= "\n" . sprintf( __( "Plugin: %s is out of date. Please update from version %s to %s", "wp-updates-notifier" ), $plugin_info['Name'], $plugin_info['Version'], $data->new_version ) . "\n";
|
301 |
+
$message .= "\t" . sprintf( __( "Details: %s", "wp-updates-notifier" ), $data->url ) . "\n";
|
302 |
+
$message .= "\t" . sprintf( __( "Changelog: %s%s", "wp-updates-notifier" ), $data->url, "changelog/" ) . "\n";
|
303 |
+
if ( isset( $info->tested ) && version_compare( $info->tested, $wp_version, '>=' ) ) {
|
304 |
+
$compat = sprintf( __( 'Compatibility with WordPress %1$s: 100%% (according to its author)' ), $cur_wp_version );
|
305 |
+
}
|
306 |
+
elseif ( isset( $info->compatibility[$wp_version][$data->new_version] ) ) {
|
307 |
+
$compat = $info->compatibility[$wp_version][$data->new_version];
|
308 |
+
$compat = sprintf( __( 'Compatibility with WordPress %1$s: %2$d%% (%3$d "works" votes out of %4$d total)' ), $wp_version, $compat[0], $compat[2], $compat[1] );
|
309 |
+
}
|
310 |
+
else {
|
311 |
+
$compat = sprintf( __( 'Compatibility with WordPress %1$s: Unknown' ), $wp_version );
|
312 |
+
}
|
313 |
+
$message .= "\t" . sprintf( __( "Compatibility: %s", "wp-updates-notifier" ), $compat ) . "\n";
|
314 |
+
$settings['notified']['plugin'][$key] = $data->new_version; // set plugin version we are notifying about
|
315 |
+
}
|
316 |
+
self::getSetOptions( self::OPT_FIELD, $settings ); // save settings
|
317 |
+
return true; // we have plugin updates return true
|
318 |
+
}
|
319 |
+
}
|
320 |
+
else {
|
321 |
+
if ( 0 != count( $settings['notified']['plugin'] ) ) { // is there any plugin notifications?
|
322 |
+
$settings['notified']['plugin'] = array(); // set plugin notifications to empty as all plugins up-to-date
|
323 |
+
self::getSetOptions( self::OPT_FIELD, $settings ); // save settings
|
324 |
+
}
|
325 |
+
}
|
326 |
+
return false; // No plugin updates so return false
|
327 |
+
}
|
328 |
+
|
329 |
+
|
330 |
+
/**
|
331 |
+
* Check to see if any theme updates.
|
332 |
+
*
|
333 |
+
* @param string $message holds message to be sent via notification
|
334 |
+
* @param int $allOrActive should we look for all themes or just active ones
|
335 |
+
*
|
336 |
+
* @return bool
|
337 |
+
*/
|
338 |
+
private function themes_update_check( &$message, $allOrActive ) {
|
339 |
+
$settings = self::getSetOptions( self::OPT_FIELD ); // get settings
|
340 |
+
do_action( "wp_update_themes" ); // force WP to check for theme updates
|
341 |
+
$update_themes = get_site_transient( 'update_themes' ); // get information of updates
|
342 |
+
if ( !empty( $update_themes->response ) ) { // any theme updates available?
|
343 |
+
$themes_need_update = $update_themes->response; // themes that need updating
|
344 |
+
if ( 2 == $allOrActive ) { // are we to check just active themes?
|
345 |
+
$active_theme = array( get_option( 'template' ) => array() ); // find current theme that is active
|
346 |
+
$themes_need_update = array_intersect_key( $themes_need_update, $active_theme ); // only keep theme that is active
|
347 |
+
}
|
348 |
+
$themes_need_update = apply_filters( 'sc_wpun_themes_need_update', $themes_need_update ); // additional filtering of themes need update
|
349 |
+
if ( count( $themes_need_update ) >= 1 ) { // any themes need updating after all the filtering gone on above?
|
350 |
+
foreach ( $themes_need_update as $key => $data ) { // loop through the themes that need updating
|
351 |
+
$theme_info = wp_get_theme( $key ); // get theme info
|
352 |
+
$message .= "\n" . sprintf( __( "Theme: %s is out of date. Please update from version %s to %s", "wp-updates-notifier" ), $theme_info['Name'], $theme_info['Version'], $data['new_version'] ) . "\n";
|
353 |
+
$settings['notified']['theme'][$key] = $data['new_version']; // set theme version we are notifying about
|
354 |
+
}
|
355 |
+
self::getSetOptions( self::OPT_FIELD, $settings ); // save settings
|
356 |
+
return true; // we have theme updates return true
|
357 |
+
}
|
358 |
+
}
|
359 |
+
else {
|
360 |
+
if ( 0 != count( $settings['notified']['theme'] ) ) { // is there any theme notifications?
|
361 |
+
$settings['notified']['theme'] = array(); // set theme notifications to empty as all themes up-to-date
|
362 |
+
self::getSetOptions( self::OPT_FIELD, $settings ); // save settings
|
363 |
+
}
|
364 |
+
}
|
365 |
+
return false; // No theme updates so return false
|
366 |
+
}
|
367 |
+
|
368 |
+
|
369 |
+
/**
|
370 |
+
* Filter for removing plugins from update list if already been notified about
|
371 |
+
*
|
372 |
+
* @param array $plugins_need_update
|
373 |
+
*
|
374 |
+
* @return array $plugins_need_update
|
375 |
+
*/
|
376 |
+
public function check_plugins_against_notified( $plugins_need_update ) {
|
377 |
+
$settings = self::getSetOptions( self::OPT_FIELD ); // get settings
|
378 |
+
foreach ( $plugins_need_update as $key => $data ) { // loop through plugins that need update
|
379 |
+
if ( isset( $settings['notified']['plugin'][$key] ) ) { // has this plugin been notified before?
|
380 |
+
if ( $data->new_version == $settings['notified']['plugin'][$key] ) { // does this plugin version match that of the one that's been notified?
|
381 |
+
unset( $plugins_need_update[$key] ); // don't notify this plugin as has already been notified
|
382 |
+
}
|
383 |
+
}
|
384 |
+
}
|
385 |
+
return $plugins_need_update;
|
386 |
+
}
|
387 |
+
|
388 |
+
|
389 |
+
/**
|
390 |
+
* Filter for removing themes from update list if already been notified about
|
391 |
+
*
|
392 |
+
* @param array $themes_need_update
|
393 |
+
*
|
394 |
+
* @return array $themes_need_update
|
395 |
+
*/
|
396 |
+
public function check_themes_against_notified( $themes_need_update ) {
|
397 |
+
$settings = self::getSetOptions( self::OPT_FIELD ); // get settings
|
398 |
+
foreach ( $themes_need_update as $key => $data ) { // loop through themes that need update
|
399 |
+
if ( isset( $settings['notified']['theme'][$key] ) ) { // has this theme been notified before?
|
400 |
+
if ( $data['new_version'] == $settings['notified']['theme'][$key] ) { // does this theme version match that of the one that's been notified?
|
401 |
+
unset( $themes_need_update[$key] ); // don't notify this theme as has already been notified
|
402 |
+
}
|
403 |
+
}
|
404 |
+
}
|
405 |
+
return $themes_need_update;
|
406 |
+
}
|
407 |
+
|
408 |
+
|
409 |
+
/**
|
410 |
+
* Sends email notification.
|
411 |
+
*
|
412 |
+
* @param string $message holds message to be sent in body of email
|
413 |
+
*
|
414 |
+
* @return void
|
415 |
+
*/
|
416 |
+
public function send_notification_email( $message ) {
|
417 |
+
$settings = self::getSetOptions( self::OPT_FIELD ); // get settings
|
418 |
+
$subject = sprintf( __( "WP Updates Notifier: Updates Available @ %s", "wp-updates-notifier" ), home_url() );
|
419 |
+
add_filter( 'wp_mail_from', array( __CLASS__, 'sc_wpun_wp_mail_from' ) ); // add from filter
|
420 |
+
add_filter( 'wp_mail_from_name', array( __CLASS__, 'sc_wpun_wp_mail_from_name' ) ); // add from name filter
|
421 |
+
add_filter( 'wp_mail_content_type', array( __CLASS__, 'sc_wpun_wp_mail_content_type' ) ); // add content type filter
|
422 |
+
wp_mail( $settings['notify_to'], $subject, $message ); // send email
|
423 |
+
remove_filter( 'wp_mail_from', array( __CLASS__, 'sc_wpun_wp_mail_from' ) ); // remove from filter
|
424 |
+
remove_filter( 'wp_mail_from_name', array( __CLASS__, 'sc_wpun_wp_mail_from_name' ) ); // remove from name filter
|
425 |
+
remove_filter( 'wp_mail_content_type', array( __CLASS__, 'sc_wpun_wp_mail_content_type' ) ); // remove content type filter
|
426 |
+
}
|
427 |
+
|
428 |
+
public function sc_wpun_wp_mail_from() {
|
429 |
+
$settings = self::getSetOptions( self::OPT_FIELD );
|
430 |
+
return $settings['notify_from'];
|
431 |
+
}
|
432 |
+
|
433 |
+
public static function sc_wpun_wp_mail_from_name() {
|
434 |
+
return __( "WP Updates Notifier", "wp-updates-notifier" );
|
435 |
+
}
|
436 |
+
|
437 |
+
public static function sc_wpun_wp_mail_content_type() {
|
438 |
+
return "text/plain";
|
439 |
+
}
|
440 |
+
|
441 |
+
|
442 |
+
private function log_last_check_time() {
|
443 |
+
$options = self::getSetOptions( self::OPT_FIELD );
|
444 |
+
$options['last_check_time'] = current_time( "timestamp" );
|
445 |
+
self::getSetOptions( self::OPT_FIELD, $options );
|
446 |
+
}
|
447 |
+
|
448 |
+
|
449 |
+
/**
|
450 |
+
* Removes the update nag for non admin users.
|
451 |
+
*
|
452 |
+
* @return void
|
453 |
+
*/
|
454 |
+
public function remove_update_nag_for_nonadmins() {
|
455 |
+
$settings = self::getSetOptions( self::OPT_FIELD ); // get settings
|
456 |
+
if ( 1 == $settings['hide_updates'] ) { // is this enabled?
|
457 |
+
if ( !current_user_can( 'update_plugins' ) ) { // can the current user update plugins?
|
458 |
+
remove_action( 'admin_notices', 'update_nag', 3 ); // no they cannot so remove the nag for them.
|
459 |
+
}
|
460 |
+
}
|
461 |
+
}
|
462 |
+
|
463 |
+
|
464 |
+
/**
|
465 |
+
* Adds JS to admin settings screen for this plugin
|
466 |
+
*/
|
467 |
+
public static function admin_register_scripts_styles() {
|
468 |
+
wp_register_script( 'wp_updates_monitor_js_function', plugins_url( 'js/function.js', __FILE__ ), array( 'jquery' ), '1.0', true );
|
469 |
+
}
|
470 |
+
|
471 |
+
|
472 |
+
static public function sc_wpun_check() {
|
473 |
+
$options = self::getSetOptions( self::OPT_FIELD ); // get settings
|
474 |
+
|
475 |
+
if ( !isset( $_GET['sc_wpun_key'] ) || $options['security_key'] != $_GET['sc_wpun_key'] || "other" != $options['cron_method'] ) {
|
476 |
+
return;
|
477 |
+
}
|
478 |
+
|
479 |
+
self::do_update_check();
|
480 |
+
|
481 |
+
die( __( "Successfully checked for updates.", "wp-updates-notifier" ) );
|
482 |
+
}
|
483 |
+
|
484 |
+
|
485 |
+
private static function get_schedules() {
|
486 |
+
$schedules = wp_get_schedules();
|
487 |
+
uasort( $schedules, array( __CLASS__, 'sort_by_interval' ) );
|
488 |
+
return $schedules;
|
489 |
+
}
|
490 |
+
|
491 |
+
|
492 |
+
private static function get_intervals() {
|
493 |
+
$intervals = array_keys( self::get_schedules() );
|
494 |
+
$intervals[] = "manual";
|
495 |
+
return $intervals;
|
496 |
+
}
|
497 |
+
|
498 |
+
|
499 |
+
private static function sort_by_interval( $a, $b ) {
|
500 |
+
return $a['interval'] - $b['interval'];
|
501 |
+
}
|
502 |
+
|
503 |
+
|
504 |
+
/*
|
505 |
+
* EVERYTHING SETTINGS
|
506 |
+
*
|
507 |
+
* I'm not going to comment any of this as its all pretty
|
508 |
+
* much straight forward use of the WordPress Settings API.
|
509 |
+
*/
|
510 |
+
public static function admin_settings_menu() {
|
511 |
+
$page = add_options_page( 'Updates Notifier', 'Updates Notifier', 'manage_options', 'wp-updates-notifier', array( __CLASS__, 'settings_page' ) );
|
512 |
+
add_action( "admin_print_scripts-{$page}", array( __CLASS__, 'enqueue_plugin_script' ) );
|
513 |
+
}
|
514 |
+
|
515 |
+
public static function enqueue_plugin_script() {
|
516 |
+
wp_enqueue_script( 'wp_updates_monitor_js_function' );
|
517 |
+
}
|
518 |
+
|
519 |
+
public function settings_page() {
|
520 |
+
$options = self::getSetOptions( self::OPT_FIELD );
|
521 |
+
$date_format = get_option( 'date_format' );
|
522 |
+
$time_format = get_option( 'time_format' );
|
523 |
+
?>
|
524 |
+
<div class="wrap">
|
525 |
+
<?php screen_icon(); ?>
|
526 |
+
<h2><?php _e( "Updates Notifier", "wp-updates-notifier" ); ?></h2>
|
527 |
+
|
528 |
+
<p>
|
529 |
+
<span class="description">
|
530 |
+
<?php
|
531 |
+
if ( false === $options["last_check_time"] ) {
|
532 |
+
$scan_date = __( "Never", "wp-updates-notifier" );
|
533 |
+
}
|
534 |
+
else {
|
535 |
+
$scan_date = sprintf(
|
536 |
+
__( "%1s @ %2s", "wp-updates-notifier" ),
|
537 |
+
date( $date_format, $options["last_check_time"] ),
|
538 |
+
date( $time_format, $options['last_check_time'] )
|
539 |
+
);
|
540 |
+
}
|
541 |
+
|
542 |
+
echo sprintf( __( "Last scanned: %s", "wp-updates-notifier" ), $scan_date );
|
543 |
+
?>
|
544 |
+
</span>
|
545 |
+
</p>
|
546 |
+
|
547 |
+
<form action="<?php echo admin_url( "options.php" ); ?>" method="post">
|
548 |
+
<?php
|
549 |
+
settings_fields( "sc_wpun_settings" );
|
550 |
+
do_settings_sections( "wp-updates-notifier" );
|
551 |
+
?>
|
552 |
+
<p> </p>
|
553 |
+
<input class="button-primary" name="Submit" type="submit" value="<?php _e( "Save settings", "wp-updates-notifier" ); ?>" />
|
554 |
+
<input class="button" name="submitwithemail" type="submit" value="<?php _e( "Save settings with test email", "wp-updates-notifier" ); ?>" />
|
555 |
+
</form>
|
556 |
+
</div>
|
557 |
+
<?php
|
558 |
+
}
|
559 |
+
|
560 |
+
public function admin_settings_init() {
|
561 |
+
register_setting( self::OPT_FIELD, self::OPT_FIELD, array( __CLASS__, "sc_wpun_settings_validate" ) ); // Register Main Settings
|
562 |
+
add_settings_section( "sc_wpun_settings_main", __( "Settings", "wp-updates-notifier" ), array( __CLASS__, "sc_wpun_settings_main_text" ), "wp-updates-notifier" ); // Make settings main section
|
563 |
+
add_settings_field( "sc_wpun_settings_main_cron_method", __( "Cron Method", "wp-updates-notifier" ), array( __CLASS__, "sc_wpun_settings_main_field_cron_method" ), "wp-updates-notifier", "sc_wpun_settings_main" );
|
564 |
+
add_settings_field( "sc_wpun_settings_main_frequency", __( "Frequency to check", "wp-updates-notifier" ), array( __CLASS__, "sc_wpun_settings_main_field_frequency" ), "wp-updates-notifier", "sc_wpun_settings_main" );
|
565 |
+
add_settings_field( "sc_wpun_settings_main_notify_to", __( "Notify email to", "wp-updates-notifier" ), array( __CLASS__, "sc_wpun_settings_main_field_notify_to" ), "wp-updates-notifier", "sc_wpun_settings_main" );
|
566 |
+
add_settings_field( "sc_wpun_settings_main_notify_from", __( "Notify email from", "wp-updates-notifier" ), array( __CLASS__, "sc_wpun_settings_main_field_notify_from" ), "wp-updates-notifier", "sc_wpun_settings_main" );
|
567 |
+
add_settings_field( "sc_wpun_settings_main_notify_plugins", __( "Notify about plugin updates?", "wp-updates-notifier" ), array( __CLASS__, "sc_wpun_settings_main_field_notify_plugins" ), "wp-updates-notifier", "sc_wpun_settings_main" );
|
568 |
+
add_settings_field( "sc_wpun_settings_main_notify_themes", __( "Notify about theme updates?", "wp-updates-notifier" ), array( __CLASS__, "sc_wpun_settings_main_field_notify_themes" ), "wp-updates-notifier", "sc_wpun_settings_main" );
|
569 |
+
add_settings_field( "sc_wpun_settings_main_hide_updates", __( "Hide core WP update nag from non-admin users?", "wp-updates-notifier" ), array( __CLASS__, "sc_wpun_settings_main_field_hide_updates" ), "wp-updates-notifier", "sc_wpun_settings_main" );
|
570 |
+
}
|
571 |
+
|
572 |
+
public function sc_wpun_settings_validate( $input ) {
|
573 |
+
$valid = self::getSetOptions( self::OPT_FIELD );
|
574 |
+
|
575 |
+
if ( isset( $input['cron_method'] ) && in_array( $input['cron_method'], array( "wordpress", "other" ) ) ) {
|
576 |
+
$valid['cron_method'] = $input['cron_method'];
|
577 |
+
}
|
578 |
+
else {
|
579 |
+
add_settings_error( "sc_wpun_settings_main_cron_method", "sc_wpun_settings_main_cron_method_error", __( "Invalid cron method selected", "wp-updates-notifier" ), "error" );
|
580 |
+
}
|
581 |
+
|
582 |
+
if ( "other" == $valid['cron_method'] ) {
|
583 |
+
$input['frequency'] = "manual";
|
584 |
+
}
|
585 |
+
|
586 |
+
if ( in_array( $input['frequency'], self::get_intervals() ) ) {
|
587 |
+
$valid['frequency'] = $input['frequency'];
|
588 |
+
do_action( "sc_wpun_enable_cron", $input['frequency'] );
|
589 |
+
}
|
590 |
+
else {
|
591 |
+
add_settings_error( "sc_wpun_settings_main_frequency", "sc_wpun_settings_main_frequency_error", __( "Invalid frequency entered", "wp-updates-notifier" ), "error" );
|
592 |
+
}
|
593 |
+
|
594 |
+
$emails_to = explode( ",", $input['notify_to'] );
|
595 |
+
if ( $emails_to ) {
|
596 |
+
$sanitized_emails = array();
|
597 |
+
$was_error = false;
|
598 |
+
foreach ( $emails_to as $email_to ) {
|
599 |
+
$address = sanitize_email( trim( $email_to ) );
|
600 |
+
if ( !is_email( $address ) ) {
|
601 |
+
add_settings_error( "sc_wpun_settings_main_notify_to", "sc_wpun_settings_main_notify_to_error", __( "One or more email to addresses are invalid", "wp-updates-notifier" ), "error" );
|
602 |
+
$was_error = true;
|
603 |
+
break;
|
604 |
+
}
|
605 |
+
$sanitized_emails[] = $address;
|
606 |
+
}
|
607 |
+
if ( !$was_error ) {
|
608 |
+
$valid['notify_to'] = implode( ',', $sanitized_emails );
|
609 |
+
}
|
610 |
+
}
|
611 |
+
else {
|
612 |
+
add_settings_error( "sc_wpun_settings_main_notify_to", "sc_wpun_settings_main_notify_to_error", __( "No email to address entered", "wp-updates-notifier" ), "error" );
|
613 |
+
}
|
614 |
+
|
615 |
+
$sanitized_email_from = sanitize_email( $input['notify_from'] );
|
616 |
+
if ( is_email( $sanitized_email_from ) ) {
|
617 |
+
$valid['notify_from'] = $sanitized_email_from;
|
618 |
+
}
|
619 |
+
else {
|
620 |
+
add_settings_error( "sc_wpun_settings_main_notify_from", "sc_wpun_settings_main_notify_from_error", __( "Invalid email from entered", "wp-updates-notifier" ), "error" );
|
621 |
+
}
|
622 |
+
|
623 |
+
$sanitized_notify_plugins = absint( isset( $input['notify_plugins'] ) ? $input['notify_plugins'] : 0 );
|
624 |
+
if ( $sanitized_notify_plugins >= 0 && $sanitized_notify_plugins <= 2 ) {
|
625 |
+
$valid['notify_plugins'] = $sanitized_notify_plugins;
|
626 |
+
}
|
627 |
+
else {
|
628 |
+
add_settings_error( "sc_wpun_settings_main_notify_plugins", "sc_wpun_settings_main_notify_plugins_error", __( "Invalid plugin updates value entered", "wp-updates-notifier" ), "error" );
|
629 |
+
}
|
630 |
+
|
631 |
+
$sanitized_notify_themes = absint( isset( $input['notify_themes'] ) ? $input['notify_themes'] : 0 );
|
632 |
+
if ( $sanitized_notify_themes >= 0 && $sanitized_notify_themes <= 2 ) {
|
633 |
+
$valid['notify_themes'] = $sanitized_notify_themes;
|
634 |
+
}
|
635 |
+
else {
|
636 |
+
add_settings_error( "sc_wpun_settings_main_notify_themes", "sc_wpun_settings_main_notify_themes_error", __( "Invalid theme updates value entered", "wp-updates-notifier" ), "error" );
|
637 |
+
}
|
638 |
+
|
639 |
+
$sanitized_hide_updates = absint( isset( $input['hide_updates'] ) ? $input['hide_updates'] : 0 );
|
640 |
+
if ( $sanitized_hide_updates <= 1 ) {
|
641 |
+
$valid['hide_updates'] = $sanitized_hide_updates;
|
642 |
+
}
|
643 |
+
else {
|
644 |
+
add_settings_error( "sc_wpun_settings_main_hide_updates", "sc_wpun_settings_main_hide_updates_error", __( "Invalid hide updates value entered", "wp-updates-notifier" ), "error" );
|
645 |
+
}
|
646 |
+
|
647 |
+
if ( isset( $_POST['submitwithemail'] ) ) {
|
648 |
+
add_filter( 'pre_set_transient_settings_errors', array( __CLASS__, "send_test_email" ) );
|
649 |
+
}
|
650 |
+
|
651 |
+
return $valid;
|
652 |
+
}
|
653 |
+
|
654 |
+
public static function send_test_email( $settings_errors ) {
|
655 |
+
if ( isset( $settings_errors[0]['type'] ) && $settings_errors[0]['type'] == "updated" ) {
|
656 |
+
self::send_notification_email( __( "This is a test message from WP Updates Notifier.", "wp-updates-notifier" ) );
|
657 |
+
}
|
658 |
+
}
|
659 |
+
|
660 |
+
public static function sc_wpun_settings_main_text() {
|
661 |
+
}
|
662 |
+
|
663 |
+
public function sc_wpun_settings_main_field_cron_method() {
|
664 |
+
$options = self::getSetOptions( self::OPT_FIELD );
|
665 |
+
?>
|
666 |
+
<select name="<?php echo self::OPT_FIELD; ?>[cron_method]">
|
667 |
+
<option value="wordpress" <?php selected( $options['cron_method'], "wordpress" ); ?>><?php _e( "WordPress Cron", "wp-updates-notifier" ); ?></option>
|
668 |
+
<option value="other" <?php selected( $options['cron_method'], "other" ); ?>><?php _e( "Other Cron", "wp-updates-notifier" ); ?></option>
|
669 |
+
</select>
|
670 |
+
<div>
|
671 |
+
<br />
|
672 |
+
<span class="description"><?php _e( "Cron Command: ", "wp-updates-notifier" ); ?></span>
|
673 |
+
<pre>wget -q "<?php echo admin_url( "/admin-ajax.php?action=sc_wpun_check&sc_wpun_key=" . $options['security_key'] ); ?>" -O /dev/null >/dev/null 2>&1</pre>
|
674 |
+
</div>
|
675 |
+
<?php
|
676 |
+
}
|
677 |
+
|
678 |
+
public function sc_wpun_settings_main_field_frequency() {
|
679 |
+
$options = self::getSetOptions( self::OPT_FIELD );
|
680 |
+
?>
|
681 |
+
<select id="sc_wpun_settings_main_frequency" name="<?php echo self::OPT_FIELD; ?>[frequency]">
|
682 |
+
<?php foreach ( self::get_schedules() as $k => $v ): ?>
|
683 |
+
<option value="<?php echo $k; ?>" <?php selected( $options['frequency'], $k ); ?>><?php echo $v['display']; ?></option>
|
684 |
+
<?php endforeach; ?>
|
685 |
+
<select>
|
686 |
+
<?php
|
687 |
+
}
|
688 |
+
|
689 |
+
public function sc_wpun_settings_main_field_notify_to() {
|
690 |
+
$options = self::getSetOptions( self::OPT_FIELD );
|
691 |
+
?>
|
692 |
+
<input id="sc_wpun_settings_main_notify_to" class="regular-text" name="<?php echo self::OPT_FIELD; ?>[notify_to]" value="<?php echo $options['notify_to']; ?>" />
|
693 |
+
<span class="description"><?php _e( "Separate multiple email address with a comma (,)", "wp-updates-notifier" ); ?></span><?php
|
694 |
+
}
|
695 |
+
|
696 |
+
public function sc_wpun_settings_main_field_notify_from() {
|
697 |
+
$options = self::getSetOptions( self::OPT_FIELD );
|
698 |
+
?>
|
699 |
+
<input id="sc_wpun_settings_main_notify_from" class="regular-text" name="<?php echo self::OPT_FIELD; ?>[notify_from]" value="<?php echo $options['notify_from']; ?>" /><?php
|
700 |
+
}
|
701 |
+
|
702 |
+
public function sc_wpun_settings_main_field_notify_plugins() {
|
703 |
+
$options = self::getSetOptions( self::OPT_FIELD );
|
704 |
+
?>
|
705 |
+
<label><input name="<?php echo self::OPT_FIELD; ?>[notify_plugins]" type="radio" value="0" <?php checked( $options['notify_plugins'], 0 ); ?> /> <?php _e( "No", "wp-updates-notifier" ); ?>
|
706 |
+
</label><br />
|
707 |
+
<label><input name="<?php echo self::OPT_FIELD; ?>[notify_plugins]" type="radio" value="1" <?php checked( $options['notify_plugins'], 1 ); ?> /> <?php _e( "Yes", "wp-updates-notifier" ); ?>
|
708 |
+
</label><br />
|
709 |
+
<label><input name="<?php echo self::OPT_FIELD; ?>[notify_plugins]" type="radio" value="2" <?php checked( $options['notify_plugins'], 2 ); ?> /> <?php _e( "Yes but only active plugins", "wp-updates-notifier" ); ?>
|
710 |
+
</label>
|
711 |
+
<?php
|
712 |
+
}
|
713 |
+
|
714 |
+
public function sc_wpun_settings_main_field_notify_themes() {
|
715 |
+
$options = self::getSetOptions( self::OPT_FIELD );
|
716 |
+
?>
|
717 |
+
<label><input name="<?php echo self::OPT_FIELD; ?>[notify_themes]" type="radio" value="0" <?php checked( $options['notify_themes'], 0 ); ?> /> <?php _e( "No", "wp-updates-notifier" ); ?>
|
718 |
+
</label><br />
|
719 |
+
<label><input name="<?php echo self::OPT_FIELD; ?>[notify_themes]" type="radio" value="1" <?php checked( $options['notify_themes'], 1 ); ?> /> <?php _e( "Yes", "wp-updates-notifier" ); ?>
|
720 |
+
</label><br />
|
721 |
+
<label><input name="<?php echo self::OPT_FIELD; ?>[notify_themes]" type="radio" value="2" <?php checked( $options['notify_themes'], 2 ); ?> /> <?php _e( "Yes but only active themes", "wp-updates-notifier" ); ?>
|
722 |
+
</label>
|
723 |
+
<?php
|
724 |
+
}
|
725 |
+
|
726 |
+
public function sc_wpun_settings_main_field_hide_updates() {
|
727 |
+
$options = self::getSetOptions( self::OPT_FIELD );
|
728 |
+
?>
|
729 |
+
<select id="sc_wpun_settings_main_hide_updates" name="<?php echo self::OPT_FIELD; ?>[hide_updates]">
|
730 |
+
<option value="1" <?php selected( $options['hide_updates'], 1 ); ?>><?php _e( "Yes", "wp-updates-notifier" ); ?></option>
|
731 |
+
<option value="0" <?php selected( $options['hide_updates'], 0 ); ?>><?php _e( "No", "wp-updates-notifier" ); ?></option>
|
732 |
+
</select>
|
733 |
+
<?php
|
734 |
+
}
|
735 |
+
/**** END EVERYTHING SETTINGS ****/
|
736 |
+
}
|
737 |
+
}
|
738 |
+
|
739 |
+
sc_WPUpdatesNotifier::init();
|
740 |
?>
|