WP-PostViews - Version 1.71

Version Description

N/A

Download this release

Release Info

Developer GamerZ
Plugin Icon WP-PostViews
Version 1.71
Comparing to
See all releases

Code changes from version 1.70 to 1.71

Files changed (2) hide show
  1. readme.txt +5 -2
  2. wp-postviews.php +4 -14
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: GamerZ
3
  Donate link: http://lesterchan.net/site/donation/
4
  Tags: views, hits, counter, postviews
5
  Requires at least: 3.0
6
- Tested up to: 4.2
7
- Stable tag: 1.70
8
 
9
  Enables you to display how many times a post/page had been viewed.
10
 
@@ -26,6 +26,9 @@ Enables you to display how many times a post/page had been viewed.
26
  I spent most of my free time creating, updating, maintaining and supporting these plugins, if you really love my plugins and could spare me a couple of bucks, I will really appreciate it. If not feel free to use it without any obligations.
27
 
28
  == Changelog ==
 
 
 
29
  = Version 1.70 =
30
  * FIXED: Integration with WP-Stats
31
 
3
  Donate link: http://lesterchan.net/site/donation/
4
  Tags: views, hits, counter, postviews
5
  Requires at least: 3.0
6
+ Tested up to: 4.3
7
+ Stable tag: 1.71
8
 
9
  Enables you to display how many times a post/page had been viewed.
10
 
26
  I spent most of my free time creating, updating, maintaining and supporting these plugins, if you really love my plugins and could spare me a couple of bucks, I will really appreciate it. If not feel free to use it without any obligations.
27
 
28
  == Changelog ==
29
+ = Version 1.71 =
30
+ * FIXED: Notices in Widget Constructor for WordPress 4.3
31
+
32
  = Version 1.70 =
33
  * FIXED: Integration with WP-Stats
34
 
wp-postviews.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: WP-PostViews
4
  Plugin URI: http://lesterchan.net/portfolio/programming/php/
5
  Description: Enables you to display how many times a post/page had been viewed.
6
- Version: 1.70
7
  Author: Lester 'GaMerZ' Chan
8
  Author URI: http://lesterchan.net
9
  Text Domain: wp-postviews
@@ -635,16 +635,6 @@ function add_views_fields($post_ID) {
635
  }
636
 
637
 
638
- ### Function: Delete Views Custom Fields
639
- add_action('delete_post', 'delete_views_fields');
640
- function delete_views_fields($post_ID) {
641
- global $wpdb;
642
- if(!wp_is_post_revision($post_ID)) {
643
- delete_post_meta($post_ID, 'views');
644
- }
645
- }
646
-
647
-
648
  ### Function: Views Public Variables
649
  add_filter('query_vars', 'views_variables');
650
  function views_variables($public_query_vars) {
@@ -824,9 +814,9 @@ function postviews_round_number( $number, $min_value = 1000, $decimal = 1 ) {
824
  ### Class: WP-PostViews Widget
825
  class WP_Widget_PostViews extends WP_Widget {
826
  // Constructor
827
- function WP_Widget_PostViews() {
828
  $widget_ops = array('description' => __('WP-PostViews views statistics', 'wp-postviews'));
829
- $this->WP_Widget('views', __('Views', 'wp-postviews'), $widget_ops);
830
  }
831
 
832
  // Display Widget
@@ -981,4 +971,4 @@ function views_activation( $network_wide ) {
981
  ### Function: Parse View Options
982
  function views_options_parse($key) {
983
  return !empty($_POST[$key]) ? $_POST[$key] : null;
984
- }
3
  Plugin Name: WP-PostViews
4
  Plugin URI: http://lesterchan.net/portfolio/programming/php/
5
  Description: Enables you to display how many times a post/page had been viewed.
6
+ Version: 1.71
7
  Author: Lester 'GaMerZ' Chan
8
  Author URI: http://lesterchan.net
9
  Text Domain: wp-postviews
635
  }
636
 
637
 
 
 
 
 
 
 
 
 
 
 
638
  ### Function: Views Public Variables
639
  add_filter('query_vars', 'views_variables');
640
  function views_variables($public_query_vars) {
814
  ### Class: WP-PostViews Widget
815
  class WP_Widget_PostViews extends WP_Widget {
816
  // Constructor
817
+ function __construct() {
818
  $widget_ops = array('description' => __('WP-PostViews views statistics', 'wp-postviews'));
819
+ parent::__construct('views', __('Views', 'wp-postviews'), $widget_ops);
820
  }
821
 
822
  // Display Widget
971
  ### Function: Parse View Options
972
  function views_options_parse($key) {
973
  return !empty($_POST[$key]) ? $_POST[$key] : null;
974
+ }