Post Views Counter - Version 1.2.3

Version Description

  • New: IP wildcard support
  • Tweak: Delete post_views database table on deactivation
Download this release

Release Info

Developer dfactory
Plugin Icon 128x128 Post Views Counter
Version 1.2.3
Comparing to
See all releases

Code changes from version 1.2.2 to 1.2.3

includes/counter.php CHANGED
@@ -27,6 +27,21 @@ class Post_Views_Counter_Counter {
27
  add_action( 'wp_ajax_nopriv_pvc-check-post', array( $this, 'check_post_ajax' ) );
28
  }
29
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  /**
31
  * Check whether to count visit.
32
  *
@@ -34,16 +49,28 @@ class Post_Views_Counter_Counter {
34
  */
35
  public function check_post( $id = 0 ) {
36
  // get post id
37
- $id = (int) (empty( $id ) ? get_the_ID() : $id);
38
-
 
39
  if ( empty( $id ) )
40
  return;
41
 
 
42
  $ips = Post_Views_Counter()->options['general']['exclude_ips'];
43
 
44
  // whether to count this ip
45
- if ( ! empty( $ips ) && filter_var( preg_replace( '/[^0-9a-fA-F:., ]/', '', $_SERVER['REMOTE_ADDR'] ), FILTER_VALIDATE_IP ) && in_array( $_SERVER['REMOTE_ADDR'], $ips, true ) )
46
- return;
 
 
 
 
 
 
 
 
 
 
47
 
48
  // get groups to check them faster
49
  $groups = Post_Views_Counter()->options['general']['exclude']['groups'];
27
  add_action( 'wp_ajax_nopriv_pvc-check-post', array( $this, 'check_post_ajax' ) );
28
  }
29
 
30
+ /**
31
+ * Check if IPv4 is in range.
32
+ *
33
+ * @param string $ip IP address
34
+ * @param string $range IP range
35
+ * @return boolean Whether IP is in range
36
+ */
37
+ function ipv4_in_range( $ip, $range ) {
38
+ $start = str_replace( '*', '0', $range );
39
+ $end = str_replace( '*', '255', $range );
40
+ $ip = (float)sprintf( "%u", ip2long( $ip ) );
41
+
42
+ return ( $ip >= (float)sprintf( "%u", ip2long( $start ) ) && $ip <= (float)sprintf( "%u", ip2long( $end ) ) );
43
+ }
44
+
45
  /**
46
  * Check whether to count visit.
47
  *
49
  */
50
  public function check_post( $id = 0 ) {
51
  // get post id
52
+ $id = (int) ( empty( $id ) ? get_the_ID() : $id );
53
+
54
+ // empty id?
55
  if ( empty( $id ) )
56
  return;
57
 
58
+ // get ips
59
  $ips = Post_Views_Counter()->options['general']['exclude_ips'];
60
 
61
  // whether to count this ip
62
+ if ( ! empty( $ips ) && filter_var( preg_replace( '/[^0-9a-fA-F:., ]/', '', $_SERVER['REMOTE_ADDR'] ), FILTER_VALIDATE_IP ) ) {
63
+ // check ips
64
+ foreach ( $ips as $ip ) {
65
+ if ( strpos( $ip, '*' ) !== false ) {
66
+ if ( $this->ipv4_in_range( $_SERVER['REMOTE_ADDR'], $ip ) )
67
+ return;
68
+ } else {
69
+ if ( $_SERVER['REMOTE_ADDR'] === $ip )
70
+ return;
71
+ }
72
+ }
73
+ }
74
 
75
  // get groups to check them faster
76
  $groups = Post_Views_Counter()->options['general']['exclude']['groups'];
includes/settings.php CHANGED
@@ -32,6 +32,9 @@ class Post_Views_Counter_Settings {
32
  */
33
  public function load_defaults() {
34
 
 
 
 
35
  $this->modes = array(
36
  'php' => __( 'PHP', 'post-views-counter' ),
37
  'js' => __( 'JavaScript', 'post-views-counter' )
@@ -93,6 +96,10 @@ class Post_Views_Counter_Settings {
93
  * Get post types avaiable for counting.
94
  */
95
  public function load_post_types() {
 
 
 
 
96
  $post_types = array();
97
 
98
  // built in public post types
@@ -653,11 +660,15 @@ class Post_Views_Counter_Settings {
653
 
654
  // exclude ips
655
  if ( isset( $input['exclude_ips'] ) ) {
656
-
657
  $ips = array();
658
 
659
  foreach ( $input['exclude_ips'] as $ip ) {
660
- if ( filter_var( $ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 ) )
 
 
 
 
 
661
  $ips[] = $ip;
662
  }
663
 
@@ -755,5 +766,4 @@ class Post_Views_Counter_Settings {
755
 
756
  return $input;
757
  }
758
-
759
  }
32
  */
33
  public function load_defaults() {
34
 
35
+ if ( ! is_admin() )
36
+ return;
37
+
38
  $this->modes = array(
39
  'php' => __( 'PHP', 'post-views-counter' ),
40
  'js' => __( 'JavaScript', 'post-views-counter' )
96
  * Get post types avaiable for counting.
97
  */
98
  public function load_post_types() {
99
+
100
+ if ( ! is_admin() )
101
+ return;
102
+
103
  $post_types = array();
104
 
105
  // built in public post types
660
 
661
  // exclude ips
662
  if ( isset( $input['exclude_ips'] ) ) {
 
663
  $ips = array();
664
 
665
  foreach ( $input['exclude_ips'] as $ip ) {
666
+ if ( strpos( $ip, '*' ) !== false ) {
667
+ $new_ip = str_replace( '*', '0', $ip );
668
+
669
+ if ( filter_var( $new_ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 ) )
670
+ $ips[] = $ip;
671
+ } elseif ( filter_var( $ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 ) )
672
  $ips[] = $ip;
673
  }
674
 
766
 
767
  return $input;
768
  }
 
769
  }
includes/widgets.php CHANGED
@@ -73,6 +73,10 @@ class Post_Views_Counter_List_Widget extends WP_Widget {
73
  * Get selected post types.
74
  */
75
  public function load_post_types() {
 
 
 
 
76
  $this->pvc_post_types = Post_Views_Counter()->settings->post_types;
77
  }
78
 
73
  * Get selected post types.
74
  */
75
  public function load_post_types() {
76
+
77
+ if ( ! is_admin() )
78
+ return;
79
+
80
  $this->pvc_post_types = Post_Views_Counter()->settings->post_types;
81
  }
82
 
languages/post-views-counter-pl_PL.mo DELETED
Binary file
languages/post-views-counter-pl_PL.po DELETED
@@ -1,670 +0,0 @@
1
- msgid ""
2
- msgstr ""
3
- "Project-Id-Version: Post Views Counter\n"
4
- "POT-Creation-Date: 2014-07-03 01:06+0100\n"
5
- "PO-Revision-Date: 2014-07-03 01:07+0100\n"
6
- "Last-Translator: Bartosz Arendt <info@dfactory.eu>\n"
7
- "Language-Team: dFactory <info@dfactory.eu>\n"
8
- "Language: pl_PL\n"
9
- "MIME-Version: 1.0\n"
10
- "Content-Type: text/plain; charset=UTF-8\n"
11
- "Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 1.6.5\n"
13
- "X-Poedit-KeywordsList: gettext;gettext_noop;__;_e;esc_attr__;esc_attr_e;"
14
- "esc_html__;esc_html_e\n"
15
- "X-Poedit-Basepath: .\n"
16
- "X-Poedit-SourceCharset: UTF-8\n"
17
- "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
- "X-Poedit-SearchPath-0: ..\n"
19
-
20
- #: ../includes/columns.php:113 ../includes/columns.php:121
21
- msgid "Post Views"
22
- msgstr "Odwiedziny"
23
-
24
- #: ../includes/cron.php:40
25
- msgid "Post Views Counter reset daily counts interval"
26
- msgstr ""
27
-
28
- #: ../includes/functions.php:114
29
- msgid "No Posts"
30
- msgstr "Brak wpisów"
31
-
32
- #: ../includes/settings.php:41
33
- msgid "Enable"
34
- msgstr "Włącz"
35
-
36
- #: ../includes/settings.php:42
37
- msgid "Disable"
38
- msgstr "Wyłącz"
39
-
40
- #: ../includes/settings.php:46
41
- msgid "PHP"
42
- msgstr "PHP"
43
-
44
- #: ../includes/settings.php:47
45
- msgid "JavaScript"
46
- msgstr "JavaScript"
47
-
48
- #: ../includes/settings.php:51
49
- msgid "minutes"
50
- msgstr "minuty"
51
-
52
- #: ../includes/settings.php:52
53
- msgid "hours"
54
- msgstr "godziny"
55
-
56
- #: ../includes/settings.php:53
57
- msgid "days"
58
- msgstr "dni"
59
-
60
- #: ../includes/settings.php:54
61
- msgid "weeks"
62
- msgstr "tygodnie"
63
-
64
- #: ../includes/settings.php:55
65
- msgid "months"
66
- msgstr "miesiące"
67
-
68
- #: ../includes/settings.php:56
69
- msgid "years"
70
- msgstr "lata"
71
-
72
- #: ../includes/settings.php:60
73
- msgid "robots"
74
- msgstr "roboty"
75
-
76
- #: ../includes/settings.php:61
77
- msgid "logged in users"
78
- msgstr "zalogowani użytkownicy"
79
-
80
- #: ../includes/settings.php:62
81
- msgid "guests"
82
- msgstr "goście"
83
-
84
- #: ../includes/settings.php:63
85
- msgid "selected user roles"
86
- msgstr "wybrane role użytkowników"
87
-
88
- #: ../includes/settings.php:67
89
- msgid "before the content"
90
- msgstr "przed treścią"
91
-
92
- #: ../includes/settings.php:68
93
- msgid "after the content"
94
- msgstr "po treści"
95
-
96
- #: ../includes/settings.php:69
97
- msgid "manual"
98
- msgstr "ręcznie"
99
-
100
- #: ../includes/settings.php:73
101
- msgid "icon"
102
- msgstr "ikona"
103
-
104
- #: ../includes/settings.php:74
105
- msgid "label"
106
- msgstr "etykieta"
107
-
108
- #: ../includes/settings.php:79
109
- msgid "General"
110
- msgstr "Ogólne"
111
-
112
- #: ../includes/settings.php:85
113
- msgid "Display"
114
- msgstr "Wyświetlanie"
115
-
116
- #: ../includes/settings.php:149 ../includes/settings.php:150
117
- #: ../includes/settings.php:167 ../includes/settings.php:180
118
- msgid "Post Views Counter"
119
- msgstr "Licznik odwiedzin"
120
-
121
- #: ../includes/settings.php:182
122
- msgid "Need support?"
123
- msgstr "Potrzebujesz pomocy?"
124
-
125
- #: ../includes/settings.php:183
126
- msgid ""
127
- "If you are having problems with this plugin, please talk about them in the"
128
- msgstr "Jeśli masz jakieś problemy z tą wtyczką, powiedz o nich"
129
-
130
- #: ../includes/settings.php:183
131
- msgid "Support forum"
132
- msgstr "Forum pomocy"
133
-
134
- #: ../includes/settings.php:185
135
- msgid "Do you like this plugin?"
136
- msgstr "Lubisz tę wtyczkę?"
137
-
138
- #: ../includes/settings.php:186
139
- msgid "Rate it 5"
140
- msgstr "Oceń ją na 5"
141
-
142
- #: ../includes/settings.php:186
143
- msgid "on WordPress.org"
144
- msgstr "na WordPress.org"
145
-
146
- #: ../includes/settings.php:187
147
- msgid "Blog about it & link to the"
148
- msgstr "Napisz o niej i dodaj link"
149
-
150
- #: ../includes/settings.php:187
151
- msgid "plugin page"
152
- msgstr "do strony wtyczki"
153
-
154
- #: ../includes/settings.php:188
155
- msgid "Check out our other"
156
- msgstr "Sprawdż nasze inne"
157
-
158
- #: ../includes/settings.php:188
159
- msgid "WordPress plugins"
160
- msgstr "wtyczki do WordPressa"
161
-
162
- #: ../includes/settings.php:191
163
- msgid "Created by"
164
- msgstr "Stworzone przez"
165
-
166
- #: ../includes/settings.php:207
167
- msgid "Reset to defaults"
168
- msgstr "Resetuj do domyślnych"
169
-
170
- #: ../includes/settings.php:225
171
- msgid "General settings"
172
- msgstr "Ustawienia ogólne"
173
-
174
- #: ../includes/settings.php:226
175
- msgid "Post Types Count"
176
- msgstr "Własne typy wpisów"
177
-
178
- #: ../includes/settings.php:227
179
- msgid "Counter Mode"
180
- msgstr "Tryb pracy licznika"
181
-
182
- #: ../includes/settings.php:228
183
- msgid "Post Views Column"
184
- msgstr "Kolumna z liczbą odwiedzin"
185
-
186
- #: ../includes/settings.php:229
187
- msgid "Time Between Counts"
188
- msgstr "Czas między zliczaniem"
189
-
190
- #: ../includes/settings.php:230
191
- msgid "Reset Data"
192
- msgstr "Resetowanie danych"
193
-
194
- #: ../includes/settings.php:231
195
- msgid "Exclude Visitors"
196
- msgstr "Wykluczanie odwiedzających"
197
-
198
- #: ../includes/settings.php:232
199
- msgid "Exclude IPs"
200
- msgstr "Wykluczanie IP"
201
-
202
- #: ../includes/settings.php:233
203
- msgid "WP-PostViews"
204
- msgstr "WP-PostViews"
205
-
206
- #: ../includes/settings.php:234
207
- msgid "Deactivation"
208
- msgstr "Deaktywacja wtyczki"
209
-
210
- #: ../includes/settings.php:238
211
- msgid "Display settings"
212
- msgstr "Ustawienia wyświetlania"
213
-
214
- #: ../includes/settings.php:239
215
- msgid "Post Views Label"
216
- msgstr "Etykieta licznika"
217
-
218
- #: ../includes/settings.php:240
219
- msgid "Post Types Display"
220
- msgstr "Wyświetlanie licznika"
221
-
222
- #: ../includes/settings.php:241
223
- msgid "Restrict Display"
224
- msgstr "Ograniczenia wyświetlania"
225
-
226
- #: ../includes/settings.php:242
227
- msgid "Position"
228
- msgstr "Pozycja"
229
-
230
- #: ../includes/settings.php:243
231
- msgid "Display Style"
232
- msgstr "Styl wyświetlania"
233
-
234
- #: ../includes/settings.php:244
235
- msgid "Icon Class"
236
- msgstr "Klasa ikony"
237
-
238
- #: ../includes/settings.php:258
239
- msgid "Enter the label for the post views counter field."
240
- msgstr "Wpisz etykietę jaka będzie wyświetlana w liczniku odwiedzin wpisu."
241
-
242
- #: ../includes/settings.php:272
243
- msgid "Select post types"
244
- msgstr "Wybierz typy wpisów"
245
-
246
- #: ../includes/settings.php:283
247
- msgid "Select post types for which post views will be counted."
248
- msgstr "Wybierz typy wpisów dla których będzie włączone zliczanie."
249
-
250
- #: ../includes/settings.php:297 ../includes/settings.php:423
251
- #: ../includes/settings.php:599
252
- msgid "Select groups"
253
- msgstr "Wybierz grupy"
254
-
255
- #: ../includes/settings.php:308
256
- msgid "Select post types for which post views will be displayed."
257
- msgstr "Wybierz typy wpisów dla których licznik będzie wyświetlony."
258
-
259
- #: ../includes/settings.php:332
260
- msgid ""
261
- "Select the method of collecting post views data. If you are using any of the "
262
- "caching plugins select Javascript."
263
- msgstr ""
264
- "Wybierz metodę gromadzenia danych. Jeśli używaż jakiejkolwiek wtyczki do "
265
- "cachowania wybierz Javascript."
266
-
267
- #: ../includes/settings.php:357
268
- msgid ""
269
- "Enable to display post views count column for each of the selected post "
270
- "types."
271
- msgstr "Włącz aby wyświetlić kolumnę z liczbą odsłon."
272
-
273
- #: ../includes/settings.php:383
274
- msgid "Enter the time between single user visit count."
275
- msgstr "Określ czas pomiędzy zliczaniem wizyt poszczególnego użytkownika."
276
-
277
- #: ../includes/settings.php:409
278
- msgid ""
279
- "Delete single day post views data older than specified above. Enter 0 "
280
- "(number zero) if you want to preserve your data regardless of its age."
281
- msgstr ""
282
- "Usuwanie dziennych danych o liczbie wpisów po określonym powyżej czasie. "
283
- "Wpisz 0 jeśli chcesz przetrzymywać te dane bez ograniczeń."
284
-
285
- #: ../includes/settings.php:435 ../includes/settings.php:614
286
- msgid "Select user roles"
287
- msgstr "Wybierz role użytkowników"
288
-
289
- #: ../includes/settings.php:447
290
- msgid "Select the type of visitors to be excluded from post views count."
291
- msgstr "Wybierz typy użytkowników wyłączonych z działania licznika."
292
-
293
- #: ../includes/settings.php:466 ../includes/settings.php:475
294
- msgid "Remove"
295
- msgstr "Usuń"
296
-
297
- #: ../includes/settings.php:475
298
- msgid "Add new"
299
- msgstr "Dodaj nowy"
300
-
301
- #: ../includes/settings.php:475
302
- msgid "Add my current IP"
303
- msgstr "Dodaj mój aktualny IP"
304
-
305
- #: ../includes/settings.php:477
306
- msgid "Enter the IP addresses to be excluded from post views count."
307
- msgstr "Wpisz adresy IP, któe mają być wyłączone z działania licznika."
308
-
309
- #: ../includes/settings.php:491
310
- msgid "Import"
311
- msgstr "Importuj"
312
-
313
- #: ../includes/settings.php:493
314
- msgid "Import post views data from WP-PostViews plugin."
315
- msgstr ""
316
-
317
- #: ../includes/settings.php:494
318
- #, fuzzy
319
- msgid "Override existing Post Views Counter data."
320
- msgstr "Licznik odwiedzin"
321
-
322
- #: ../includes/settings.php:519
323
- msgid "Enable to delete all plugin data on deactivation."
324
- msgstr "Włącz aby usunąć wszystkie dane wtyczki podczas deaktywacji"
325
-
326
- #: ../includes/settings.php:544
327
- msgid ""
328
- "Select where would you like to display the post views counter. Use [post-"
329
- "views] shortcode for manual display."
330
- msgstr ""
331
- "Wybierz w którym miejscu chcesz wyświetlać licznik odwiedzin. Użyj skrótu "
332
- "[post-views] aby wyświetlić licznik ręcznie."
333
-
334
- #: ../includes/settings.php:569
335
- msgid "Choose how to display the post views counter."
336
- msgstr "Wybierz w jaki sposób chcesz wyświetlać licznik."
337
-
338
- #: ../includes/settings.php:585
339
- #, php-format
340
- msgid ""
341
- "Enter the post views icon class. Any of the <a href=\"%s\" target=\"_blank"
342
- "\">Dashicons</a> classes are available."
343
- msgstr ""
344
-
345
- #: ../includes/settings.php:626
346
- msgid "Use it to hide the post views counter from selected type of visitors."
347
- msgstr ""
348
- "Użyj tego aby ograniczyć wyświetlanie licznika do określonych typów "
349
- "użytkowników."
350
-
351
- #: ../includes/settings.php:661
352
- msgid "WP-PostViews data imported succesfully."
353
- msgstr ""
354
-
355
- #: ../includes/settings.php:665
356
- msgid "There was no data to import."
357
- msgstr ""
358
-
359
- #: ../includes/settings.php:827
360
- msgid "General settings restored to defaults."
361
- msgstr "Ustawienia zostały przywrócone do domyślnych."
362
-
363
- #: ../includes/settings.php:833
364
- msgid "Display settings restored to defaults."
365
- msgstr "Ustawienia wyświetlania została przywrócone do domyślnych."
366
-
367
- #: ../includes/settings.php:854
368
- msgid "Support"
369
- msgstr "Forum pomocy"
370
-
371
- #: ../includes/widgets.php:38 ../includes/widgets.php:49
372
- msgid "Most Viewed Posts"
373
- msgstr "Najczęściej oglądane wpisy"
374
-
375
- #: ../includes/widgets.php:40
376
- msgid "Displays a list of the most viewed posts"
377
- msgstr "Wyświetla listę najczęściej oglądanych wpisów"
378
-
379
- #: ../includes/widgets.php:57
380
- msgid "No Posts found"
381
- msgstr "Brak wpisów"
382
-
383
- #: ../includes/widgets.php:61
384
- msgid "Ascending"
385
- msgstr "Rosnąco"
386
-
387
- #: ../includes/widgets.php:62
388
- msgid "Descending"
389
- msgstr "Malejąco"
390
-
391
- #: ../includes/widgets.php:105
392
- msgid "Title"
393
- msgstr "Tytuł"
394
-
395
- #: ../includes/widgets.php:109
396
- msgid "Post types"
397
- msgstr "Typy wpisów"
398
-
399
- #: ../includes/widgets.php:123
400
- msgid "Number of posts to show"
401
- msgstr "Liczba wpisów do wyświetlenia"
402
-
403
- #: ../includes/widgets.php:127
404
- msgid "No posts message"
405
- msgstr "Treść braku wpisów"
406
-
407
- #: ../includes/widgets.php:131
408
- msgid "Order"
409
- msgstr "Kolejność"
410
-
411
- #: ../includes/widgets.php:144
412
- msgid "Display post views?"
413
- msgstr "Wyświetlanie liczby odsłon?"
414
-
415
- #: ../includes/widgets.php:146
416
- msgid "Display post excerpt?"
417
- msgstr "Wyświetlanie wypisu?"
418
-
419
- #: ../includes/widgets.php:148
420
- msgid "Display post thumbnail?"
421
- msgstr "WYświetlanie miniatury?"
422
-
423
- #: ../includes/widgets.php:151
424
- msgid "Thumbnail size"
425
- msgstr "WIelkość miniatury"
426
-
427
- #: ../post-views-counter.php:251
428
- msgid "Are you sure you want to reset these settings to defaults?"
429
- msgstr "Czy jesteś pewny, że chcesz zresetować ustawienia do domyślnych?"
430
-
431
- #: ../post-views-counter.php:285
432
- msgid "Settings"
433
- msgstr "Ustawienia"
434
-
435
- #~ msgid "text"
436
- #~ msgstr "tekst"
437
-
438
- #~ msgid "Enable if you would like the post views counter link to the post."
439
- #~ msgstr "Włącz jeśli chcesz aby liczba odwiedzin była linkiem do wpisu."
440
-
441
- #~ msgid "Top"
442
- #~ msgstr "Na górze"
443
-
444
- #~ msgid "Bottom"
445
- #~ msgstr "Na dole"
446
-
447
- #~ msgid "None"
448
- #~ msgstr "Brak"
449
-
450
- #~ msgid "WordPress"
451
- #~ msgstr "WordPress"
452
-
453
- #~ msgid "Bootstrap"
454
- #~ msgstr "Bootstrap"
455
-
456
- #~ msgid "Custom link"
457
- #~ msgstr "Własny link"
458
-
459
- #~ msgid "Page link"
460
- #~ msgstr "Link do strony"
461
-
462
- #~ msgid "Text color"
463
- #~ msgstr "Kolor tekstu"
464
-
465
- #~ msgid "Bar color"
466
- #~ msgstr "Kolor tła"
467
-
468
- #~ msgid "1 day"
469
- #~ msgstr "1 dzień"
470
-
471
- #~ msgid "1 month"
472
- #~ msgstr "1 miesiąc"
473
-
474
- #~ msgid "6 months"
475
- #~ msgstr "6 miesięcy"
476
-
477
- #~ msgid "infinity"
478
- #~ msgstr "W nieskończoność"
479
-
480
- #~ msgid "Fade"
481
- #~ msgstr "Zanikanie"
482
-
483
- #~ msgid "Slide"
484
- #~ msgstr "Przesuwanie"
485
-
486
- #~ msgid "Cookie Notice"
487
- #~ msgstr "Ciasteczka"
488
-
489
- #~ msgid "Configuration"
490
- #~ msgstr "Konfiguracja"
491
-
492
- #~ msgid "Message"
493
- #~ msgstr "Wiadomość"
494
-
495
- #~ msgid "Button text"
496
- #~ msgstr "Tekst przycisku"
497
-
498
- #~ msgid "More info"
499
- #~ msgstr "Więcej informacji"
500
-
501
- #~ msgid "Cookie expiry"
502
- #~ msgstr "Wygasanie cookie"
503
-
504
- #~ msgid "Design"
505
- #~ msgstr "Wygląd"
506
-
507
- #~ msgid "Hide animation"
508
- #~ msgstr "Ukrywanie animacji"
509
-
510
- #~ msgid "Button style"
511
- #~ msgstr "Styl przycisku"
512
-
513
- #~ msgid "Colors"
514
- #~ msgstr "Kolorystyka"
515
-
516
- #~ msgid "Enter the cookie notice message."
517
- #~ msgstr "Wpisz treść informacji o ciasteczkach."
518
-
519
- #~ msgid "The text to show on the button when cookies have not been accepted"
520
- #~ msgstr ""
521
- #~ "Tekst przycisku, który będzie wyświetlany gdy ciasteczka nie zostały "
522
- #~ "jeszcze zaakceptowane."
523
-
524
- #~ msgid "Enable or Disable Read more button."
525
- #~ msgstr "Włącz lub wyłącz przycisk z linkiem do dodatkowych informacji."
526
-
527
- #~ msgid "Select where to redirect user for more information about cookies."
528
- #~ msgstr ""
529
- #~ "Wybierz dokąd przekierować użytkownika aby uzyskał więcej informacji o "
530
- #~ "ciasteczkach."
531
-
532
- #~ msgid "-- select page --"
533
- #~ msgstr "-- wybierz stronę --"
534
-
535
- #~ msgid "Select from one of your site's pages"
536
- #~ msgstr "Wybierz jedną z istniejących stron."
537
-
538
- #~ msgid "Enter the full URL starting with http://"
539
- #~ msgstr "Podaj pełny adres URL zaczynający się od http://"
540
-
541
- #~ msgid "The ammount of time that cookie should be stored for."
542
- #~ msgstr "Okres czasu przez jaki będzie przechowywane ciasteczko."
543
-
544
- #~ msgid "Select location for your cookie notice."
545
- #~ msgstr "Wybierz pozycję wiadomości o ciasteczkach."
546
-
547
- #~ msgid "Cookie notice acceptance animation."
548
- #~ msgstr "Animacja po akceptacji ciasteczek."
549
-
550
- #~ msgid "Choose buttons style."
551
- #~ msgstr "Wybierz styl dla przycisków."
552
-
553
- #~ msgid ""
554
- #~ "We use cookies to ensure that we give you the best experience on our "
555
- #~ "website. If you continue to use this site we will assume that you are "
556
- #~ "happy with it."
557
- #~ msgstr ""
558
- #~ "Ta strona korzysta z ciasteczek aby świadczyć usługi na najwyższym "
559
- #~ "poziomie. Dalsze korzystanie ze strony oznacza, że zgadzasz się na ich "
560
- #~ "użycie."
561
-
562
- #~ msgid "Ok"
563
- #~ msgstr "Zamknij"
564
-
565
- #~ msgid "Read more"
566
- #~ msgstr "Dowiedz się więcej"
567
-
568
- #~ msgid "Widgets"
569
- #~ msgstr "Widgety"
570
-
571
- #~ msgid "Pages"
572
- #~ msgstr "Strony"
573
-
574
- #~ msgid "Custom Post Type Archives"
575
- #~ msgstr "Archiwa własnych typów wpisów"
576
-
577
- #~ msgid "Categories"
578
- #~ msgstr "Kategorie"
579
-
580
- #~ msgid "Taxonomies"
581
- #~ msgstr "Taksonomie"
582
-
583
- #~ msgid "Others"
584
- #~ msgstr "Inne"
585
-
586
- #~ msgid "Users"
587
- #~ msgstr "Użytkownicy"
588
-
589
- #~ msgid "Languages"
590
- #~ msgstr "Języki"
591
-
592
- #~ msgid "Front Page"
593
- #~ msgstr "Strona główna"
594
-
595
- #~ msgid "Blog Page"
596
- #~ msgstr "Strona z wpisami"
597
-
598
- #~ msgid "Single Posts"
599
- #~ msgstr "Pojedyncze wpisy"
600
-
601
- #~ msgid "Sticky Posts"
602
- #~ msgstr "Wpisy przyklejone"
603
-
604
- #~ msgid "Author Archive"
605
- #~ msgstr "Archiwum autora"
606
-
607
- #~ msgid "Date Archive"
608
- #~ msgstr "Archiwum daty"
609
-
610
- #~ msgid "404 Page"
611
- #~ msgstr "Strona błędów 404"
612
-
613
- #~ msgid "Search Page"
614
- #~ msgstr "Strona wyszukiwania"
615
-
616
- #~ msgid "Logged out users"
617
- #~ msgstr "Wylogowani użytkownicy"
618
-
619
- #~ msgid ""
620
- #~ "Use this settings to manage access to widgets page and to restrict "
621
- #~ "availability of certain widgets, sidebars and widgets options to site "
622
- #~ "administrators only."
623
- #~ msgstr ""
624
- #~ "Użyj tych ustawień aby określić kto może mieć dostęp do widgetów, jakie "
625
- #~ "widgety, panele boczne i ustawienia widgetów są dostępne dla użytkowników "
626
- #~ "a jakie tylko dla administratorów."
627
-
628
- #~ msgid "Restrict Users"
629
- #~ msgstr "Ograniczenia użytkowników"
630
-
631
- #~ msgid "Select user roles restricted to manage widgets."
632
- #~ msgstr "Wybierz role użytkowników, którzy mogą zarządzać widgetami."
633
-
634
- #~ msgid "Restrict Sidebars"
635
- #~ msgstr "Ograniczenia paneli bocznych"
636
-
637
- #~ msgid "Select which sidebars will be restricted to admins only."
638
- #~ msgstr ""
639
- #~ "Wybierz panele boczne, które będą dostępne tylko dla administratorów."
640
-
641
- #~ msgid "Restrict Widgets"
642
- #~ msgstr "Ograniczenia widgetów"
643
-
644
- #~ msgid "Select which widgets will be restricted to admins only."
645
- #~ msgstr "Wybierz widgety, któe będą dostępne tylko dla administratorów."
646
-
647
- #~ msgid "Restrict Widget Options"
648
- #~ msgstr "Ograniczenia opcji widgetów"
649
-
650
- #~ msgid "Select which widget options will be restricted to admins only."
651
- #~ msgstr ""
652
- #~ "Wybierz które opcje widgetów, będą dostępne tylko dla administratorów."
653
-
654
- #~ msgid "Restrict Option Groups"
655
- #~ msgstr "Ograniczenia grup opcji"
656
-
657
- #~ msgid "Single %s"
658
- #~ msgstr "Pojedyncze %s"
659
-
660
- #~ msgid "%s Archive"
661
- #~ msgstr "Archiwum %s"
662
-
663
- #~ msgid "Display / Hide Widget"
664
- #~ msgstr "Wyświetl / Ukryj widget"
665
-
666
- #~ msgid "Display widget on selected"
667
- #~ msgstr "Wyświetl widget na wybranych stronach"
668
-
669
- #~ msgid "Hide widget on selected"
670
- #~ msgstr "Ukryj widget na wybranych stronach"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
post-views-counter.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: Post Views Counter
4
  Description: Forget WP-PostViews. Display how many times a post, page or custom post type had been viewed in a simple, fast and reliable way.
5
- Version: 1.2.2
6
  Author: dFactory
7
  Author URI: http://www.dfactory.eu/
8
  Plugin URI: http://www.dfactory.eu/plugins/post-views-counter/
@@ -31,7 +31,7 @@ if ( ! class_exists( 'Post_Views_Counter' ) ) :
31
  * Post Views Counter final class.
32
  *
33
  * @class Post_Views_Counter
34
- * @version 1.2.2
35
  */
36
  final class Post_Views_Counter {
37
 
@@ -80,7 +80,7 @@ final class Post_Views_Counter {
80
  'link_to_post' => true,
81
  'icon_class' => 'dashicons-chart-bar'
82
  ),
83
- 'version' => '1.2.2'
84
  );
85
 
86
  /**
@@ -211,6 +211,11 @@ final class Post_Views_Counter {
211
  if ( $this->options['general']['deactivation_delete'] ) {
212
  delete_option( 'post_views_counter_settings_general' );
213
  delete_option( 'post_views_counter_settings_display' );
 
 
 
 
 
214
  }
215
 
216
  // remove schedule
2
  /*
3
  Plugin Name: Post Views Counter
4
  Description: Forget WP-PostViews. Display how many times a post, page or custom post type had been viewed in a simple, fast and reliable way.
5
+ Version: 1.2.3
6
  Author: dFactory
7
  Author URI: http://www.dfactory.eu/
8
  Plugin URI: http://www.dfactory.eu/plugins/post-views-counter/
31
  * Post Views Counter final class.
32
  *
33
  * @class Post_Views_Counter
34
+ * @version 1.2.3
35
  */
36
  final class Post_Views_Counter {
37
 
80
  'link_to_post' => true,
81
  'icon_class' => 'dashicons-chart-bar'
82
  ),
83
+ 'version' => '1.2.3'
84
  );
85
 
86
  /**
211
  if ( $this->options['general']['deactivation_delete'] ) {
212
  delete_option( 'post_views_counter_settings_general' );
213
  delete_option( 'post_views_counter_settings_display' );
214
+
215
+ global $wpdb;
216
+
217
+ // delete table from database
218
+ $wpdb->query( 'DROP TABLE IF EXISTS ' . $wpdb->prefix . 'post_views' );
219
  }
220
 
221
  // remove schedule
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: dfactory
3
  Donate link: http://www.dfactory.eu/
4
  Tags: counter, hits, postviews, post views, views, count
5
  Requires at least: 4.0.0
6
- Tested up to: 4.5.2
7
- Stable tag: 1.2.2
8
  License: MIT License
9
  License URI: http://opensource.org/licenses/MIT
10
 
@@ -58,6 +58,10 @@ No questions yet.
58
 
59
  == Changelog ==
60
 
 
 
 
 
61
  = 1.2.2 =
62
  * Fix: Notice undefined variable: post_ids, thanks to [zytzagoo](https://github.com/zytzagoo)
63
  * Tweak: Switched translation files storage, from local to WP repository
@@ -132,6 +136,6 @@ Initial release
132
 
133
  == Upgrade Notice ==
134
 
135
- = 1.2.2 =
136
- * Fix: Notice undefined variable: post_ids
137
- * Tweak: Switched translation files storage, from local to WP repository
3
  Donate link: http://www.dfactory.eu/
4
  Tags: counter, hits, postviews, post views, views, count
5
  Requires at least: 4.0.0
6
+ Tested up to: 4.6
7
+ Stable tag: 1.2.3
8
  License: MIT License
9
  License URI: http://opensource.org/licenses/MIT
10
 
58
 
59
  == Changelog ==
60
 
61
+ = 1.2.3 =
62
+ * New: IP wildcard support
63
+ * Tweak: Delete post_views database table on deactivation
64
+
65
  = 1.2.2 =
66
  * Fix: Notice undefined variable: post_ids, thanks to [zytzagoo](https://github.com/zytzagoo)
67
  * Tweak: Switched translation files storage, from local to WP repository
136
 
137
  == Upgrade Notice ==
138
 
139
+ = 1.2.3 =
140
+ * New: IP wildcard support
141
+ * Tweak: Delete post_views database table on deactivation