WP Updates Notifier - Version 1.4.3

Version Description

  • Repaired all PHP errors being thrown
  • Two new filters added to allow you to alter the email content (sc_wpun_email_subject, sc_wpun_email_content - see readme.txt for examples)
Download this release

Release Info

Developer l3rady
Plugin Icon wp plugin WP Updates Notifier
Version 1.4.3
Comparing to
See all releases

Code changes from version 1.4.1 to 1.4.3

js/function.js ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Copyright 2015 Scott Cariss (email : scott@l3rady.com)
2
+
3
+ This program is free software; you can redistribute it and/or modify
4
+ it under the terms of the GNU General Public License as published by
5
+ the Free Software Foundation; either version 2 of the License, or
6
+ (at your option) any later version.
7
+
8
+ This program is distributed in the hope that it will be useful,
9
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
+ GNU General Public License for more details.
12
+
13
+ You should have received a copy of the GNU General Public License
14
+ along with this program; if not, write to the Free Software
15
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
16
+ */
17
+
18
+ jQuery(function ($) {
19
+ var
20
+ sc_wpun_settings_cron = $('select[name="sc_wpun_settings[cron_method]"]'),
21
+ sc_wpun_settings_interval = $('select[name="sc_wpun_settings[frequency]"]')
22
+ ;
23
+
24
+ sc_wpun_settings_cron.change(function () {
25
+ if (sc_wpun_settings_cron.val() == "wordpress") {
26
+ sc_wpun_settings_cron.parent().find("div").hide();
27
+ sc_wpun_settings_interval.parent().parent().show();
28
+ } else {
29
+ sc_wpun_settings_cron.parent().find("div").show();
30
+ sc_wpun_settings_interval.parent().parent().hide();
31
+ }
32
+ }).trigger("change");
33
+ });
languages/wp-updates-notifier-de_DE.mo CHANGED
File without changes
languages/wp-updates-notifier-de_DE.po CHANGED
File without changes
languages/wp-updates-notifier-fr_FR.mo ADDED
Binary file
languages/wp-updates-notifier-fr_FR.po ADDED
@@ -0,0 +1,256 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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: 2013-05-18 17:49+0100\n"
6
+ "PO-Revision-Date: 2013-05-18 20:19+0100\n"
7
+ "Last-Translator: Christophe Catarina <christophe.catarina@ordilibre.com>\n"
8
+ "Language-Team: Christophe Catarina <christophe.catarina@ordilibre.com>\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "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"
13
+ "X-Poedit-Basepath: .\n"
14
+ "X-Poedit-Language: French\n"
15
+ "X-Poedit-Country: FRANCE\n"
16
+ "X-Poedit-SourceCharset: utf-8\n"
17
+
18
+ #@ wp-updates-notifier
19
+ #. translators: plugin header field 'Name'
20
+ #: wp-updates-notifier.php:0
21
+ #: wp-updates-notifier.php:367
22
+ #: wp-updates-notifier.php:400
23
+ msgid "WP Updates Notifier"
24
+ msgstr "WP Updates Notifier"
25
+
26
+ #@ wp-updates-notifier
27
+ #. translators: plugin header field 'PluginURI'
28
+ #: wp-updates-notifier.php:0
29
+ msgid "http://l3rady.com/projects/wp-updates-notifier/"
30
+ msgstr "http://wordpress.org/extend/plugins/wp-updates-notifier/"
31
+
32
+ #@ wp-updates-notifier
33
+ #. translators: plugin header field 'Description'
34
+ #: wp-updates-notifier.php:0
35
+ msgid "Sends email to notify you if there are any updates for your WordPress site. Can notify about core, plugin and theme updates."
36
+ msgstr "Vous envoie un courriel s'il existe des mises à jour disponibles pour votre site WordPress. Peut vous avertir à propos de mises à jour sur le CMS, les extensions ou les thèmes."
37
+
38
+ #@ wp-updates-notifier
39
+ #. translators: plugin header field 'Author'
40
+ #: wp-updates-notifier.php:0
41
+ msgid "Scott Cariss"
42
+ msgstr ""
43
+
44
+ #@ wp-updates-notifier
45
+ #. translators: plugin header field 'AuthorURI'
46
+ #: wp-updates-notifier.php:0
47
+ msgid "http://l3rady.com/"
48
+ msgstr ""
49
+
50
+ #@ wp-updates-notifier
51
+ #: wp-updates-notifier.php:159
52
+ #: wp-updates-notifier.php:414
53
+ msgid "Settings"
54
+ msgstr "Configuration"
55
+
56
+ #@ wp-updates-notifier
57
+ #: wp-updates-notifier.php:187
58
+ msgid "There are updates available for your WordPress site:"
59
+ msgstr "Il y a des mises à jour disponibles pour votre site WordPress :"
60
+
61
+ #@ wp-updates-notifier
62
+ #: wp-updates-notifier.php:188
63
+ #, php-format
64
+ msgid "Please visit %s to update."
65
+ msgstr "Rendez vous sur %s pour effectuer les mises à jour."
66
+
67
+ #@ wp-updates-notifier
68
+ #: wp-updates-notifier.php:209
69
+ #, php-format
70
+ msgid "WP-Core: WordPress is out of date. Please update from version %s to %s"
71
+ msgstr "WordPress : Le cœur du CMS n'est plus à jour. Veuillez passer de la version %s à la version %s"
72
+
73
+ #@ wp-updates-notifier
74
+ #: wp-updates-notifier.php:247
75
+ #, php-format
76
+ msgid "Plugin: %s is out of date. Please update from version %s to %s"
77
+ msgstr "Extension : %s n'est plus à jour. Veuillez passer de la version %s à la version %s"
78
+
79
+ #@ wp-updates-notifier
80
+ #: wp-updates-notifier.php:248
81
+ #, php-format
82
+ msgid "Details: %s"
83
+ msgstr "Détails : %s"
84
+
85
+ #@ wp-updates-notifier
86
+ #: wp-updates-notifier.php:249
87
+ #, php-format
88
+ msgid "Changelog: %s%s"
89
+ msgstr "Changelog : %s%s"
90
+
91
+ #@ default
92
+ #: wp-updates-notifier.php:251
93
+ #, php-format
94
+ msgid "Compatibility with WordPress %1$s: 100%% (according to its author)"
95
+ msgstr ""
96
+
97
+ #@ default
98
+ #: wp-updates-notifier.php:254
99
+ #, php-format
100
+ msgid "Compatibility with WordPress %1$s: %2$d%% (%3$d \"works\" votes out of %4$d total)"
101
+ msgstr ""
102
+
103
+ #@ default
104
+ #: wp-updates-notifier.php:256
105
+ #, php-format
106
+ msgid "Compatibility with WordPress %1$s: Unknown"
107
+ msgstr ""
108
+
109
+ #@ wp-updates-notifier
110
+ #: wp-updates-notifier.php:258
111
+ #, php-format
112
+ msgid "Compatibility: %s"
113
+ msgstr "Compatibilité : %s"
114
+
115
+ #@ wp-updates-notifier
116
+ #: wp-updates-notifier.php:295
117
+ #, php-format
118
+ msgid "Theme: %s is out of date. Please update from version %s to %s"
119
+ msgstr "Thème : %s n'est plus à jour. Veuillez passer de la version %s à la version %s"
120
+
121
+ #@ wp-updates-notifier
122
+ #: wp-updates-notifier.php:357
123
+ #, php-format
124
+ msgid "WP Updates Notifier: Updates Available @ %s"
125
+ msgstr "WP Updates Notifier : Des mises à jour sont disponibles @ %s"
126
+
127
+ #@ wp-updates-notifier
128
+ #: wp-updates-notifier.php:406
129
+ msgid "Save settings"
130
+ msgstr "Enregistrer les paramètres"
131
+
132
+ #@ wp-updates-notifier
133
+ #: wp-updates-notifier.php:407
134
+ msgid "Save settings with test email"
135
+ msgstr "Enregistrer et envoyer un courriel de test"
136
+
137
+ #@ wp-updates-notifier
138
+ #: wp-updates-notifier.php:415
139
+ msgid "Frequency to check"
140
+ msgstr "Fréquence de contrôle"
141
+
142
+ #@ wp-updates-notifier
143
+ #: wp-updates-notifier.php:416
144
+ msgid "Notify email to"
145
+ msgstr "Envoyer un courriel à"
146
+
147
+ #@ wp-updates-notifier
148
+ #: wp-updates-notifier.php:417
149
+ msgid "Notify email from"
150
+ msgstr "Envoyer le courriel en tant que"
151
+
152
+ #@ wp-updates-notifier
153
+ #: wp-updates-notifier.php:418
154
+ msgid "Notify about plugin updates?"
155
+ msgstr "Prévenir pour les mises à jour d'extensions ?"
156
+
157
+ #@ wp-updates-notifier
158
+ #: wp-updates-notifier.php:419
159
+ msgid "Notify about theme updates?"
160
+ msgstr "Prévenir pour les mises à jour de thèmes ?"
161
+
162
+ #@ wp-updates-notifier
163
+ #: wp-updates-notifier.php:420
164
+ msgid "Hide core WP update nag from non-admin users?"
165
+ msgstr "Masquer les notifications de mises à jour aux simples utilisateurs ?"
166
+
167
+ #@ wp-updates-notifier
168
+ #: wp-updates-notifier.php:429
169
+ msgid "Invalid frequency entered"
170
+ msgstr "Fréquence de contrôle incorrecte"
171
+
172
+ #@ wp-updates-notifier
173
+ #: wp-updates-notifier.php:439
174
+ msgid "One or more email to addresses are invalid"
175
+ msgstr "Une adresse de courriel est invalide, ou plusieurs"
176
+
177
+ #@ wp-updates-notifier
178
+ #: wp-updates-notifier.php:449
179
+ msgid "No email to address entered"
180
+ msgstr "Aucune adresse de courriel saisie"
181
+
182
+ #@ wp-updates-notifier
183
+ #: wp-updates-notifier.php:456
184
+ msgid "Invalid email from entered"
185
+ msgstr "Adresse de courriel saisie invalide"
186
+
187
+ #@ wp-updates-notifier
188
+ #: wp-updates-notifier.php:463
189
+ msgid "Invalid plugin updates value entered"
190
+ msgstr "Valeur invalide pour les mises à jour d'extensions"
191
+
192
+ #@ wp-updates-notifier
193
+ #: wp-updates-notifier.php:470
194
+ msgid "Invalid theme updates value entered"
195
+ msgstr "Valeur invalide pour les mises à jour de thèmes"
196
+
197
+ #@ wp-updates-notifier
198
+ #: wp-updates-notifier.php:477
199
+ msgid "Invalid hide updates value entered"
200
+ msgstr "Valeur invalide pour le masquage de l'alerte"
201
+
202
+ #@ wp-updates-notifier
203
+ #: wp-updates-notifier.php:488
204
+ msgid "This is a test message from WP Updates Notifier."
205
+ msgstr "Ceci est un courriel de test provenant de WP Updates Notifier."
206
+
207
+ #@ wp-updates-notifier
208
+ #: wp-updates-notifier.php:496
209
+ msgid "Hourly"
210
+ msgstr "Toutes les heures"
211
+
212
+ #@ wp-updates-notifier
213
+ #: wp-updates-notifier.php:497
214
+ msgid "Twice Daily"
215
+ msgstr "2 fois par jour"
216
+
217
+ #@ wp-updates-notifier
218
+ #: wp-updates-notifier.php:498
219
+ msgid "Daily"
220
+ msgstr "1 fois par jour"
221
+
222
+ #@ wp-updates-notifier
223
+ #: wp-updates-notifier.php:504
224
+ msgid "Separate multiple email address with a comma (,)"
225
+ msgstr "Séparer les adresses de courriel multiples par une virgule (,)"
226
+
227
+ #@ wp-updates-notifier
228
+ #: wp-updates-notifier.php:513
229
+ #: wp-updates-notifier.php:521
230
+ #: wp-updates-notifier.php:531
231
+ msgid "No"
232
+ msgstr "Non"
233
+
234
+ #@ wp-updates-notifier
235
+ #: wp-updates-notifier.php:514
236
+ #: wp-updates-notifier.php:522
237
+ #: wp-updates-notifier.php:530
238
+ msgid "Yes"
239
+ msgstr "Oui"
240
+
241
+ #@ wp-updates-notifier
242
+ #: wp-updates-notifier.php:515
243
+ msgid "Yes but only active plugins"
244
+ msgstr "Oui, mais seulement les extensions activées"
245
+
246
+ #@ wp-updates-notifier
247
+ #: wp-updates-notifier.php:523
248
+ msgid "Yes but only active themes"
249
+ msgstr "Oui, mais seulement le thème activé"
250
+
251
+ #@ wp-updates-notifier
252
+ #. translators: plugin header field 'Version'
253
+ #: wp-updates-notifier.php:0
254
+ msgid "1.3.1"
255
+ msgstr ""
256
+
languages/wp-updates-notifier-ja.mo ADDED
Binary file
languages/wp-updates-notifier-ja.po ADDED
@@ -0,0 +1,205 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Copyright (C) 2013 WP Updates Notifier
2
+ # This file is distributed under the same license as the WP Updates Notifier package.
3
+ msgid ""
4
+ msgstr ""
5
+ "Project-Id-Version: WP Updates Notifier 1.4\n"
6
+ "Report-Msgid-Bugs-To: http://wordpress.org/tag/wp-updates-notifier\n"
7
+ "POT-Creation-Date: 2013-11-27 15:09:57+00:00\n"
8
+ "MIME-Version: 1.0\n"
9
+ "Content-Type: text/plain; charset=UTF-8\n"
10
+ "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2013-11-28 00:36+0900\n"
12
+ "Last-Translator: cat <cat@midx.jp>\n"
13
+ "Language-Team: Japanese\n"
14
+ "Language: ja\n"
15
+ "Plural-Forms: nplurals=1; plural=0;\n"
16
+
17
+ #: wp-updates-notifier.php:194 wp-updates-notifier.php:551
18
+ msgid "Settings"
19
+ msgstr "設定"
20
+
21
+ #: wp-updates-notifier.php:224
22
+ msgid "There are updates available for your WordPress site:"
23
+ msgstr "お使いの WordPress に更新があります:"
24
+
25
+ #: wp-updates-notifier.php:225
26
+ msgid "Please visit %s to update."
27
+ msgstr "更新するには %s を開いてください。"
28
+
29
+ #: wp-updates-notifier.php:250
30
+ msgid "WP-Core: WordPress is out of date. Please update from version %s to %s"
31
+ msgstr "WP 本体: WordPress に新しいバージョンがあります。バージョン %s から %s へ更新してください"
32
+
33
+ #: wp-updates-notifier.php:292
34
+ msgid "Plugin: %s is out of date. Please update from version %s to %s"
35
+ msgstr "プラグイン: %s に新しいバージョンがあります。バージョン %s から %s へ更新してください"
36
+
37
+ #: wp-updates-notifier.php:293
38
+ msgid "Details: %s"
39
+ msgstr "説明: %s"
40
+
41
+ #: wp-updates-notifier.php:294
42
+ msgid "Changelog: %s%s"
43
+ msgstr "更新履歴: %s%s"
44
+
45
+ #: wp-updates-notifier.php:303
46
+ msgid "Compatibility with WordPress %1$s: Unknown"
47
+ msgstr "WordPress %1$s との互換性: 不明"
48
+
49
+ #: wp-updates-notifier.php:305
50
+ msgid "Compatibility: %s"
51
+ msgstr "互換性: %s"
52
+
53
+ #: wp-updates-notifier.php:344
54
+ msgid "Theme: %s is out of date. Please update from version %s to %s"
55
+ msgstr "テーマ: に新しいバージョンがあります。バージョン %s から %s へ更新してください"
56
+
57
+ #: wp-updates-notifier.php:410
58
+ msgid "WP Updates Notifier: Updates Available @ %s"
59
+ msgstr "WP Updates Notifier: %s に更新があります"
60
+
61
+ #. #-#-#-#-# wp-updates-notifier.pot (WP Updates Notifier 1.4) #-#-#-#-#
62
+ #. Plugin Name of the plugin/theme
63
+ #: wp-updates-notifier.php:426
64
+ msgid "WP Updates Notifier"
65
+ msgstr "WP Updates Notifier"
66
+
67
+ #: wp-updates-notifier.php:515
68
+ msgid "Updates Notifier"
69
+ msgstr "更新通知"
70
+
71
+ #: wp-updates-notifier.php:521
72
+ msgid "Never"
73
+ msgstr "なし"
74
+
75
+ #: wp-updates-notifier.php:525
76
+ msgid "%1s @ %2s"
77
+ msgstr "%1s %2s"
78
+
79
+ #: wp-updates-notifier.php:531
80
+ msgid "Last scanned: %s"
81
+ msgstr "最終チェック日時: %s"
82
+
83
+ #: wp-updates-notifier.php:542
84
+ msgid "Save settings"
85
+ msgstr "変更を保存"
86
+
87
+ #: wp-updates-notifier.php:543
88
+ msgid "Save settings with test email"
89
+ msgstr "変更を保存してテストメールを送信"
90
+
91
+ #: wp-updates-notifier.php:552
92
+ msgid "Cron Method"
93
+ msgstr "Cron ツール"
94
+
95
+ #: wp-updates-notifier.php:553
96
+ msgid "Frequency to check"
97
+ msgstr "更新チェックの頻度"
98
+
99
+ #: wp-updates-notifier.php:554
100
+ msgid "Notify email to"
101
+ msgstr "更新情報の通知先"
102
+
103
+ #: wp-updates-notifier.php:555
104
+ msgid "Notify email from"
105
+ msgstr "更新通知の送信元"
106
+
107
+ #: wp-updates-notifier.php:556
108
+ msgid "Notify about plugin updates?"
109
+ msgstr "プラグインの更新を通知しますか?"
110
+
111
+ #: wp-updates-notifier.php:557
112
+ msgid "Notify about theme updates?"
113
+ msgstr "テーマの更新を通知しますか?"
114
+
115
+ #: wp-updates-notifier.php:558
116
+ msgid "Hide core WP update nag from non-admin users?"
117
+ msgstr "WP 本体が表示する更新通知を、管理者以外のユーザーから隠しますか?"
118
+
119
+ #: wp-updates-notifier.php:568
120
+ msgid "Invalid cron method selected"
121
+ msgstr "Cron ツールの入力値が正しくありません"
122
+
123
+ #: wp-updates-notifier.php:579
124
+ msgid "Invalid frequency entered"
125
+ msgstr "更新チェックの頻度の形式が正しくありません"
126
+
127
+ #: wp-updates-notifier.php:589
128
+ msgid "One or more email to addresses are invalid"
129
+ msgstr "通知先メールアドレスの形式が正しくありません"
130
+
131
+ #: wp-updates-notifier.php:600
132
+ msgid "No email to address entered"
133
+ msgstr "通知先を入力してください"
134
+
135
+ #: wp-updates-notifier.php:608
136
+ msgid "Invalid email from entered"
137
+ msgstr "送信元メールアドレスの形式が正しくありません"
138
+
139
+ #: wp-updates-notifier.php:616
140
+ msgid "Invalid plugin updates value entered"
141
+ msgstr "プラグインの更新通知の入力値が正しくありません"
142
+
143
+ #: wp-updates-notifier.php:624
144
+ msgid "Invalid theme updates value entered"
145
+ msgstr "テーマの更新通知の入力値が正しくありません"
146
+
147
+ #: wp-updates-notifier.php:632
148
+ msgid "Invalid hide updates value entered"
149
+ msgstr "本体からの更新通知を隠すかどうかの入力値が正しくありません"
150
+
151
+ #: wp-updates-notifier.php:644
152
+ msgid "This is a test message from WP Updates Notifier."
153
+ msgstr "WP Updates Notifier からのテストメールです。"
154
+
155
+ #: wp-updates-notifier.php:655
156
+ msgid "WordPress Cron"
157
+ msgstr "WordPress Cron"
158
+
159
+ #: wp-updates-notifier.php:656
160
+ msgid "Other Cron"
161
+ msgstr "その他の Cron"
162
+
163
+ #: wp-updates-notifier.php:660
164
+ msgid "Cron Command: "
165
+ msgstr "Cron コマンド: "
166
+
167
+ #: wp-updates-notifier.php:681
168
+ msgid "Separate multiple email address with a comma (,)"
169
+ msgstr "複数送信の場合はメールアドレスを半角コンマで区切る"
170
+
171
+ #: wp-updates-notifier.php:693 wp-updates-notifier.php:705
172
+ #: wp-updates-notifier.php:719
173
+ msgid "No"
174
+ msgstr "いいえ"
175
+
176
+ #: wp-updates-notifier.php:695 wp-updates-notifier.php:707
177
+ #: wp-updates-notifier.php:718
178
+ msgid "Yes"
179
+ msgstr "はい"
180
+
181
+ #: wp-updates-notifier.php:697
182
+ msgid "Yes but only active plugins"
183
+ msgstr "有効化されているプラグインのみ"
184
+
185
+ #: wp-updates-notifier.php:709
186
+ msgid "Yes but only active themes"
187
+ msgstr "使用中のテーマのみ"
188
+
189
+ #. Plugin URI of the plugin/theme
190
+ msgid "http://l3rady.com/projects/wp-updates-notifier/"
191
+ msgstr "http://l3rady.com/projects/wp-updates-notifier/"
192
+
193
+ #. Description of the plugin/theme
194
+ msgid ""
195
+ "Sends email to notify you if there are any updates for your WordPress site. "
196
+ "Can notify about core, plugin and theme updates."
197
+ msgstr "お使いの WordPress に利用可能な更新が見つかった際にメールでお知らせします。本体だけでなく、テーマやプラグインの更新にも対応しています。"
198
+
199
+ #. Author of the plugin/theme
200
+ msgid "Scott Cariss"
201
+ msgstr "Scott Cariss"
202
+
203
+ #. Author URI of the plugin/theme
204
+ msgid "http://l3rady.com/"
205
+ msgstr "http://l3rady.com/"
readme.txt CHANGED
@@ -1,10 +1,11 @@
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
 
@@ -53,6 +54,13 @@ This plugin is a fork of [Update Notifier](http://wordpress.org/extend/plugins/u
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
 
@@ -97,3 +105,41 @@ This plugin is a fork of [Update Notifier](http://wordpress.org/extend/plugins/u
97
 
98
  = 1.0 =
99
  * Initial release
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  === Plugin Name ===
2
+ Contributors: l3rady, eherman24
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: 4.3
7
+ Stable tag: 1.4.3
8
+ License: GPLv3 or later
9
 
10
  Sends email to notify you if there are any updates for your WordPress site. Can notify about core, plugin and theme updates.
11
 
54
 
55
  == Changelog ==
56
 
57
+ = 1.4.3 =
58
+ * Repaired all PHP errors being thrown
59
+ * Two new filters added to allow you to alter the email content (sc_wpun_email_subject, sc_wpun_email_content - see readme.txt for examples)
60
+
61
+ = 1.4.2 =
62
+ * Added an option that allows the plugin to notify the provided email about WordPress core automatic updates.
63
+
64
  = 1.4.1 =
65
  * Switch from using site_url() to home_url() in email subject line so not to link to a 404 page.
66
 
105
 
106
  = 1.0 =
107
  * Initial release
108
+
109
+ == Filters ==
110
+
111
+ Two filters have been provided to allow you to alter the email subject and email content being sent by WP Updates Notifier.
112
+
113
+ <h4>sc_wpun_email_subject</h4>
114
+
115
+ @parameters:<br />
116
+ $email_subject - the email subject to be filtered.
117
+
118
+ <strong>Example:</strong>
119
+ `
120
+ /*
121
+ * Alter the email subject being sent by WP Updates Notifier
122
+ */
123
+ function alter_wp_updates_notifier_email_subject( $email_subject ) {
124
+ $email_subject = 'This is the new email subject for updates notifier';
125
+ return $email_subject;
126
+ }
127
+ add_filter( 'sc_wpun_email_subject', 'alter_wp_updates_notifier_email_subject' );
128
+ `
129
+
130
+ <h4>sc_wpun_email_content</h4>
131
+
132
+ @parameters:<br />
133
+ $message - the content of the email to be filtered
134
+
135
+ <strong>Example:</strong>
136
+ `
137
+ /*
138
+ * Alter the email content being sent by WP Updates Notifier
139
+ */
140
+ function alter_wp_updates_notifier_email_content( $message ) {
141
+ $message = 'This is our new email content that will override the default.';
142
+ return $message;
143
+ }
144
+ add_filter( 'sc_wpun_email_content', 'alter_wp_updates_notifier_email_content' );
145
+ `
screenshot1.png ADDED
Binary file
screenshot2.png ADDED
Binary file
uninstall.php CHANGED
@@ -1,5 +1,5 @@
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
1
  <?php
2
+ /* Copyright 2015 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
wp-updates-notifier.php CHANGED
@@ -3,14 +3,16 @@
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
@@ -49,6 +51,7 @@ if ( !class_exists( 'sc_WPUpdatesNotifier' ) ) {
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
@@ -61,7 +64,6 @@ if ( !class_exists( 'sc_WPUpdatesNotifier' ) ) {
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
@@ -69,25 +71,26 @@ if ( !class_exists( 'sc_WPUpdatesNotifier' ) ) {
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 );
@@ -419,7 +422,7 @@ if ( !class_exists( 'sc_WPUpdatesNotifier' ) ) {
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
@@ -445,13 +448,36 @@ if ( !class_exists( 'sc_WPUpdatesNotifier' ) ) {
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?
@@ -516,7 +542,7 @@ if ( !class_exists( 'sc_WPUpdatesNotifier' ) ) {
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' );
@@ -557,15 +583,16 @@ if ( !class_exists( 'sc_WPUpdatesNotifier' ) ) {
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
 
@@ -636,6 +663,14 @@ if ( !class_exists( 'sc_WPUpdatesNotifier' ) ) {
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;
@@ -648,6 +683,13 @@ if ( !class_exists( 'sc_WPUpdatesNotifier' ) ) {
648
  add_filter( 'pre_set_transient_settings_errors', array( __CLASS__, "send_test_email" ) );
649
  }
650
 
 
 
 
 
 
 
 
651
  return $valid;
652
  }
653
 
@@ -660,7 +702,7 @@ if ( !class_exists( 'sc_WPUpdatesNotifier' ) ) {
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]">
@@ -675,7 +717,7 @@ if ( !class_exists( 'sc_WPUpdatesNotifier' ) ) {
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]">
@@ -686,20 +728,20 @@ if ( !class_exists( 'sc_WPUpdatesNotifier' ) ) {
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" ); ?>
@@ -711,7 +753,7 @@ if ( !class_exists( 'sc_WPUpdatesNotifier' ) ) {
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" ); ?>
@@ -723,7 +765,15 @@ if ( !class_exists( 'sc_WPUpdatesNotifier' ) ) {
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]">
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
+ Contributors: l3rady, eherman24
7
+ Version: 1.4.3
8
  Author: Scott Cariss
 
9
  Author URI: http://l3rady.com/
10
  Text Domain: wp-updates-notifier
11
  Domain Path: /languages
12
+ License: GPL3+
13
  */
14
 
15
+ /* Copyright 2015 Scott Cariss (email : scott@l3rady.com)
16
 
17
  This program is free software; you can redistribute it and/or modify
18
  it under the terms of the GNU General Public License as published by
51
  add_filter( 'plugin_action_links', array( __CLASS__, 'plugin_action_links' ), 10, 2 ); // Add settings link to plugin in plugin list
52
  add_filter( 'sc_wpun_plugins_need_update', array( __CLASS__, 'check_plugins_against_notified' ) ); // Filter out plugins that need update if already been notified
53
  add_filter( 'sc_wpun_themes_need_update', array( __CLASS__, 'check_themes_against_notified' ) ); // Filter out themes that need update if already been notified
54
+ add_filter( 'auto_core_update_email', array( __CLASS__, 'filter_auto_core_update_email' ), 1 ); // Filter the background update notification email.
55
  // Add Actions
56
  add_action( 'admin_menu', array( __CLASS__, 'admin_settings_menu' ) ); // Add menu to options
57
  add_action( 'admin_init', array( __CLASS__, 'admin_settings_init' ) ); // Add admin init functions
64
  add_action( 'wp_ajax_nopriv_sc_wpun_check', array( __CLASS__, 'sc_wpun_check' ) ); // Admin ajax hook for remote cron method.
65
  }
66
 
 
67
  /**
68
  * Check if this plugin settings are up to date. Firstly check the version in
69
  * the DB. If they don't match then load in defaults but don't override values
71
  *
72
  * @return void
73
  */
74
+ private static function settingsUpToDate() {
75
  $current_ver = self::getSetOptions( self::OPT_VERSION_FIELD ); // Get current plugin version
76
  if ( self::OPT_VERSION != $current_ver ) { // is the version the same as this plugin?
77
  $options = (array) get_option( self::OPT_FIELD ); // get current settings from DB
78
  $defaults = array( // Here are our default values for this plugin
79
+ 'cron_method' => 'wordpress', // Cron method to be used for scheduling scans
80
+ 'frequency' => 'hourly',
81
+ 'notify_to' => get_option( 'admin_email' ),
82
+ 'notify_from' => get_option( 'admin_email' ),
83
+ 'notify_plugins' => 1,
84
+ 'notify_themes' => 1,
85
+ 'notify_automatic' => 1,
86
+ 'hide_updates' => 1,
87
+ 'notified' => array(
88
  'core' => "",
89
  'plugin' => array(),
90
  'theme' => array(),
91
  ),
92
+ 'security_key' => sha1( microtime( true ) . mt_rand( 10000, 90000 ) ), // Generate a random key to be used for Other Cron Method,
93
+ 'last_check_time' => false
94
  );
95
  // Intersect current options with defaults. Basically removing settings that are obsolete
96
  $options = array_intersect_key( $options, $defaults );
422
  add_filter( 'wp_mail_from', array( __CLASS__, 'sc_wpun_wp_mail_from' ) ); // add from filter
423
  add_filter( 'wp_mail_from_name', array( __CLASS__, 'sc_wpun_wp_mail_from_name' ) ); // add from name filter
424
  add_filter( 'wp_mail_content_type', array( __CLASS__, 'sc_wpun_wp_mail_content_type' ) ); // add content type filter
425
+ wp_mail( $settings['notify_to'], apply_filters( 'sc_wpun_email_subject', $subject ), apply_filters( 'sc_wpun_email_content', $message ) ); // send email
426
  remove_filter( 'wp_mail_from', array( __CLASS__, 'sc_wpun_wp_mail_from' ) ); // remove from filter
427
  remove_filter( 'wp_mail_from_name', array( __CLASS__, 'sc_wpun_wp_mail_from_name' ) ); // remove from name filter
428
  remove_filter( 'wp_mail_content_type', array( __CLASS__, 'sc_wpun_wp_mail_content_type' ) ); // remove content type filter
448
  self::getSetOptions( self::OPT_FIELD, $options );
449
  }
450
 
451
+ /**
452
+ * Filter the background update notification email
453
+ *
454
+ * @param array $email Array of email arguments that will be passed to wp_mail().
455
+ *
456
+ * @return array Modified array containing the new email address.
457
+ */
458
+ public function filter_auto_core_update_email( $email ) {
459
+ $options = self::getSetOptions( self::OPT_FIELD ); // Get settings
460
+
461
+ if ( 0 != $options['notify_automatic'] ) {
462
+ if ( ! empty( $options['notify_to'] ) ) { // If an email address has been set, override the WordPress default.
463
+ $email['to'] = $options['notify_to'];
464
+ }
465
+
466
+ if ( ! empty( $options['notify_from'] ) ) { // If an email address has been set, override the WordPress default.
467
+ $email['headers'][] = 'From: ' . self::sc_wpun_wp_mail_from_name() . ' <' . $options['notify_from'] . '>';
468
+ }
469
+ }
470
+
471
+ return $email;
472
+ }
473
+
474
 
475
  /**
476
  * Removes the update nag for non admin users.
477
  *
478
  * @return void
479
  */
480
+ public static function remove_update_nag_for_nonadmins() {
481
  $settings = self::getSetOptions( self::OPT_FIELD ); // get settings
482
  if ( 1 == $settings['hide_updates'] ) { // is this enabled?
483
  if ( !current_user_can( 'update_plugins' ) ) { // can the current user update plugins?
542
  wp_enqueue_script( 'wp_updates_monitor_js_function' );
543
  }
544
 
545
+ public static function settings_page() {
546
  $options = self::getSetOptions( self::OPT_FIELD );
547
  $date_format = get_option( 'date_format' );
548
  $time_format = get_option( 'time_format' );
583
  <?php
584
  }
585
 
586
+ public static function admin_settings_init() {
587
  register_setting( self::OPT_FIELD, self::OPT_FIELD, array( __CLASS__, "sc_wpun_settings_validate" ) ); // Register Main Settings
588
  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
589
  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" );
590
  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" );
591
  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" );
592
+ 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" );
593
  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" );
594
  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" );
595
+ add_settings_field( "sc_wpun_settings_main_notify_automatic", __( "Notify automatic core updates to this address?", "wp-updates-notifier" ), array( __CLASS__, "sc_wpun_settings_main_field_notify_automatic" ), "wp-updates-notifier", "sc_wpun_settings_main" );
596
  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" );
597
  }
598
 
663
  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" );
664
  }
665
 
666
+ $sanitized_notify_automatic = absint( isset( $input['notify_automatic'] ) ? $input['notify_automatic'] : 0 );
667
+ if ( $sanitized_notify_automatic >= 0 && $sanitized_notify_automatic <= 1 ) {
668
+ $valid['notify_automatic'] = $sanitized_notify_automatic;
669
+ }
670
+ else {
671
+ add_settings_error( "sc_wpun_settings_main_notify_automatic", "sc_wpun_settings_main_notify_automatic_error", __( "Invalid automatic updates value entered", "wp-updates-notifier" ), "error" );
672
+ }
673
+
674
  $sanitized_hide_updates = absint( isset( $input['hide_updates'] ) ? $input['hide_updates'] : 0 );
675
  if ( $sanitized_hide_updates <= 1 ) {
676
  $valid['hide_updates'] = $sanitized_hide_updates;
683
  add_filter( 'pre_set_transient_settings_errors', array( __CLASS__, "send_test_email" ) );
684
  }
685
 
686
+ if ( isset( $input['cron_method'] ) && in_array( $input['cron_method'], array( "wordpress", "other" ) ) ) {
687
+ $valid['cron_method'] = $input['cron_method'];
688
+ }
689
+ else {
690
+ add_settings_error( "sc_wpun_settings_main_cron_method", "sc_wpun_settings_main_cron_method_error", __( "Invalid cron method selected", "wp-updates-notifier" ), "error" );
691
+ }
692
+
693
  return $valid;
694
  }
695
 
702
  public static function sc_wpun_settings_main_text() {
703
  }
704
 
705
+ public static function sc_wpun_settings_main_field_cron_method() {
706
  $options = self::getSetOptions( self::OPT_FIELD );
707
  ?>
708
  <select name="<?php echo self::OPT_FIELD; ?>[cron_method]">
717
  <?php
718
  }
719
 
720
+ public static function sc_wpun_settings_main_field_frequency() {
721
  $options = self::getSetOptions( self::OPT_FIELD );
722
  ?>
723
  <select id="sc_wpun_settings_main_frequency" name="<?php echo self::OPT_FIELD; ?>[frequency]">
728
  <?php
729
  }
730
 
731
+ public static function sc_wpun_settings_main_field_notify_to() {
732
  $options = self::getSetOptions( self::OPT_FIELD );
733
  ?>
734
  <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']; ?>" />
735
  <span class="description"><?php _e( "Separate multiple email address with a comma (,)", "wp-updates-notifier" ); ?></span><?php
736
  }
737
 
738
+ public static function sc_wpun_settings_main_field_notify_from() {
739
  $options = self::getSetOptions( self::OPT_FIELD );
740
  ?>
741
  <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
742
  }
743
 
744
+ public static function sc_wpun_settings_main_field_notify_plugins() {
745
  $options = self::getSetOptions( self::OPT_FIELD );
746
  ?>
747
  <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" ); ?>
753
  <?php
754
  }
755
 
756
+ public static function sc_wpun_settings_main_field_notify_themes() {
757
  $options = self::getSetOptions( self::OPT_FIELD );
758
  ?>
759
  <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" ); ?>
765
  <?php
766
  }
767
 
768
+ public static function sc_wpun_settings_main_field_notify_automatic() {
769
+ $options = self::getSetOptions( self::OPT_FIELD );
770
+ ?>
771
+ <label><input name="<?php echo self::OPT_FIELD; ?>[notify_automatic]" type="checkbox" value="1" <?php checked( $options['notify_automatic'], 1 ); ?> /> <?php _e( "Yes", "wp-updates-notifier" ); ?>
772
+ </label>
773
+ <?php
774
+ }
775
+
776
+ public static function sc_wpun_settings_main_field_hide_updates() {
777
  $options = self::getSetOptions( self::OPT_FIELD );
778
  ?>
779
  <select id="sc_wpun_settings_main_hide_updates" name="<?php echo self::OPT_FIELD; ?>[hide_updates]">