Photo Gallery by WD – Responsive Photo Gallery - Version 1.2.55

Version Description

  • Added: Support/rate us messages.
Download this release

Release Info

Developer webdorado
Plugin Icon 128x128 Photo Gallery by WD – Responsive Photo Gallery
Version 1.2.55
Comparing to
See all releases

Code changes from version 1.2.54 to 1.2.55

css/notices.css ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .wd-admin-notice {
2
+ background: #fff;
3
+ border: 4px;
4
+ display: block;
5
+ min-height: 68px;
6
+ padding: 10px 40px 10px 125px;
7
+ position: relative;
8
+ }
9
+ .wd-admin-notice a {
10
+ color: #10738B;
11
+ }
12
+ .wd-notice-logo {
13
+ clear: both;
14
+ content: "";
15
+ display: block;
16
+ background-image: url("../images/notice.png");
17
+ background-size: 108px auto;
18
+ background-repeat: no-repeat;
19
+ background-position: 0 45%;
20
+ width: 125px;
21
+ position: absolute;
22
+ top: 0;
23
+ bottom: 0;
24
+ left: 5px;
25
+ }
26
+ .wd-admin-notice > .dashicons {
27
+ color: #424242;
28
+ position: absolute;
29
+ right: 20px;
30
+ top: 40%;
31
+ }
32
+ .wd-notice-title {
33
+ font-size: 24px;
34
+ margin: 0;
35
+ }
36
+ .wd-notice-body {
37
+ font-weight: normal;
38
+ margin: 5px 0;
39
+ }
40
+ .wd-notice-body:after {
41
+ clear: both;
42
+ content: "";
43
+ display: block;
44
+ }
45
+ .wd-notice-body li {
46
+ float: left;
47
+ margin-right: 20px;
48
+ }
49
+ .wd-notice-body .dashicons {
50
+ font-size: 17px;
51
+ }
52
+ .wd-blue {
53
+ color: #10738B;
54
+ }
images/notice.png ADDED
Binary file
languages/bwg-sr_RS.mo CHANGED
Binary file
languages/bwg-sr_RS.po CHANGED
@@ -2,14 +2,14 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: bwg\n"
4
  "POT-Creation-Date: 2015-04-02 14:48+0400\n"
5
- "PO-Revision-Date: 2015-04-02 14:48+0400\n"
6
  "Last-Translator: \n"
7
  "Language-Team: \n"
8
  "Language: sr\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 1.7.5\n"
13
  "X-Poedit-Basepath: .\n"
14
  "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
15
  "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
@@ -35,11 +35,11 @@ msgstr "Даље"
35
 
36
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/framework/WDWLibrary.php:536
37
  msgid "Last"
38
- msgstr "Ласт"
39
 
40
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/framework/WDWLibrary.php:562
41
  msgid "Go to the first page"
42
- msgstr "Иди на првој страници"
43
 
44
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/framework/WDWLibrary.php:563
45
  msgid "Go to the previous page"
@@ -67,7 +67,7 @@ msgstr "Тражи"
67
 
68
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/framework/WDWLibrary.php:700
69
  msgid "Order by: "
70
- msgstr "ордер би"
71
 
72
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/framework/WDWLibrary.php:702
73
  msgid "Default"
@@ -79,11 +79,11 @@ msgstr "Назив"
79
 
80
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/framework/WDWLibrary.php:704
81
  msgid "Size"
82
- msgstr "величина"
83
 
84
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/framework/WDWLibrary.php:705
85
  msgid "Random"
86
- msgstr "случајан"
87
 
88
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewAlbum_compact_preview.php:145
89
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewAlbum_extended_preview.php:90
@@ -122,7 +122,7 @@ msgstr "Албум је празан."
122
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewAlbum_extended_preview.php:683
123
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/photo-gallery.php:3272
124
  msgid "There are no images matching your search."
125
- msgstr "Нема слике одговарају претрагу."
126
 
127
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewAlbum_compact_preview.php:709
128
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewAlbum_extended_preview.php:688
@@ -136,7 +136,7 @@ msgstr "Галерија је празна."
136
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewSlideshow.php:1437
137
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewThumbnails.php:500
138
  msgid "Play"
139
- msgstr "Плаи"
140
 
141
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewAlbum_extended_preview.php:642
142
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewAlbum_extended_preview.php:827
@@ -149,14 +149,14 @@ msgstr "Сакриј"
149
 
150
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewGalleryBox.php:791
151
  msgid "The image has been deleted."
152
- msgstr "Слика је обрисан"
153
 
154
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewGalleryBox.php:815
155
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewGalleryBox.php:1513
156
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewGalleryBox.php:1944
157
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewGalleryBox.php:2045
158
  msgid "Maximize"
159
- msgstr "Макимизе"
160
 
161
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewGalleryBox.php:819
162
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewGalleryBox.php:1515
@@ -167,7 +167,7 @@ msgstr "Цео екран"
167
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewGalleryBox.php:821
168
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewGalleryBox.php:1834
169
  msgid "Show info"
170
- msgstr "Схов инфо"
171
 
172
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewGalleryBox.php:826
173
  msgid "Open image in original size."
@@ -175,7 +175,7 @@ msgstr "Отвори слику у оригиналној величини. "
175
 
176
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewGalleryBox.php:834
177
  msgid "Download original image"
178
- msgstr "Довнлоад оригинал имаге"
179
 
180
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewGalleryBox.php:1655
181
  msgid "Show Comments"
@@ -187,16 +187,16 @@ msgstr "Сакриј коментаре"
187
 
188
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewGalleryBox.php:1830
189
  msgid "Hide info"
190
- msgstr "Схов инфо"
191
 
192
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewGalleryBox.php:1981
193
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewGalleryBox.php:2180
194
  msgid "Restore"
195
- msgstr "Ресторе"
196
 
197
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewGalleryBox.php:2094
198
  msgid "Exit Fullscreen"
199
- msgstr "Екит Фуллсцреен"
200
 
201
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewGalleryBox.php:2107
202
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewGalleryBox.php:2122
@@ -209,7 +209,7 @@ msgstr "Пауза"
209
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewSlideshow.php:137
210
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewThumbnails.php:158
211
  msgid "There is no gallery selected or the gallery was deleted."
212
- msgstr "Нема изабраних галерија или галерија је избрисан."
213
 
214
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/photo-gallery.php:3270
215
  msgid "field is required."
@@ -226,25 +226,25 @@ msgstr "Ово није валидна емаил адреса. "
226
  #~ msgstr "Подели на Фацебоок-у."
227
 
228
  #~ msgid "Share on Twitter"
229
- #~ msgstr "Схаре он Твиттер"
230
 
231
  #~ msgid "Share on Google+"
232
  #~ msgstr "Подели на Гоогле+"
233
 
234
  #~ msgid "Share on Pinterest"
235
- #~ msgstr "Схаре он Pinterest"
236
 
237
  #~ msgid "Share on Tumblr"
238
- #~ msgstr "Схаре он Tumblr"
239
 
240
  #~ msgid "Show rating"
241
- #~ msgstr "Схов рејтинг"
242
 
243
  #~ msgid "Hits: "
244
- #~ msgstr "Хитс: "
245
 
246
  #~ msgid "Rated."
247
- #~ msgstr "Ратед."
248
 
249
  #~ msgid "Not rated yet."
250
  #~ msgstr "Још није оцењивано. "
@@ -259,7 +259,7 @@ msgstr "Ово није валидна емаил адреса. "
259
  #~ msgstr "Већ сте оценили. "
260
 
261
  #~ msgid "Error. Incorrect Verification Code."
262
- #~ msgstr "Грешка. Неправилно Верификациони код. "
263
 
264
  #~ msgid "Name"
265
  #~ msgstr "Име"
@@ -286,4 +286,4 @@ msgstr "Ово није валидна емаил адреса. "
286
  #~ msgstr "Сакриј рејтинг"
287
 
288
  #~ msgid "Photo gallery plugin autoupdate interval."
289
- #~ msgstr "Фото галерија плугин аутоматског ажурирања интервал."
2
  msgstr ""
3
  "Project-Id-Version: bwg\n"
4
  "POT-Creation-Date: 2015-04-02 14:48+0400\n"
5
+ "PO-Revision-Date: 2015-09-01 16:40+0400\n"
6
  "Last-Translator: \n"
7
  "Language-Team: \n"
8
  "Language: sr\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 1.5.7\n"
13
  "X-Poedit-Basepath: .\n"
14
  "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
15
  "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
35
 
36
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/framework/WDWLibrary.php:536
37
  msgid "Last"
38
+ msgstr "Последња"
39
 
40
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/framework/WDWLibrary.php:562
41
  msgid "Go to the first page"
42
+ msgstr "Иди на прву страници"
43
 
44
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/framework/WDWLibrary.php:563
45
  msgid "Go to the previous page"
67
 
68
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/framework/WDWLibrary.php:700
69
  msgid "Order by: "
70
+ msgstr "Уреди по:"
71
 
72
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/framework/WDWLibrary.php:702
73
  msgid "Default"
79
 
80
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/framework/WDWLibrary.php:704
81
  msgid "Size"
82
+ msgstr "Величина"
83
 
84
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/framework/WDWLibrary.php:705
85
  msgid "Random"
86
+ msgstr "Случајан"
87
 
88
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewAlbum_compact_preview.php:145
89
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewAlbum_extended_preview.php:90
122
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewAlbum_extended_preview.php:683
123
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/photo-gallery.php:3272
124
  msgid "There are no images matching your search."
125
+ msgstr "Не постоје слике које одговарају Вашој претрази."
126
 
127
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewAlbum_compact_preview.php:709
128
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewAlbum_extended_preview.php:688
136
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewSlideshow.php:1437
137
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewThumbnails.php:500
138
  msgid "Play"
139
+ msgstr "Пусти"
140
 
141
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewAlbum_extended_preview.php:642
142
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewAlbum_extended_preview.php:827
149
 
150
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewGalleryBox.php:791
151
  msgid "The image has been deleted."
152
+ msgstr "Слика је обрисана"
153
 
154
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewGalleryBox.php:815
155
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewGalleryBox.php:1513
156
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewGalleryBox.php:1944
157
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewGalleryBox.php:2045
158
  msgid "Maximize"
159
+ msgstr "Максимална величина"
160
 
161
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewGalleryBox.php:819
162
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewGalleryBox.php:1515
167
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewGalleryBox.php:821
168
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewGalleryBox.php:1834
169
  msgid "Show info"
170
+ msgstr "Прикажи инфо"
171
 
172
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewGalleryBox.php:826
173
  msgid "Open image in original size."
175
 
176
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewGalleryBox.php:834
177
  msgid "Download original image"
178
+ msgstr "Преузимање оригиналне слике"
179
 
180
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewGalleryBox.php:1655
181
  msgid "Show Comments"
187
 
188
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewGalleryBox.php:1830
189
  msgid "Hide info"
190
+ msgstr "Сакриј инфо"
191
 
192
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewGalleryBox.php:1981
193
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewGalleryBox.php:2180
194
  msgid "Restore"
195
+ msgstr "Врати"
196
 
197
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewGalleryBox.php:2094
198
  msgid "Exit Fullscreen"
199
+ msgstr "Изађи из целог екрана"
200
 
201
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewGalleryBox.php:2107
202
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewGalleryBox.php:2122
209
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewSlideshow.php:137
210
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/frontend/views/BWGViewThumbnails.php:158
211
  msgid "There is no gallery selected or the gallery was deleted."
212
+ msgstr "Нема изабраних галерија или галерија је избрисана."
213
 
214
  #: C:\wamp\www\wp2\wp-content\plugins\photo-gallery/photo-gallery.php:3270
215
  msgid "field is required."
226
  #~ msgstr "Подели на Фацебоок-у."
227
 
228
  #~ msgid "Share on Twitter"
229
+ #~ msgstr "Подели на Твиттер"
230
 
231
  #~ msgid "Share on Google+"
232
  #~ msgstr "Подели на Гоогле+"
233
 
234
  #~ msgid "Share on Pinterest"
235
+ #~ msgstr "Подели на Pinterest"
236
 
237
  #~ msgid "Share on Tumblr"
238
+ #~ msgstr "Подели на Tumblr"
239
 
240
  #~ msgid "Show rating"
241
+ #~ msgstr "Прикажи рејтинг"
242
 
243
  #~ msgid "Hits: "
244
+ #~ msgstr "Прегледи: "
245
 
246
  #~ msgid "Rated."
247
+ #~ msgstr "Рејтинг."
248
 
249
  #~ msgid "Not rated yet."
250
  #~ msgstr "Још није оцењивано. "
259
  #~ msgstr "Већ сте оценили. "
260
 
261
  #~ msgid "Error. Incorrect Verification Code."
262
+ #~ msgstr "Грешка. Неправилан Верификациони код. "
263
 
264
  #~ msgid "Name"
265
  #~ msgstr "Име"
286
  #~ msgstr "Сакриј рејтинг"
287
 
288
  #~ msgid "Photo gallery plugin autoupdate interval."
289
+ #~ msgstr "Интервал аутоматског ажурирања Фото галерије."
photo-gallery-notices.php ADDED
@@ -0,0 +1,207 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (!defined('ABSPATH')) {
3
+ exit;
4
+ }
5
+
6
+ class BWG_Notices {
7
+ protected $prefix = 'bwg';
8
+ protected $plugin_url = WD_BWG_URL;
9
+ protected $plugin_version = "wd_bwg_version";
10
+ protected $plugin_name = 'Photo Gallery';
11
+
12
+ public $notice_spam = 0;
13
+ public $notice_spam_max = 1;
14
+
15
+ // Basic actions to run
16
+ public function __construct() {
17
+ // Runs the admin notice ignore function incase a dismiss button has been clicked
18
+ add_action('admin_init', array($this, 'admin_notice_ignore'));
19
+ // Runs the admin notice temp ignore function incase a temp dismiss link has been clicked
20
+ add_action('admin_init', array($this, 'admin_notice_temp_ignore'));
21
+ add_action('admin_notices', array($this, 'wd_admin_notices'));
22
+ }
23
+
24
+ // Checks to ensure notices aren't disabled and the user has the correct permissions.
25
+ public function wd_admin_notice() {
26
+ $settings = get_option($this->prefix . '_admin_notice');
27
+ if (!isset($settings['disable_admin_notices']) || (isset($settings['disable_admin_notices']) && $settings['disable_admin_notices'] == 0)) {
28
+ if (current_user_can('manage_options')) {
29
+ return true;
30
+ }
31
+ }
32
+ return false;
33
+ }
34
+
35
+ // Primary notice function that can be called from an outside function sending necessary variables
36
+ public function admin_notice($admin_notices) {
37
+ // Check options
38
+ if (!$this->wd_admin_notice()) {
39
+ return false;
40
+ }
41
+ foreach ($admin_notices as $slug => $admin_notice) {
42
+ // Call for spam protection
43
+ if ($this->anti_notice_spam()) {
44
+ return false;
45
+ }
46
+
47
+ // Check for proper page to display on
48
+ if (isset( $admin_notices[$slug]['pages']) && is_array( $admin_notices[$slug]['pages'])) {
49
+ if (!$this->admin_notice_pages($admin_notices[$slug]['pages'])) {
50
+ return false;
51
+ }
52
+ }
53
+
54
+ // Check for required fields
55
+ if (!$this->required_fields($admin_notices[$slug])) {
56
+ // Get the current date then set start date to either passed value or current date value and add interval
57
+ $current_date = current_time("n/j/Y");
58
+ $start = (isset($admin_notices[$slug]['start']) ? $admin_notices[$slug]['start'] : $current_date);
59
+ $start = date("n/j/Y", strtotime($start));
60
+ $date_array = explode('/', $start);
61
+ $interval = (isset($admin_notices[$slug]['int']) ? $admin_notices[$slug]['int'] : 0);
62
+ $date_array[1] += $interval;
63
+ $start = date("n/j/Y", mktime(0, 0, 0, $date_array[0], $date_array[1], $date_array[2]));
64
+
65
+ // This is the main notices storage option
66
+ $admin_notices_option = get_option($this->prefix . '_admin_notice', array());
67
+ // Check if the message is already stored and if so just grab the key otherwise store the message and its associated date information
68
+ if (!array_key_exists( $slug, $admin_notices_option)) {
69
+ $admin_notices_option[$slug]['start'] = $start;
70
+ $admin_notices_option[$slug]['int'] = $interval;
71
+ update_option($this->prefix . '_admin_notice', $admin_notices_option);
72
+ }
73
+
74
+ // Sanity check to ensure we have accurate information
75
+ // New date information will not overwrite old date information
76
+ $admin_display_check = (isset($admin_notices_option[$slug]['dismissed']) ? $admin_notices_option[$slug]['dismissed'] : 0);
77
+ $admin_display_start = (isset($admin_notices_option[$slug]['start']) ? $admin_notices_option[$slug]['start'] : $start);
78
+ $admin_display_interval = (isset($admin_notices_option[$slug]['int']) ? $admin_notices_option[$slug]['int'] : $interval);
79
+ $admin_display_msg = (isset($admin_notices[$slug]['msg']) ? $admin_notices[$slug]['msg'] : '');
80
+ $admin_display_title = (isset($admin_notices[$slug]['title']) ? $admin_notices[$slug]['title'] : '');
81
+ $admin_display_link = (isset($admin_notices[$slug]['link']) ? $admin_notices[$slug]['link'] : '');
82
+ $output_css = false;
83
+ // Ensure the notice hasn't been hidden and that the current date is after the start date
84
+ if ($admin_display_check == 0 && strtotime($admin_display_start) <= strtotime($current_date)) {
85
+ // Get remaining query string
86
+ $query_str = esc_url(add_query_arg($this->prefix . '_admin_notice_ignore', $slug));
87
+ // Admin notice display output
88
+ echo '<div class="update-nag wd-admin-notice">
89
+ <div class="wd-notice-logo"></div>
90
+ <p class="wd-notice-title">' . $admin_display_title . '</p>
91
+ <p class="wd-notice-body">' . $admin_display_msg . '</p>
92
+ <ul class="wd-notice-body wd-blue">' . $admin_display_link . '</ul>
93
+ <a href="' . $query_str . '" class="dashicons dashicons-dismiss"></a>
94
+ </div>';
95
+ $this->notice_spam += 1;
96
+ $output_css = true;
97
+ }
98
+ if ($output_css) {
99
+ wp_enqueue_style($this->prefix . '-admin-notices', $this->plugin_url . '/css/notices.css', array(), get_option($this->plugin_version));
100
+ }
101
+ }
102
+ }
103
+ }
104
+
105
+ // Spam protection check
106
+ public function anti_notice_spam() {
107
+ if ($this->notice_spam >= $this->notice_spam_max) {
108
+ return true;
109
+ }
110
+ return false;
111
+ }
112
+
113
+ // Ignore function that gets ran at admin init to ensure any messages that were dismissed get marked
114
+ public function admin_notice_ignore() {
115
+ // If user clicks to ignore the notice, update the option to not show it again
116
+ if (isset($_GET[$this->prefix . '_admin_notice_ignore'])) {
117
+ $admin_notices_option = get_option($this->prefix . '_admin_notice', array());
118
+ $admin_notices_option[$_GET[$this->prefix . '_admin_notice_ignore']]['dismissed'] = 1;
119
+ update_option($this->prefix . '_admin_notice', $admin_notices_option);
120
+ $query_str = remove_query_arg($this->prefix . '_admin_notice_ignore');
121
+ wp_redirect($query_str);
122
+ exit;
123
+ }
124
+ }
125
+
126
+ // Temp Ignore function that gets ran at admin init to ensure any messages that were temp dismissed get their start date changed
127
+ public function admin_notice_temp_ignore() {
128
+ // If user clicks to temp ignore the notice, update the option to change the start date - default interval of 14 days
129
+ if (isset($_GET[$this->prefix . '_admin_notice_temp_ignore'])) {
130
+ $admin_notices_option = get_option($this->prefix . '_admin_notice', array());
131
+ $current_date = current_time("n/j/Y");
132
+ $date_array = explode('/', $current_date);
133
+ $interval = (isset($_GET['wd_int']) ? $_GET['wd_int'] : 14);
134
+ $date_array[1] += $interval;
135
+ $new_start = date("n/j/Y", mktime(0, 0, 0, $date_array[0], $date_array[1], $date_array[2]));
136
+
137
+ $admin_notices_option[$_GET[$this->prefix . '_admin_notice_temp_ignore']]['start'] = $new_start;
138
+ $admin_notices_option[$_GET[$this->prefix . '_admin_notice_temp_ignore']]['dismissed'] = 0;
139
+ update_option($this->prefix . '_admin_notice', $admin_notices_option);
140
+ $query_str = remove_query_arg(array($this->prefix . '_admin_notice_temp_ignore', 'wd_int'));
141
+ wp_redirect( $query_str );
142
+ exit;
143
+ }
144
+ }
145
+
146
+ public function admin_notice_pages($pages) {
147
+ foreach ($pages as $key => $page) {
148
+ if (is_array($page)) {
149
+ if (isset($_GET['page']) && $_GET['page'] == $page[0] && isset($_GET['tab']) && $_GET['tab'] == $page[1]) {
150
+ return true;
151
+ }
152
+ }
153
+ else {
154
+ if ($page == 'all') {
155
+ return true;
156
+ }
157
+ if (get_current_screen()->id === $page) {
158
+ return true;
159
+ }
160
+ if (isset($_GET['page']) && $_GET['page'] == $page) {
161
+ return true;
162
+ }
163
+ }
164
+ return false;
165
+ }
166
+ }
167
+
168
+ // Required fields check
169
+ public function required_fields( $fields ) {
170
+ if (!isset( $fields['msg']) || (isset($fields['msg']) && empty($fields['msg']))) {
171
+ return true;
172
+ }
173
+ if (!isset( $fields['title']) || (isset($fields['title']) && empty($fields['title']))) {
174
+ return true;
175
+ }
176
+ return false;
177
+ }
178
+
179
+ // Special parameters function that is to be used in any extension of this class
180
+ public function special_parameters($admin_notices) {
181
+ // Intentionally left blank
182
+ }
183
+
184
+ public function wd_admin_notices() {
185
+ $one_week_support = add_query_arg(array($this->prefix . '_admin_notice_ignore' => 'one_week_support'));
186
+ $notices['one_week_support'] = array(
187
+ 'title' => __('Hey! How\'s It Going?', $this->prefix),
188
+ 'msg' => sprintf(__('Thank you for using WordPress %s! We hope that you\'ve found everything you need, but if you have any questions:', $this->prefix), $this->plugin_name),
189
+ 'link' => '<li><span class="dashicons dashicons-media-text"></span><a target="_blank" href="https://web-dorado.com/wordpress-gallery/installing.html">' . __('Check out User Guide', $this->prefix) . '</a></li>
190
+ <li><span class="dashicons dashicons-sos"></span><a target="_blank" href="https://web-dorado.com/forum/photo-gallery.html">' . __('Get Some Help', $this->prefix) . '</a></li>
191
+ <li><span class="dashicons dashicons-dismiss"></span><a href="' . $one_week_support . '">' . __('Never show again', $this->prefix) . '</a></li>',
192
+ 'int' => 7
193
+ );
194
+ $two_week_review_ignore = add_query_arg(array($this->prefix . '_admin_notice_ignore' => 'two_week_review'));
195
+ $two_week_review_temp = add_query_arg(array($this->prefix . '_admin_notice_temp_ignore' => 'two_week_review', 'int' => 14));
196
+ $notices['two_week_review'] = array(
197
+ 'title' => __('Leave A Review?', $this->prefix),
198
+ 'msg' => sprintf(__('We hope you\'ve enjoyed using WordPress %s! Would you consider leaving us a review on WordPress.org?', $this->prefix), $this->plugin_name),
199
+ 'link' => '<li><span class="dashicons dashicons-external"></span><a href="https://wordpress.org/support/view/plugin-reviews/photo-gallery?filter=5" target="_blank">' . __('Sure! I\'d love to!', $this->prefix) . '</a></li>
200
+ <li><span class="dashicons dashicons-smiley"></span><a href="' . $two_week_review_ignore . '"> ' . __('I\'ve already left a review', $this->prefix) . '</a></li>
201
+ <li><span class="dashicons dashicons-calendar-alt"></span><a href="' . $two_week_review_temp . '">' . __('Maybe Later', $this->prefix) . '</a></li>
202
+ <li><span class="dashicons dashicons-dismiss"></span><a href="' . $two_week_review_ignore . '">' . __('Never show again', $this->prefix) . '</a></li>',
203
+ 'int' => 14
204
+ );
205
+ $this->admin_notice($notices);
206
+ }
207
+ }
photo-gallery.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Photo Gallery
5
  * Plugin URI: https://web-dorado.com/products/wordpress-photo-gallery-plugin.html
6
  * Description: This plugin is a fully responsive gallery plugin with advanced functionality. It allows having different image galleries for your posts and pages. You can create unlimited number of galleries, combine them into albums, and provide descriptions and tags.
7
- * Version: 1.2.54
8
  * Author: WebDorado
9
  * Author URI: https://web-dorado.com/
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -2311,7 +2311,7 @@ function bwg_activate() {
2311
  ));
2312
  }
2313
  $version = get_option("wd_bwg_version");
2314
- $new_version = '1.2.54';
2315
  if ($version && version_compare($version, $new_version, '<')) {
2316
  require_once WD_BWG_DIR . "/update/bwg_update.php";
2317
  bwg_update($version);
@@ -2359,7 +2359,7 @@ wp_oembed_add_provider( '#https://instagr(\.am|am\.com)/p/.*#i', 'https://api.in
2359
 
2360
  function bwg_update_hook() {
2361
  $version = get_option("wd_bwg_version");
2362
- $new_version = '1.2.54';
2363
  if ($version && version_compare($version, $new_version, '<')) {
2364
  require_once WD_BWG_DIR . "/update/bwg_update.php";
2365
  bwg_update($version);
@@ -2678,4 +2678,8 @@ function wd_bwg_version(){
2678
 
2679
  }
2680
 
 
 
 
 
2681
  ?>
4
  * Plugin Name: Photo Gallery
5
  * Plugin URI: https://web-dorado.com/products/wordpress-photo-gallery-plugin.html
6
  * Description: This plugin is a fully responsive gallery plugin with advanced functionality. It allows having different image galleries for your posts and pages. You can create unlimited number of galleries, combine them into albums, and provide descriptions and tags.
7
+ * Version: 1.2.55
8
  * Author: WebDorado
9
  * Author URI: https://web-dorado.com/
10
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
2311
  ));
2312
  }
2313
  $version = get_option("wd_bwg_version");
2314
+ $new_version = '1.2.55';
2315
  if ($version && version_compare($version, $new_version, '<')) {
2316
  require_once WD_BWG_DIR . "/update/bwg_update.php";
2317
  bwg_update($version);
2359
 
2360
  function bwg_update_hook() {
2361
  $version = get_option("wd_bwg_version");
2362
+ $new_version = '1.2.55';
2363
  if ($version && version_compare($version, $new_version, '<')) {
2364
  require_once WD_BWG_DIR . "/update/bwg_update.php";
2365
  bwg_update($version);
2678
 
2679
  }
2680
 
2681
+ if (is_admin() && (!defined('DOING_AJAX') || !DOING_AJAX)) {
2682
+ include_once(WD_BWG_DIR . '/photo-gallery-notices.php');
2683
+ new BWG_Notices();
2684
+ }
2685
  ?>
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://web-dorado.com/products/wordpress-photo-gallery-plugin.html
4
  Tags: photo, photo gallery, image gallery, video gallery, gallery, galleries, wordpress gallery plugin, images gallery, album, photo albums, simple gallery, best gallery plugin, free photo gallery, wp gallery, wordpress gallery, website gallery, gallery shortcode, best gallery, picture, pictures, gallery slider, photo album, photogallery, widget gallery, image, images, photos, gallery lightbox, photoset, wordpress photo gallery plugin, wp gallery plugins, responsive wordpress photo gallery, media, image album, filterable gallery, banner rotator, fullscreen gallery, fotogalerie, galleria, galerie, galeri, responsive gallery, add album, add gallery, add pictures, fotoalbum, foto, gallery decription, multiple pictures, photoalbum, upload images, upload photos, view images, view pictures, admin, AJAX, comments, gallery image, image lightbox, image rotate, image slideshow, image slider, jquery, jquery gallery, slide show, slideshow, thumbnail, thumbnail view, thumbnails, thumbs, responsive, watermarking, watermarks,fullscreen slider, lightbox, photography, sidebar, slide, youtube, vimeo, videos, instagram, mosaic
5
  Requires at least: 3.4
6
  Tested up to: 4.3
7
- Stable tag: 1.2.54
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -207,6 +207,9 @@ Yes, it is possible to add advertising and/or watermark over the images. In both
207
 
208
  == Changelog ==
209
 
 
 
 
210
  = 1.2.54 =
211
  * Fixed: Image browser view pagination styles.
212
 
4
  Tags: photo, photo gallery, image gallery, video gallery, gallery, galleries, wordpress gallery plugin, images gallery, album, photo albums, simple gallery, best gallery plugin, free photo gallery, wp gallery, wordpress gallery, website gallery, gallery shortcode, best gallery, picture, pictures, gallery slider, photo album, photogallery, widget gallery, image, images, photos, gallery lightbox, photoset, wordpress photo gallery plugin, wp gallery plugins, responsive wordpress photo gallery, media, image album, filterable gallery, banner rotator, fullscreen gallery, fotogalerie, galleria, galerie, galeri, responsive gallery, add album, add gallery, add pictures, fotoalbum, foto, gallery decription, multiple pictures, photoalbum, upload images, upload photos, view images, view pictures, admin, AJAX, comments, gallery image, image lightbox, image rotate, image slideshow, image slider, jquery, jquery gallery, slide show, slideshow, thumbnail, thumbnail view, thumbnails, thumbs, responsive, watermarking, watermarks,fullscreen slider, lightbox, photography, sidebar, slide, youtube, vimeo, videos, instagram, mosaic
5
  Requires at least: 3.4
6
  Tested up to: 4.3
7
+ Stable tag: 1.2.55
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
207
 
208
  == Changelog ==
209
 
210
+ = 1.2.55 =
211
+ * Added: Support/rate us messages.
212
+
213
  = 1.2.54 =
214
  * Fixed: Image browser view pagination styles.
215