Post Views Counter - Version 1.2.11

Version Description

  • Tweak: Additional IP expiration checks added as an option
Download this release

Release Info

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

Code changes from version 1.2.10 to 1.2.11

includes/counter.php CHANGED
@@ -109,30 +109,33 @@ class Post_Views_Counter_Counter {
109
 
110
  // count visit
111
  if ( $count_visit ) {
112
- // get IP cached visits
113
- $ip_cache = get_transient( 'post_views_counter_ip_cache' );
114
-
115
- if ( ! $ip_cache )
116
- $ip_cache = array();
117
-
118
- // visit exists in transient?
119
- if ( isset( $ip_cache[$id][$user_ip] ) ) {
120
- if ( $current_time > $ip_cache[$id][$user_ip] + $this->get_timestamp( Post_Views_Counter()->options['general']['time_between_counts']['type'], Post_Views_Counter()->options['general']['time_between_counts']['number'], false ) )
 
 
 
 
 
 
121
  $ip_cache[$id][$user_ip] = $current_time;
122
- else
123
- return;
124
- } else
125
- $ip_cache[$id][$user_ip] = $current_time;
126
-
127
- // keep it light, only 10 records per post and maximum 100 post records (=> max. 1000 ip entries)
128
- // also, the data gets deleted after a week if there's no activity during this time...
129
- if ( count( $ip_cache[$id] ) > 10 )
130
- $ip_cache[$id] = array_slice( $ip_cache[$id], -10, 10, true );
131
 
132
- if ( count( $ip_cache ) > 100 )
133
- $ip_cache = array_slice( $ip_cache, -100, 100, true );
134
 
135
- set_transient( 'post_views_counter_ip_cache', $ip_cache, WEEK_IN_SECONDS );
 
136
 
137
  return $this->count_visit( $id );
138
  } else
109
 
110
  // count visit
111
  if ( $count_visit ) {
112
+ // strict counts?
113
+ if ( Post_Views_Counter()->options['general']['strict_counts'] ) {
114
+ // get IP cached visits
115
+ $ip_cache = get_transient( 'post_views_counter_ip_cache' );
116
+
117
+ if ( ! $ip_cache )
118
+ $ip_cache = array();
119
+
120
+ // visit exists in transient?
121
+ if ( isset( $ip_cache[$id][$user_ip] ) ) {
122
+ if ( $current_time > $ip_cache[$id][$user_ip] + $this->get_timestamp( Post_Views_Counter()->options['general']['time_between_counts']['type'], Post_Views_Counter()->options['general']['time_between_counts']['number'], false ) )
123
+ $ip_cache[$id][$user_ip] = $current_time;
124
+ else
125
+ return;
126
+ } else
127
  $ip_cache[$id][$user_ip] = $current_time;
128
+
129
+ // keep it light, only 10 records per post and maximum 100 post records (=> max. 1000 ip entries)
130
+ // also, the data gets deleted after a week if there's no activity during this time...
131
+ if ( count( $ip_cache[$id] ) > 10 )
132
+ $ip_cache[$id] = array_slice( $ip_cache[$id], -10, 10, true );
 
 
 
 
133
 
134
+ if ( count( $ip_cache ) > 100 )
135
+ $ip_cache = array_slice( $ip_cache, -100, 100, true );
136
 
137
+ set_transient( 'post_views_counter_ip_cache', $ip_cache, WEEK_IN_SECONDS );
138
+ }
139
 
140
  return $this->count_visit( $id );
141
  } else
includes/settings.php CHANGED
@@ -228,6 +228,7 @@ class Post_Views_Counter_Settings {
228
  add_settings_field( 'pvc_flush_interval', __( 'Flush Object Cache Interval', 'post-views-counter' ), array( $this, 'flush_interval' ), 'post_views_counter_settings_general', 'post_views_counter_settings_general' );
229
  add_settings_field( 'pvc_exclude', __( 'Exclude Visitors', 'post-views-counter' ), array( $this, 'exclude' ), 'post_views_counter_settings_general', 'post_views_counter_settings_general' );
230
  add_settings_field( 'pvc_exclude_ips', __( 'Exclude IPs', 'post-views-counter' ), array( $this, 'exclude_ips' ), 'post_views_counter_settings_general', 'post_views_counter_settings_general' );
 
231
  add_settings_field( 'pvc_wp_postviews', __( 'Tools', 'post-views-counter' ), array( $this, 'wp_postviews' ), 'post_views_counter_settings_general', 'post_views_counter_settings_general' );
232
  add_settings_field( 'pvc_deactivation_delete', __( 'Deactivation', 'post-views-counter' ), array( $this, 'deactivation_delete' ), 'post_views_counter_settings_general', 'post_views_counter_settings_general' );
233
 
@@ -437,6 +438,16 @@ class Post_Views_Counter_Settings {
437
  </div>';
438
  }
439
 
 
 
 
 
 
 
 
 
 
 
440
  /**
441
  * WP-PostViews import option.
442
  */
@@ -698,6 +709,9 @@ class Post_Views_Counter_Settings {
698
  // restrict edit viewa
699
  $input['restrict_edit_views'] = isset( $input['restrict_edit_views'] ) ? $input['restrict_edit_views'] : Post_Views_Counter()->defaults['general']['restrict_edit_views'];
700
 
 
 
 
701
  // deactivation delete
702
  $input['deactivation_delete'] = isset( $input['deactivation_delete'] );
703
  } elseif ( isset( $_POST['save_pvc_display'] ) ) {
@@ -786,5 +800,4 @@ class Post_Views_Counter_Settings {
786
 
787
  return $input;
788
  }
789
-
790
- }
228
  add_settings_field( 'pvc_flush_interval', __( 'Flush Object Cache Interval', 'post-views-counter' ), array( $this, 'flush_interval' ), 'post_views_counter_settings_general', 'post_views_counter_settings_general' );
229
  add_settings_field( 'pvc_exclude', __( 'Exclude Visitors', 'post-views-counter' ), array( $this, 'exclude' ), 'post_views_counter_settings_general', 'post_views_counter_settings_general' );
230
  add_settings_field( 'pvc_exclude_ips', __( 'Exclude IPs', 'post-views-counter' ), array( $this, 'exclude_ips' ), 'post_views_counter_settings_general', 'post_views_counter_settings_general' );
231
+ add_settings_field( 'pvc_strict_counts', __( 'Strict counts', 'post-views-counter' ), array( $this, 'strict_counts' ), 'post_views_counter_settings_general', 'post_views_counter_settings_general' );
232
  add_settings_field( 'pvc_wp_postviews', __( 'Tools', 'post-views-counter' ), array( $this, 'wp_postviews' ), 'post_views_counter_settings_general', 'post_views_counter_settings_general' );
233
  add_settings_field( 'pvc_deactivation_delete', __( 'Deactivation', 'post-views-counter' ), array( $this, 'deactivation_delete' ), 'post_views_counter_settings_general', 'post_views_counter_settings_general' );
234
 
438
  </div>';
439
  }
440
 
441
+ /**
442
+ * Strict counts option.
443
+ */
444
+ public function strict_counts() {
445
+ echo '
446
+ <div id="pvc_strict_counts">
447
+ <label class="cb-checkbox"><input id="pvc-strict-counts" type="checkbox" name="post_views_counter_settings_general[strict_counts]" value="1" ' . checked( true, Post_Views_Counter()->options['general']['strict_counts'], false ) . ' />' . __( 'Enable to prevent bypassing the counts interval (for e.g. using incognito browser window or by clearing cookies).', 'post-views-counter' ) . '</label>
448
+ </div>';
449
+ }
450
+
451
  /**
452
  * WP-PostViews import option.
453
  */
709
  // restrict edit viewa
710
  $input['restrict_edit_views'] = isset( $input['restrict_edit_views'] ) ? $input['restrict_edit_views'] : Post_Views_Counter()->defaults['general']['restrict_edit_views'];
711
 
712
+ // strict counts
713
+ $input['strict_counts'] = isset( $input['strict_counts'] );
714
+
715
  // deactivation delete
716
  $input['deactivation_delete'] = isset( $input['deactivation_delete'] );
717
  } elseif ( isset( $_POST['save_pvc_display'] ) ) {
800
 
801
  return $input;
802
  }
803
+ }
 
languages/post-views-counter.pot CHANGED
@@ -2,7 +2,7 @@
2
  msgid ""
3
  msgstr ""
4
  "Project-Id-Version: Post Views Counter\n"
5
- "POT-Creation-Date: 2017-01-31 21:22+0100\n"
6
  "PO-Revision-Date: 2015-04-08 18:59+0100\n"
7
  "Last-Translator: Bartosz Arendt <info@dfactory.eu>\n"
8
  "Language-Team: dFactory <info@dfactory.eu>\n"
@@ -10,7 +10,7 @@ msgstr ""
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
13
- "X-Generator: Poedit 1.8.11\n"
14
  "X-Poedit-KeywordsList: gettext;gettext_noop;__;_e;esc_attr__;esc_attr_e;"
15
  "esc_html__;esc_html_e\n"
16
  "X-Poedit-Basepath: .\n"
@@ -22,7 +22,7 @@ msgstr ""
22
  #: ../includes/columns.php:191 ../includes/columns.php:243
23
  #: ../includes/dashboard.php:30 ../includes/dashboard.php:102
24
  #: ../includes/dashboard.php:112 ../includes/dashboard.php:121
25
- #: ../includes/dashboard.php:193
26
  msgid "Post Views"
27
  msgstr ""
28
 
@@ -42,15 +42,15 @@ msgstr ""
42
  msgid "Cancel"
43
  msgstr ""
44
 
45
- #: ../includes/counter.php:168 ../includes/counter.php:591
46
  msgid "REST API method is disabled."
47
  msgstr ""
48
 
49
- #: ../includes/counter.php:176
50
  msgid "Invalid post ID."
51
  msgstr ""
52
 
53
- #: ../includes/counter.php:182
54
  msgid "Post type excluded."
55
  msgstr ""
56
 
@@ -70,11 +70,11 @@ msgstr ""
70
  msgid "Year"
71
  msgstr ""
72
 
73
- #: ../includes/dashboard.php:135 ../includes/dashboard.php:207
74
  msgid "Total Views"
75
  msgstr ""
76
 
77
- #: ../includes/functions.php:323
78
  msgid "No Posts"
79
  msgstr ""
80
 
@@ -261,80 +261,84 @@ msgid "Exclude IPs"
261
  msgstr ""
262
 
263
  #: ../includes/settings.php:231
264
- msgid "Tools"
265
  msgstr ""
266
 
267
  #: ../includes/settings.php:232
 
 
 
 
268
  msgid "Deactivation"
269
  msgstr ""
270
 
271
- #: ../includes/settings.php:236
272
  msgid "Display settings"
273
  msgstr ""
274
 
275
- #: ../includes/settings.php:237
276
  msgid "Post Views Label"
277
  msgstr ""
278
 
279
- #: ../includes/settings.php:238
280
  msgid "Post Type"
281
  msgstr ""
282
 
283
- #: ../includes/settings.php:239
284
  msgid "Page Type"
285
  msgstr ""
286
 
287
- #: ../includes/settings.php:240
288
  msgid "User Type"
289
  msgstr ""
290
 
291
- #: ../includes/settings.php:241
292
  msgid "Position"
293
  msgstr ""
294
 
295
- #: ../includes/settings.php:242
296
  msgid "Display Style"
297
  msgstr ""
298
 
299
- #: ../includes/settings.php:243
300
  msgid "Icon Class"
301
  msgstr ""
302
 
303
- #: ../includes/settings.php:254
304
  msgid "Enter the label for the post views counter field."
305
  msgstr ""
306
 
307
- #: ../includes/settings.php:272
308
  msgid "Select post types for which post views will be counted."
309
  msgstr ""
310
 
311
- #: ../includes/settings.php:289
312
  msgid "Select post types for which the views count will be displayed."
313
  msgstr ""
314
 
315
- #: ../includes/settings.php:308
316
  msgid ""
317
  "Select the method of collecting post views data. If you are using any of the "
318
  "caching plugins select Javascript or REST API (if available)."
319
  msgstr ""
320
 
321
- #: ../includes/settings.php:318
322
  msgid ""
323
  "Enable to display post views count column for each of the selected post "
324
  "types."
325
  msgstr ""
326
 
327
- #: ../includes/settings.php:338
328
  msgid "Enter the time between single user visit count."
329
  msgstr ""
330
 
331
- #: ../includes/settings.php:358
332
  msgid ""
333
  "Delete single day post views data older than specified above. Enter 0 "
334
  "(number zero) if you want to preserve your data regardless of its age."
335
  msgstr ""
336
 
337
- #: ../includes/settings.php:378
338
  msgid ""
339
  "How often to flush cached view counts from the object cache into the "
340
  "database. This feature is used only if a persistent object cache is detected "
@@ -346,100 +350,106 @@ msgid ""
346
  "interval."
347
  msgstr ""
348
 
349
- #: ../includes/settings.php:396 ../includes/settings.php:559
350
  msgid "Use it to hide the post views counter from selected type of visitors."
351
  msgstr ""
352
 
353
- #: ../includes/settings.php:404 ../includes/settings.php:568
354
  msgid "Use it to hide the post views counter from selected user roles."
355
  msgstr ""
356
 
357
- #: ../includes/settings.php:424 ../includes/settings.php:430
358
  msgid "Remove"
359
  msgstr ""
360
 
361
- #: ../includes/settings.php:435
362
  msgid "Add new"
363
  msgstr ""
364
 
365
- #: ../includes/settings.php:435
366
  msgid "Add my current IP"
367
  msgstr ""
368
 
369
- #: ../includes/settings.php:436
370
  msgid "Enter the IP addresses to be excluded from post views count."
371
  msgstr ""
372
 
373
  #: ../includes/settings.php:447
 
 
 
 
 
 
374
  msgid "Import views"
375
  msgstr ""
376
 
377
- #: ../includes/settings.php:447
378
  msgid "Override existing views data."
379
  msgstr ""
380
 
381
- #: ../includes/settings.php:448
382
  msgid "Import post views data from WP-PostViews plugin."
383
  msgstr ""
384
 
385
- #: ../includes/settings.php:449
386
  msgid "Delete views"
387
  msgstr ""
388
 
389
- #: ../includes/settings.php:450
390
  msgid "Delete ALL the existing post views data."
391
  msgstr ""
392
 
393
- #: ../includes/settings.php:461
394
  msgid "Enable to restrict post views editing to admins only."
395
  msgstr ""
396
 
397
- #: ../includes/settings.php:471
398
  msgid "Enable to delete all plugin data on deactivation."
399
  msgstr ""
400
 
401
- #: ../includes/settings.php:488
402
  msgid "Select page types where the views count will be displayed."
403
  msgstr ""
404
 
405
- #: ../includes/settings.php:507
406
  msgid ""
407
  "Select where would you like to display the post views counter. Use [post-"
408
  "views] shortcode for manual display."
409
  msgstr ""
410
 
411
- #: ../includes/settings.php:526
412
  msgid "Choose how to display the post views counter."
413
  msgstr ""
414
 
415
- #: ../includes/settings.php:537
416
  #, php-format
417
  msgid ""
418
  "Enter the post views icon class. Any of the <a href=\"%s\" target=\"_blank"
419
  "\">Dashicons</a> classes are available."
420
  msgstr ""
421
 
422
- #: ../includes/settings.php:597
423
  msgid "Post views data imported succesfully."
424
  msgstr ""
425
 
426
- #: ../includes/settings.php:599
427
  msgid "There was no post views data to import."
428
  msgstr ""
429
 
430
- #: ../includes/settings.php:605
431
  msgid "All existing data deleted succesfully."
432
  msgstr ""
433
 
434
- #: ../includes/settings.php:607
435
  msgid "Error occurred. All existing data were not deleted."
436
  msgstr ""
437
 
438
- #: ../includes/settings.php:780
439
  msgid "General settings restored to defaults."
440
  msgstr ""
441
 
442
- #: ../includes/settings.php:784
443
  msgid "Display settings restored to defaults."
444
  msgstr ""
445
 
@@ -513,18 +523,18 @@ msgstr ""
513
  msgid "Thumbnail size"
514
  msgstr ""
515
 
516
- #: ../post-views-counter.php:299
517
  msgid "Are you sure you want to reset these settings to defaults?"
518
  msgstr ""
519
 
520
- #: ../post-views-counter.php:300
521
  msgid "Are you sure you want to delete all existing data?"
522
  msgstr ""
523
 
524
- #: ../post-views-counter.php:347
525
  msgid "Support"
526
  msgstr ""
527
 
528
- #: ../post-views-counter.php:371
529
  msgid "Settings"
530
  msgstr ""
2
  msgid ""
3
  msgstr ""
4
  "Project-Id-Version: Post Views Counter\n"
5
+ "POT-Creation-Date: 2018-02-05 16:25+0100\n"
6
  "PO-Revision-Date: 2015-04-08 18:59+0100\n"
7
  "Last-Translator: Bartosz Arendt <info@dfactory.eu>\n"
8
  "Language-Team: dFactory <info@dfactory.eu>\n"
10
  "MIME-Version: 1.0\n"
11
  "Content-Type: text/plain; charset=UTF-8\n"
12
  "Content-Transfer-Encoding: 8bit\n"
13
+ "X-Generator: Poedit 2.0.6\n"
14
  "X-Poedit-KeywordsList: gettext;gettext_noop;__;_e;esc_attr__;esc_attr_e;"
15
  "esc_html__;esc_html_e\n"
16
  "X-Poedit-Basepath: .\n"
22
  #: ../includes/columns.php:191 ../includes/columns.php:243
23
  #: ../includes/dashboard.php:30 ../includes/dashboard.php:102
24
  #: ../includes/dashboard.php:112 ../includes/dashboard.php:121
25
+ #: ../includes/dashboard.php:197
26
  msgid "Post Views"
27
  msgstr ""
28
 
42
  msgid "Cancel"
43
  msgstr ""
44
 
45
+ #: ../includes/counter.php:203 ../includes/counter.php:667
46
  msgid "REST API method is disabled."
47
  msgstr ""
48
 
49
+ #: ../includes/counter.php:211
50
  msgid "Invalid post ID."
51
  msgstr ""
52
 
53
+ #: ../includes/counter.php:217
54
  msgid "Post type excluded."
55
  msgstr ""
56
 
70
  msgid "Year"
71
  msgstr ""
72
 
73
+ #: ../includes/dashboard.php:135 ../includes/dashboard.php:211
74
  msgid "Total Views"
75
  msgstr ""
76
 
77
+ #: ../includes/functions.php:346
78
  msgid "No Posts"
79
  msgstr ""
80
 
261
  msgstr ""
262
 
263
  #: ../includes/settings.php:231
264
+ msgid "Strict counts"
265
  msgstr ""
266
 
267
  #: ../includes/settings.php:232
268
+ msgid "Tools"
269
+ msgstr ""
270
+
271
+ #: ../includes/settings.php:233
272
  msgid "Deactivation"
273
  msgstr ""
274
 
275
+ #: ../includes/settings.php:237
276
  msgid "Display settings"
277
  msgstr ""
278
 
279
+ #: ../includes/settings.php:238
280
  msgid "Post Views Label"
281
  msgstr ""
282
 
283
+ #: ../includes/settings.php:239
284
  msgid "Post Type"
285
  msgstr ""
286
 
287
+ #: ../includes/settings.php:240
288
  msgid "Page Type"
289
  msgstr ""
290
 
291
+ #: ../includes/settings.php:241
292
  msgid "User Type"
293
  msgstr ""
294
 
295
+ #: ../includes/settings.php:242
296
  msgid "Position"
297
  msgstr ""
298
 
299
+ #: ../includes/settings.php:243
300
  msgid "Display Style"
301
  msgstr ""
302
 
303
+ #: ../includes/settings.php:244
304
  msgid "Icon Class"
305
  msgstr ""
306
 
307
+ #: ../includes/settings.php:255
308
  msgid "Enter the label for the post views counter field."
309
  msgstr ""
310
 
311
+ #: ../includes/settings.php:273
312
  msgid "Select post types for which post views will be counted."
313
  msgstr ""
314
 
315
+ #: ../includes/settings.php:290
316
  msgid "Select post types for which the views count will be displayed."
317
  msgstr ""
318
 
319
+ #: ../includes/settings.php:309
320
  msgid ""
321
  "Select the method of collecting post views data. If you are using any of the "
322
  "caching plugins select Javascript or REST API (if available)."
323
  msgstr ""
324
 
325
+ #: ../includes/settings.php:319
326
  msgid ""
327
  "Enable to display post views count column for each of the selected post "
328
  "types."
329
  msgstr ""
330
 
331
+ #: ../includes/settings.php:339
332
  msgid "Enter the time between single user visit count."
333
  msgstr ""
334
 
335
+ #: ../includes/settings.php:359
336
  msgid ""
337
  "Delete single day post views data older than specified above. Enter 0 "
338
  "(number zero) if you want to preserve your data regardless of its age."
339
  msgstr ""
340
 
341
+ #: ../includes/settings.php:379
342
  msgid ""
343
  "How often to flush cached view counts from the object cache into the "
344
  "database. This feature is used only if a persistent object cache is detected "
350
  "interval."
351
  msgstr ""
352
 
353
+ #: ../includes/settings.php:397 ../includes/settings.php:570
354
  msgid "Use it to hide the post views counter from selected type of visitors."
355
  msgstr ""
356
 
357
+ #: ../includes/settings.php:405 ../includes/settings.php:579
358
  msgid "Use it to hide the post views counter from selected user roles."
359
  msgstr ""
360
 
361
+ #: ../includes/settings.php:425 ../includes/settings.php:431
362
  msgid "Remove"
363
  msgstr ""
364
 
365
+ #: ../includes/settings.php:436
366
  msgid "Add new"
367
  msgstr ""
368
 
369
+ #: ../includes/settings.php:436
370
  msgid "Add my current IP"
371
  msgstr ""
372
 
373
+ #: ../includes/settings.php:437
374
  msgid "Enter the IP addresses to be excluded from post views count."
375
  msgstr ""
376
 
377
  #: ../includes/settings.php:447
378
+ msgid ""
379
+ "Enable to prevent bypassing the counts interval (for e.g. using incognito "
380
+ "browser window or by clearing cookies)."
381
+ msgstr ""
382
+
383
+ #: ../includes/settings.php:458
384
  msgid "Import views"
385
  msgstr ""
386
 
387
+ #: ../includes/settings.php:458
388
  msgid "Override existing views data."
389
  msgstr ""
390
 
391
+ #: ../includes/settings.php:459
392
  msgid "Import post views data from WP-PostViews plugin."
393
  msgstr ""
394
 
395
+ #: ../includes/settings.php:460
396
  msgid "Delete views"
397
  msgstr ""
398
 
399
+ #: ../includes/settings.php:461
400
  msgid "Delete ALL the existing post views data."
401
  msgstr ""
402
 
403
+ #: ../includes/settings.php:472
404
  msgid "Enable to restrict post views editing to admins only."
405
  msgstr ""
406
 
407
+ #: ../includes/settings.php:482
408
  msgid "Enable to delete all plugin data on deactivation."
409
  msgstr ""
410
 
411
+ #: ../includes/settings.php:499
412
  msgid "Select page types where the views count will be displayed."
413
  msgstr ""
414
 
415
+ #: ../includes/settings.php:518
416
  msgid ""
417
  "Select where would you like to display the post views counter. Use [post-"
418
  "views] shortcode for manual display."
419
  msgstr ""
420
 
421
+ #: ../includes/settings.php:537
422
  msgid "Choose how to display the post views counter."
423
  msgstr ""
424
 
425
+ #: ../includes/settings.php:548
426
  #, php-format
427
  msgid ""
428
  "Enter the post views icon class. Any of the <a href=\"%s\" target=\"_blank"
429
  "\">Dashicons</a> classes are available."
430
  msgstr ""
431
 
432
+ #: ../includes/settings.php:608
433
  msgid "Post views data imported succesfully."
434
  msgstr ""
435
 
436
+ #: ../includes/settings.php:610
437
  msgid "There was no post views data to import."
438
  msgstr ""
439
 
440
+ #: ../includes/settings.php:616
441
  msgid "All existing data deleted succesfully."
442
  msgstr ""
443
 
444
+ #: ../includes/settings.php:618
445
  msgid "Error occurred. All existing data were not deleted."
446
  msgstr ""
447
 
448
+ #: ../includes/settings.php:794
449
  msgid "General settings restored to defaults."
450
  msgstr ""
451
 
452
+ #: ../includes/settings.php:798
453
  msgid "Display settings restored to defaults."
454
  msgstr ""
455
 
523
  msgid "Thumbnail size"
524
  msgstr ""
525
 
526
+ #: ../post-views-counter.php:367
527
  msgid "Are you sure you want to reset these settings to defaults?"
528
  msgstr ""
529
 
530
+ #: ../post-views-counter.php:368
531
  msgid "Are you sure you want to delete all existing data?"
532
  msgstr ""
533
 
534
+ #: ../post-views-counter.php:418
535
  msgid "Support"
536
  msgstr ""
537
 
538
+ #: ../post-views-counter.php:442
539
  msgid "Settings"
540
  msgstr ""
post-views-counter.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: Post Views Counter
4
  Description: Post Views Counter allows you to 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.10
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.10
35
  */
36
  final class Post_Views_Counter {
37
 
@@ -59,6 +59,7 @@ if ( ! class_exists( 'Post_Views_Counter' ) ) :
59
  'roles' => array()
60
  ),
61
  'exclude_ips' => array(),
 
62
  'restrict_edit_views' => false,
63
  'deactivation_delete' => false,
64
  'cron_run' => true,
@@ -80,7 +81,7 @@ if ( ! class_exists( 'Post_Views_Counter' ) ) :
80
  'link_to_post' => true,
81
  'icon_class' => 'dashicons-chart-bar'
82
  ),
83
- 'version' => '1.2.10'
84
  );
85
 
86
  /**
2
  /*
3
  Plugin Name: Post Views Counter
4
  Description: Post Views Counter allows you to 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.11
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.11
35
  */
36
  final class Post_Views_Counter {
37
 
59
  'roles' => array()
60
  ),
61
  'exclude_ips' => array(),
62
+ 'strict_counts' => false,
63
  'restrict_edit_views' => false,
64
  'deactivation_delete' => false,
65
  'cron_run' => true,
81
  'link_to_post' => true,
82
  'icon_class' => 'dashicons-chart-bar'
83
  ),
84
+ 'version' => '1.2.11'
85
  );
86
 
87
  /**
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.dfactory.eu/
4
  Tags: counter, hits, posts, postviews, post views, views, count, statistics, stats, analytics, pageviews, tracking
5
  Requires at least: 4.0
6
  Tested up to: 4.9.2
7
- Stable tag: 1.2.10
8
  License: MIT License
9
  License URI: http://opensource.org/licenses/MIT
10
 
@@ -60,6 +60,9 @@ No questions yet.
60
 
61
  == Changelog ==
62
 
 
 
 
63
  = 1.2.10 =
64
  * New: Additional transient based IP expiration checks
65
  * Tweak: Chart.js script update to 2.7.1
@@ -169,6 +172,5 @@ Initial release
169
 
170
  == Upgrade Notice ==
171
 
172
- = 1.2.10 =
173
- * New: Additional transient based IP expiration checks
174
- * Tweak: Chart.js script update to 2.7.1
4
  Tags: counter, hits, posts, postviews, post views, views, count, statistics, stats, analytics, pageviews, tracking
5
  Requires at least: 4.0
6
  Tested up to: 4.9.2
7
+ Stable tag: 1.2.11
8
  License: MIT License
9
  License URI: http://opensource.org/licenses/MIT
10
 
60
 
61
  == Changelog ==
62
 
63
+ = 1.2.11 =
64
+ * Tweak: Additional IP expiration checks added as an option
65
+
66
  = 1.2.10 =
67
  * New: Additional transient based IP expiration checks
68
  * Tweak: Chart.js script update to 2.7.1
172
 
173
  == Upgrade Notice ==
174
 
175
+ = 1.2.11 =
176
+ * Tweak: Additional IP expiration checks added as an option