Statify - Version 1.7.1

Version Description

Download this release

Release Info

Developer pluginkollektiv
Plugin Icon 128x128 Statify
Version 1.7.1
Comparing to
See all releases

Code changes from version 1.7.0 to 1.7.1

CHANGELOG.md CHANGED
@@ -1,6 +1,13 @@
1
  # Changelog
2
  All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/).
3
 
 
 
 
 
 
 
 
4
  ## 1.7.0
5
  * Fix JavaScript embedding when bots visit before caching (#84) (#86)
6
  * Fix offset in visitor reporting due to different timezones between PHP and database (#117, props @sophiehuiberts)
1
  # Changelog
2
  All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/).
3
 
4
+ ## 1.7.1
5
+ * Fix refresh of the dashboard widget when settings have been changed through the settings page (#147)
6
+ * Fix _Cachify_ cache not being flushed after changing JavaScript settings (#152)
7
+ * Fix date inconsistency for number of total visits (#150)
8
+ * Extend user agent filter for bot detection (#149) (#151)
9
+ * Update tooltip library (containing a bugfix in IE 11) (#156)
10
+
11
  ## 1.7.0
12
  * Fix JavaScript embedding when bots visit before caching (#84) (#86)
13
  * Fix offset in visitor reporting due to different timezones between PHP and database (#117, props @sophiehuiberts)
inc/class-statify-dashboard.php CHANGED
@@ -240,14 +240,6 @@ class Statify_Dashboard extends Statify {
240
 
241
  // Update values.
242
  update_option( 'statify', $options );
243
-
244
- // Delete transient.
245
- delete_transient( 'statify_data' );
246
-
247
- // Clear Cachify cache.
248
- if ( has_action( 'cachify_flush_cache' ) ) {
249
- do_action( 'cachify_flush_cache' );
250
- }
251
  }
252
 
253
 
@@ -380,8 +372,9 @@ class Statify_Dashboard extends Statify {
380
  $current_date
381
  )
382
  ),
383
- 'since_beginning' => $wpdb->get_var(
384
- "SELECT COUNT(`created`) FROM `$wpdb->statify`"
 
385
  ),
386
  );
387
  }
240
 
241
  // Update values.
242
  update_option( 'statify', $options );
 
 
 
 
 
 
 
 
243
  }
244
 
245
 
372
  $current_date
373
  )
374
  ),
375
+ 'since_beginning' => $wpdb->get_row(
376
+ "SELECT COUNT(`created`) AS `count`, MIN(`created`) AS `date` FROM `$wpdb->statify`",
377
+ ARRAY_A
378
  ),
379
  );
380
  }
inc/class-statify-frontend.php CHANGED
@@ -227,6 +227,9 @@ class Statify_Frontend extends Statify {
227
  'curl',
228
  'facebook',
229
  'fetch',
 
 
 
230
  );
231
 
232
  foreach ( $identifiers as $identifier ) {
227
  'curl',
228
  'facebook',
229
  'fetch',
230
+ 'python',
231
+ 'wget',
232
+ 'monitor',
233
  );
234
 
235
  foreach ( $identifiers as $identifier ) {
inc/class-statify-settings.php CHANGED
@@ -227,7 +227,7 @@ class Statify_Settings {
227
  <input id="statify-skip-referrer" type="checkbox" name="statify[blacklist]" value="1"<?php checked( Statify::$_options['blacklist'] ); ?>>
228
  (<?php esc_html_e( 'Default', 'statify' ); ?>: <?php esc_html_e( 'No', 'statify' ); ?>)
229
  <br>
230
- <p class="description"><?php esc_html_e( 'Enabling this option excludes any views with referrers listed in the comment blacklist', 'statify' ); ?>.</p>
231
  <?php
232
  }
233
 
@@ -245,6 +245,28 @@ class Statify_Settings {
245
  <?php
246
  }
247
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
248
  /**
249
  * Validate and sanitize submitted options.
250
  *
227
  <input id="statify-skip-referrer" type="checkbox" name="statify[blacklist]" value="1"<?php checked( Statify::$_options['blacklist'] ); ?>>
228
  (<?php esc_html_e( 'Default', 'statify' ); ?>: <?php esc_html_e( 'No', 'statify' ); ?>)
229
  <br>
230
+ <p class="description"><?php esc_html_e( 'Enabling this option excludes any views with referrers listed in the comment blacklist.', 'statify' ); ?></p>
231
  <?php
232
  }
233
 
245
  <?php
246
  }
247
 
248
+ /**
249
+ * Action to be triggered after Statify options have been saved.
250
+ * Delete transient data to refresh the dashboard widget and flushes Cachify cache, if the plugin is available and
251
+ * JS settings have changed.
252
+ *
253
+ * @since 1.7.1
254
+ *
255
+ * @param array $old_value The old options value.
256
+ * @param array $value The updated options value.
257
+ *
258
+ * @return void
259
+ */
260
+ public static function action_update_options( $old_value, $value ) {
261
+ // Delete transient.
262
+ delete_transient( 'statify_data' );
263
+
264
+ // Clear Cachify cache, if JS settings have changed.
265
+ if ( $old_value['snippet'] !== $value['snippet'] && has_action( 'cachify_flush_cache' ) ) {
266
+ do_action( 'cachify_flush_cache' );
267
+ }
268
+ }
269
+
270
  /**
271
  * Validate and sanitize submitted options.
272
  *
inc/class-statify.php CHANGED
@@ -94,6 +94,7 @@ class Statify {
94
  add_filter( 'plugin_action_links_' . STATIFY_BASE, array( 'Statify_Backend', 'add_action_link' ) );
95
  add_action( 'admin_init', array( 'Statify_Settings', 'register_settings' ) );
96
  add_action( 'admin_menu', array( 'Statify_Settings', 'add_admin_menu' ) );
 
97
  } else { // Frontend.
98
  add_action( 'template_redirect', array( 'Statify_Frontend', 'track_visit' ) );
99
  add_filter( 'query_vars', array( 'Statify_Frontend', 'query_vars' ) );
94
  add_filter( 'plugin_action_links_' . STATIFY_BASE, array( 'Statify_Backend', 'add_action_link' ) );
95
  add_action( 'admin_init', array( 'Statify_Settings', 'register_settings' ) );
96
  add_action( 'admin_menu', array( 'Statify_Settings', 'add_admin_menu' ) );
97
+ add_action( 'update_option_statify', array( 'Statify_Settings', 'action_update_options' ), 10, 2 );
98
  } else { // Frontend.
99
  add_action( 'template_redirect', array( 'Statify_Frontend', 'track_visit' ) );
100
  add_filter( 'query_vars', array( 'Statify_Frontend', 'query_vars' ) );
js/chartist-plugin-tooltip.min.js CHANGED
@@ -1,8 +1,8 @@
1
- /* chartist-plugin-tooltip 0.1.2
2
- * Copyright © 2019 Markus Padourek
3
  * Free to use under the WTFPL license.
4
  * http://www.wtfpl.net/
5
  */
6
 
7
- !function(e,o){void 0===e&&void 0!==window&&(e=window),"function"==typeof define&&define.amd?define(["chartist"],function(t){return e["Chartist.plugins.tooltip"]=o(t)}):"object"==typeof module&&module.exports?module.exports=o(require("chartist")):e["Chartist.plugins.tooltip"]=o(e.Chartist)}(this,function(t){return function(v,x,b){"use strict";var t={currency:void 0,currencyFormatCallback:void 0,tooltipOffset:{x:0,y:-20},anchorToPoint:!1,appendToBody:!0,class:void 0,pointClass:"ct-point"};function T(t,e){return-1<(" "+t.getAttribute("class")+" ").indexOf(" "+e+" ")}function C(t){var e;return C in t?e=(e=t.offsetParent)||x.body.parentElement:(e=t.parentNode)?"static"!==v.getComputedStyle(e).position?e:"BODY"===e.tagName?e.parentElement:C(e):x.body.parentElement}b.plugins=b.plugins||{},b.plugins.tooltip=function(h){return h=b.extend({},t,h),function(c){var t=h.pointClass;c instanceof b.Bar?t="ct-bar":c instanceof b.Pie&&(t=c.options.donut?c.options.donutSolid?"ct-slice-donut-solid":"ct-slice-donut":"ct-slice-pie");var p,f=c.container,u=!1,d=C(f);(p=h.appendToBody?x.querySelector(".chartist-tooltip"):f.querySelector(".chartist-tooltip"))||((p=x.createElement("div")).className=h.class?"chartist-tooltip "+h.class:"chartist-tooltip",h.appendToBody?x.body.appendChild(p):f.appendChild(p));var g=p.offsetHeight,y=p.offsetWidth;function e(t,e,o){f.addEventListener(t,function(t){e&&!T(t.target,e)||o(t)})}function m(t){g=g||p.offsetHeight;var e=-(y=y||p.offsetWidth)/2+h.tooltipOffset.x,o=-g+h.tooltipOffset.y,n=!0===h.anchorToPoint&&t.target.x2&&t.target.y2;if(!0===h.appendToBody)if(n){var i=f.getBoundingClientRect(),a=t.target.x2.baseVal.value+i.left+v.pageXOffset,s=t.target.y2.baseVal.value+i.top+v.pageYOffset;p.style.left=a+e+"px",p.style.top=s+o+"px"}else p.style.left=t.pageX+e+"px",p.style.top=t.pageY+o+"px";else{var l=d.getBoundingClientRect(),r=-l.left-v.scrollX+e,c=-l.top-v.scrollY+o;if(n){i=f.getBoundingClientRect(),a=t.target.x2.baseVal.value+i.left+v.pageXOffset,s=t.target.y2.baseVal.value+i.top+v.pageYOffset;p.style.left=a+r+"px",p.style.top=s+c+"px"}else p.style.left=t.pageX+r+"px",p.style.top=t.pageY+c+"px"}}function o(t){u=!1;var e=new RegExp("tooltip-show\\s*","gi");t.className=t.className.replace(e,"").trim()}o(p),e("mouseover",t,function(t){var e=t.target,o="",n=(c instanceof b.Pie?e:e.parentNode)?e.parentNode.getAttribute("ct:meta")||e.parentNode.getAttribute("ct:series-name"):"",i=e.getAttribute("ct:meta")||n||"",a=!!i,s=e.getAttribute("ct:value");if(h.transformTooltipTextFnc&&"function"==typeof h.transformTooltipTextFnc&&(s=h.transformTooltipTextFnc(s)),h.tooltipFnc&&"function"==typeof h.tooltipFnc)o=h.tooltipFnc(i,s);else{if(h.metaIsHTML){var l=x.createElement("textarea");l.innerHTML=i,i=l.value}if(i='<span class="chartist-tooltip-meta">'+i+"</span>",a)o+=i+"<br>";else if(c instanceof b.Pie){var r=function(t,e){for(;t=t.nextSibling,t&&!T(t,e););return t}(e,"ct-label");r&&(o+=function(t){return t.innerText||t.textContent}(r)+"<br>")}s&&(h.currency&&(s=null!=h.currencyFormatCallback?h.currencyFormatCallback(s,h):h.currency+s.replace(/(\d)(?=(\d{3})+(?:\.\d+)?$)/g,"$1,")),o+=s='<span class="chartist-tooltip-value">'+s+"</span>")}o&&(p.innerHTML=o,g=p.offsetHeight,y=p.offsetWidth,!0!==h.appendToBody&&(d=C(f)),"absolute"!==p.style.display&&(p.style.display="absolute"),m(t),function(t){u=!0,T(t,"tooltip-show")||(t.className=t.className+" tooltip-show")}(p),g=p.offsetHeight,y=p.offsetWidth)}),e("mouseout",t,function(){o(p)}),e("mousemove",null,function(t){!1===h.anchorToPoint&&u&&m(t)})}}}(window,document,t),t.plugins.tooltip});
8
  //# sourceMappingURL=chartist-plugin-tooltip.min.js.map
1
+ /* chartist-plugin-tooltip 0.1.3
2
+ * Copyright © 2020 Markus Padourek
3
  * Free to use under the WTFPL license.
4
  * http://www.wtfpl.net/
5
  */
6
 
7
+ !function(e,o){void 0===e&&void 0!==window&&(e=window),"function"==typeof define&&define.amd?define(["chartist"],function(t){return e["Chartist.plugins.tooltip"]=o(t)}):"object"==typeof module&&module.exports?module.exports=o(require("chartist")):e["Chartist.plugins.tooltip"]=o(e.Chartist)}(this,function(t){return function(c,b,T){"use strict";var t={currency:void 0,currencyFormatCallback:void 0,tooltipOffset:{x:0,y:-20},anchorToPoint:!1,appendToBody:!0,class:void 0,pointClass:"ct-point"};function C(t,e){return-1<(" "+t.getAttribute("class")+" ").indexOf(" "+e+" ")}function O(t){var e;return O in t?e=(e=t.offsetParent)||b.body.parentElement:(e=t.parentNode)?"static"!==c.getComputedStyle(e).position?e:"BODY"===e.tagName?e.parentElement:O(e):b.body.parentElement}T.plugins=T.plugins||{},T.plugins.tooltip=function(x){return x=T.extend({},t,x),function(f){var t=x.pointClass;f instanceof T.Bar?t="ct-bar":f instanceof T.Pie&&(t=f.options.donut?f.options.donutSolid?"ct-slice-donut-solid":"ct-slice-donut":"ct-slice-pie");var u,d=f.container,g=!1,y=O(d);(u=x.appendToBody?b.querySelector(".chartist-tooltip"):d.querySelector(".chartist-tooltip"))||((u=b.createElement("div")).className=x.class?"chartist-tooltip "+x.class:"chartist-tooltip",x.appendToBody?b.body.appendChild(u):d.appendChild(u));var m=u.offsetHeight,h=u.offsetWidth;function e(t,e,o){d.addEventListener(t,function(t){e&&!C(t.target,e)||o(t)})}function v(t){m=m||u.offsetHeight;var e=-(h=h||u.offsetWidth)/2+x.tooltipOffset.x,o=-m+x.tooltipOffset.y,n=!0===x.anchorToPoint&&t.target.x2&&t.target.y2;if(!0===x.appendToBody)if(n){var i=d.getBoundingClientRect(),a=t.target.x2.baseVal.value+i.left+c.pageXOffset,s=t.target.y2.baseVal.value+i.top+c.pageYOffset;u.style.left=a+e+"px",u.style.top=s+o+"px"}else u.style.left=t.pageX+e+"px",u.style.top=t.pageY+o+"px";else{var l=y.getBoundingClientRect(),r=-l.left-c.pageXOffset+e,p=-l.top-c.pageYOffset+o;if(n){i=d.getBoundingClientRect(),a=t.target.x2.baseVal.value+i.left+c.pageXOffset,s=t.target.y2.baseVal.value+i.top+c.pageYOffset;u.style.left=a+r+"px",u.style.top=s+p+"px"}else u.style.left=t.pageX+r+"px",u.style.top=t.pageY+p+"px"}}function o(t){g=!1;var e=new RegExp("tooltip-show\\s*","gi");t.className=t.className.replace(e,"").trim()}o(u),e("mouseover",t,function(t){var e,o,n=t.target,i="",a=(f instanceof T.Pie?n:n.parentNode)?n.parentNode.getAttribute("ct:meta")||n.parentNode.getAttribute("ct:series-name"):"",s=n.getAttribute("ct:meta")||a||"",l=!!s,r=n.getAttribute("ct:value");if(x.transformTooltipTextFnc&&"function"==typeof x.transformTooltipTextFnc&&(r=x.transformTooltipTextFnc(r)),x.tooltipFnc&&"function"==typeof x.tooltipFnc)i=x.tooltipFnc(s,r);else{if(x.metaIsHTML){var p=b.createElement("textarea");p.innerHTML=s,s=p.value}if(s='<span class="chartist-tooltip-meta">'+s+"</span>",l)i+=s+"<br>";else if(f instanceof T.Pie){var c=function(t,e){for(;t=t.nextSibling,t&&!C(t,e););return t}(n,"ct-label");c&&(i+=((e=c).innerText||e.textContent)+"<br>")}r&&(x.currency&&(r=null!=x.currencyFormatCallback?x.currencyFormatCallback(r,x):x.currency+r.replace(/(\d)(?=(\d{3})+(?:\.\d+)?$)/g,"$1,")),i+=r='<span class="chartist-tooltip-value">'+r+"</span>")}i&&(u.innerHTML=i,m=u.offsetHeight,h=u.offsetWidth,!0!==x.appendToBody&&(y=O(d)),"absolute"!==u.style.display&&(u.style.display="absolute"),v(t),g=!0,C(o=u,"tooltip-show")||(o.className=o.className+" tooltip-show"),m=u.offsetHeight,h=u.offsetWidth)}),e("mouseout",t,function(){o(u)}),e("mousemove",null,function(t){!1===x.anchorToPoint&&g&&v(t)})}}}(window,document,t),t.plugins.tooltip});
8
  //# sourceMappingURL=chartist-plugin-tooltip.min.js.map
js/chartist-plugin-tooltip.min.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["chartist-plugin-tooltip.js"],"names":["root","factory","undefined","window","define","amd","a0","module","exports","require","this","Chartist","document","defaultOptions","currency","currencyFormatCallback","tooltipOffset","x","y","anchorToPoint","appendToBody","class","pointClass","hasClass","element","className","getAttribute","indexOf","offsetParent","elem","parent","body","parentElement","parentNode","getComputedStyle","position","tagName","plugins","tooltip","options","extend","chart","tooltipSelector","Bar","Pie","donut","donutSolid","$toolTip","$chart","container","$toolTipIsShown","$tooltipOffsetParent","querySelector","createElement","appendChild","height","offsetHeight","width","offsetWidth","on","event","selector","callback","addEventListener","e","target","setPosition","offsetX","offsetY","anchor","x2","y2","box","getBoundingClientRect","left","baseVal","value","pageXOffset","top","pageYOffset","style","pageX","pageY","offsetBox","allOffsetLeft","scrollX","allOffsetTop","scrollY","hide","regex","RegExp","replace","trim","$point","tooltipText","seriesName","meta","hasMeta","transformTooltipTextFnc","tooltipFnc","metaIsHTML","txt","innerHTML","label","nextSibling","next","innerText","textContent","text","display","show"],"mappings":";;;;;;CAAC,SAAUA,EAAMC,QACFC,IAATF,QAAiCE,IAAXC,SAAsBH,EAAOG,QACjC,mBAAXC,QAAyBA,OAAOC,IAEzCD,OAAO,CAAC,YAAa,SAAUE,GAC7B,OAAQN,EAAK,4BAA8BC,EAAQK,KAE1B,iBAAXC,QAAuBA,OAAOC,QAI9CD,OAAOC,QAAUP,EAAQQ,QAAQ,aAEjCT,EAAK,4BAA8BC,EAAQD,EAAe,UAb9D,CAeEU,KAAM,SAAUC,GAuRlB,OAhRC,SAAUR,EAAQS,EAAUD,GAC3B,aAEA,IAAIE,EAAiB,CACnBC,cAAUZ,EACVa,4BAAwBb,EACxBc,cAAe,CACbC,EAAG,EACHC,GAAI,IAENC,eAAe,EACfC,cAAc,EACdC,WAAOnB,EACPoB,WAAY,YA+Md,SAASC,EAASC,EAASC,GACzB,OAAqF,GAA7E,IAAMD,EAAQE,aAAa,SAAW,KAAKC,QAAQ,IAAMF,EAAY,KAuB/E,SAASG,EAAaC,GAGlB,IASEC,EAXJ,OAAIF,KAAgBC,EAKhBC,GAHEA,EAASD,EAAKD,eAGPhB,EAAS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,EAASR,EAASS,aAClBC,EAAQV,EAASW,eAIrBC,EAAG,WAAYjB,EAAiB,WAC9B8C,EAAKzC,KAGPY,EAAG,YAAa,KAAM,SAAUC,IACA,IAA1BrB,EAAQpB,eAA2B+B,GACrCgB,EAAYN,OAnJtB,CA8QEzD,OAAQS,SAAUD,GAEbA,EAAS0B,QAAQC","file":"chartist-plugin-tooltip.min.js"}
1
+ {"version":3,"sources":["chartist-plugin-tooltip.js"],"names":["root","factory","undefined","window","define","amd","a0","module","exports","require","this","Chartist","document","defaultOptions","currency","currencyFormatCallback","tooltipOffset","x","y","anchorToPoint","appendToBody","class","pointClass","hasClass","element","className","getAttribute","indexOf","offsetParent","elem","parent","body","parentElement","parentNode","getComputedStyle","position","tagName","plugins","tooltip","options","extend","chart","tooltipSelector","Bar","Pie","donut","donutSolid","$toolTip","$chart","container","$toolTipIsShown","$tooltipOffsetParent","querySelector","createElement","appendChild","height","offsetHeight","width","offsetWidth","on","event","selector","callback","addEventListener","e","target","setPosition","offsetX","offsetY","anchor","x2","y2","box","getBoundingClientRect","left","baseVal","value","pageXOffset","top","pageYOffset","style","pageX","pageY","offsetBox","allOffsetLeft","allOffsetTop","hide","regex","RegExp","replace","trim","$point","tooltipText","seriesName","meta","hasMeta","transformTooltipTextFnc","tooltipFnc","metaIsHTML","txt","innerHTML","label","nextSibling","next","innerText","textContent","display"],"mappings":";;;;;;CAAC,SAAUA,EAAMC,QACFC,IAATF,QAAiCE,IAAXC,SAAsBH,EAAOG,QACjC,mBAAXC,QAAyBA,OAAOC,IAEzCD,OAAO,CAAC,YAAa,SAAUE,GAC7B,OAAQN,EAAK,4BAA8BC,EAAQK,KAE1B,iBAAXC,QAAuBA,OAAOC,QAI9CD,OAAOC,QAAUP,EAAQQ,QAAQ,aAEjCT,EAAK,4BAA8BC,EAAQD,EAAe,UAb9D,CAeEU,KAAM,SAAUC,GAuRlB,OAhRC,SAAUR,EAAQS,EAAUD,GAC3B,aAEA,IAAIE,EAAiB,CACnB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K1DgB,IACF7C,EAASqD,UAAYR,EAGrBrC,EAASR,EAASS,aAClBC,EAAQV,EAASW,aAEY,IAAzBnB,EAAQnB,eACV+B,EAAuBvB,EAAaoB,IAEP,aAA3BD,EAASiC,MAAM0B,UACjB3D,EAASiC,MAAM0B,QAAU,YAE3BxC,EAAYN,GA+DdV,GAAkB,EACb3B,EAFOC,EA7DLuB,EA+DgB,kBACrBvB,EAAQC,UAAYD,EAAQC,UAAY,iBA7DxC8B,EAASR,EAASS,aAClBC,EAAQV,EAASW,eAIrBC,EAAG,WAAYjB,EAAiB,WAC9B4C,EAAKvC,KAGPY,EAAG,YAAa,KAAM,SAAUC,IACA,IAA1BrB,EAAQpB,eAA2B+B,GACrCgB,EAAYN,OAnJtB,CA8QEzD,OAAQS,SAAUD,GAEbA,EAAS0B,QAAQC","file":"chartist-plugin-tooltip.min.js"}
readme.txt CHANGED
@@ -5,7 +5,7 @@
5
  * Requires at least: 4.7
6
  * Tested up to: 5.4
7
  * Requires PHP: 5.2
8
- * Stable tag: 1.7.0
9
  * License: GPLv3 or later
10
  * License URI: https://www.gnu.org/licenses/gpl-3.0.html
11
 
@@ -115,6 +115,13 @@ has to be added to the theme's `functions.php`. The condition has modified such
115
  ## Changelog ##
116
  You can find the full changelog in [our GitHub repository](https://github.com/pluginkollektiv/statify/blob/master/CHANGELOG.md).
117
 
 
 
 
 
 
 
 
118
  ### 1.7.0
119
  * Fix JavaScript embedding when bots visit before caching (#84) (#86)
120
  * Fix offset in visitor reporting due to different timezones between PHP and database (#117, props @sophiehuiberts)
@@ -159,20 +166,13 @@ For the complete changelog, check out our [GitHub repository](https://github.com
159
 
160
  ## Upgrade Notice ##
161
 
 
 
 
162
  ### 1.7.0 ###
163
  JavaScript tracking has been changed to use the WordPress AJAX endpoint.
164
  If you are using Statify without modifications, you are all set. Custom logic however might require adjustments (see snippet.js for reference).
165
 
166
- ### 1.6.3 ###
167
- This bugfix release is recommended for all users.
168
- It fixes completely broken tracking with some PHP implementations. Sorry for that, we might owe you a couple of visitors.
169
-
170
- ### 1.6.2 ###
171
- This bugfix release is recommended for all users.
172
-
173
- ### 1.6.1 ###
174
- This bugfix release is recommended for all users.
175
-
176
 
177
  ## Screenshots ##
178
  1. Statify dashboard widget
5
  * Requires at least: 4.7
6
  * Tested up to: 5.4
7
  * Requires PHP: 5.2
8
+ * Stable tag: 1.7.1
9
  * License: GPLv3 or later
10
  * License URI: https://www.gnu.org/licenses/gpl-3.0.html
11
 
115
  ## Changelog ##
116
  You can find the full changelog in [our GitHub repository](https://github.com/pluginkollektiv/statify/blob/master/CHANGELOG.md).
117
 
118
+ ### 1.7.1
119
+ * Fix refresh of the dashboard widget when settings have been changed through the settings page (#147)
120
+ * Fix _Cachify_ cache not being flushed after changing JavaScript settings (#152)
121
+ * Fix date inconsistency for number of total visits (#150)
122
+ * Extend user agent filter for bot detection (#149) (#151)
123
+ * Update tooltip library (containing a bugfix in IE 11) (#156)
124
+
125
  ### 1.7.0
126
  * Fix JavaScript embedding when bots visit before caching (#84) (#86)
127
  * Fix offset in visitor reporting due to different timezones between PHP and database (#117, props @sophiehuiberts)
166
 
167
  ## Upgrade Notice ##
168
 
169
+ ### 1.7.1 ###
170
+ This release fixes some bugs introduced with version 1.7.0. It is recommended for all users.
171
+
172
  ### 1.7.0 ###
173
  JavaScript tracking has been changed to use the WordPress AJAX endpoint.
174
  If you are using Statify without modifications, you are all set. Custom logic however might require adjustments (see snippet.js for reference).
175
 
 
 
 
 
 
 
 
 
 
 
176
 
177
  ## Screenshots ##
178
  1. Statify dashboard widget
statify.php CHANGED
@@ -7,7 +7,7 @@
7
  * Author URI: https://pluginkollektiv.org
8
  * Plugin URI: https://wordpress.org/plugins/statify/
9
  * License: GPLv3 or later
10
- * Version: 1.7.0
11
  *
12
  * @package WordPress
13
  */
7
  * Author URI: https://pluginkollektiv.org
8
  * Plugin URI: https://wordpress.org/plugins/statify/
9
  * License: GPLv3 or later
10
+ * Version: 1.7.1
11
  *
12
  * @package WordPress
13
  */
views/widget-front.php CHANGED
@@ -101,11 +101,11 @@ $stats = Statify_Dashboard::get_stats(); ?>
101
  </tr>
102
  <tr>
103
  <td class="b">
104
- <?php echo (int) $stats['visit_totals']['since_beginning']; ?>
105
  </td>
106
  <td class="t">
107
  <?php esc_html_e( 'since', 'statify' ); ?>
108
- <?php echo esc_html( date_i18n( get_option( 'date_format' ), strtotime( $stats['visits'][0]['date'] ) ) ); ?>
109
  </td>
110
  </tr>
111
  </table>
101
  </tr>
102
  <tr>
103
  <td class="b">
104
+ <?php echo (int) $stats['visit_totals']['since_beginning']['count']; ?>
105
  </td>
106
  <td class="t">
107
  <?php esc_html_e( 'since', 'statify' ); ?>
108
+ <?php echo esc_html( date_i18n( get_option( 'date_format' ), strtotime( $stats['visit_totals']['since_beginning']['date'] ) ) ); ?>
109
  </td>
110
  </tr>
111
  </table>