I Recommend This - Version 2.1.3

Version Description

Download this release

Release Info

Developer hchouhan
Plugin Icon 128x128 I Recommend This
Version 2.1.3
Comparing to
See all releases

Code changes from version 2.1.2 to 2.1.3

Files changed (2) hide show
  1. dot-irecommendthis.php +28 -30
  2. readme.txt +6 -3
dot-irecommendthis.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: I Recommend This
4
  * Plugin URI: http://www.harishchouhan.com/personal-projects/i-recommend-this/
5
  * Description: This plugin allows your visitors to simply recommend or like your posts instead of commment it.
6
- * Version: 2.1.2
7
  * Author: Harish Chouhan
8
  * Author URI: http://www.harishchouhan.com
9
  * Author Email: me@harishchouhan.com
@@ -15,7 +15,7 @@
15
  *
16
  * License:
17
 
18
- Copyright 2012 "I Recommend This WordPress Plugin" (me@harishchouhan.coms)
19
 
20
  This program is free software; you can redistribute it and/or modify
21
  it under the terms of the GNU General Public License, version 2, as
@@ -31,17 +31,14 @@
31
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
32
 
33
  */
34
-
35
- //if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
36
-
37
-
38
  if ( ! class_exists( 'DOT_IRecommendThis' ) )
39
  {
40
 
41
 
42
  class DOT_IRecommendThis {
43
 
44
- public $version = '2.1.2';
45
 
46
  /*--------------------------------------------*
47
  * Constructor
@@ -51,12 +48,12 @@ if ( ! class_exists( 'DOT_IRecommendThis' ) )
51
  {
52
  $this->file = $file;
53
 
54
- // Load text domain
55
- add_action( 'init', array( &$this, 'load_localisation' ), 0 );
56
-
57
  // Run this on activation / deactivation
58
- register_activation_hook( __FILE__, array( &$this, 'activate' ) );
59
 
 
 
 
60
  add_action( 'admin_menu', array( &$this, 'dot_irecommendthis_menu' ) );
61
  add_action( 'admin_init', array( &$this, 'dot_irecommendthis_settings' ) );
62
  add_action( 'init', array( &$this, 'add_widget_most_recommended_posts' ) );
@@ -69,28 +66,18 @@ if ( ! class_exists( 'DOT_IRecommendThis' ) )
69
 
70
  } // end constructor
71
 
72
-
73
- /*--------------------------------------------*
74
- * Localisation | Public | 1.4.6 | Return : void
75
- *--------------------------------------------*/
76
-
77
- public function load_localisation ()
78
- {
79
- load_plugin_textdomain( 'dot', false, dirname( plugin_basename( $this->file ) ) . '/languages/' );
80
-
81
- } // End load_localisation()
82
-
83
-
84
  /*--------------------------------------------*
85
  * Activate
86
  *--------------------------------------------*/
87
 
88
  public function activate( $network_wide ) {
89
-
90
  global $wpdb;
91
 
92
  $table_name = $wpdb->prefix . "irecommendthis_votes";
93
- if($wpdb->get_var("show tables recommend '$table_name'") != $table_name) {
 
94
  $sql = "CREATE TABLE " . $table_name . " (
95
  id MEDIUMINT(9) NOT NULL AUTO_INCREMENT,
96
  time TIMESTAMP NOT NULL,
@@ -100,11 +87,12 @@ if ( ! class_exists( 'DOT_IRecommendThis' ) )
100
  );";
101
 
102
  require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
 
103
  dbDelta($sql);
104
 
105
  $this->register_plugin_version();
106
 
107
- //add_option("dot_irecommendthis_db_version", $dot_irecommendthis_db_version);
108
  }
109
 
110
  } // end activate
@@ -114,6 +102,16 @@ if ( ! class_exists( 'DOT_IRecommendThis' ) )
114
  update_option( 'dot-irecommendthis' . '-version', $this->version );
115
  }
116
  } // End register_plugin_version()
 
 
 
 
 
 
 
 
 
 
117
 
118
 
119
  /*--------------------------------------------*
@@ -249,10 +247,10 @@ if ( ! class_exists( 'DOT_IRecommendThis' ) )
249
  $options = get_option( 'dot_irecommendthis_settings' );
250
  if( !isset($options['recommend_style']) ) $options['recommend_style'] = '0';
251
 
252
- echo '<label><input type="radio" name="dot_irecommendthis_settings[recommend_style]" value="0"'. (($options['recommend_style']) == "0" ? checked : '') .' />
253
  '. __('Default style - Thumb', 'dot') .'</label><br />
254
 
255
- <label><input type="radio" name="dot_irecommendthis_settings[recommend_style]" value="1"'. (($options['recommend_style']) == "1" ? checked : '') .' />
256
  '. __('Heart', 'dot') .'</label><br />';
257
  }
258
 
@@ -570,7 +568,7 @@ if ( ! class_exists( 'DOT_IRecommendThis' ) )
570
  global $dot_irecommendthis;
571
 
572
  // Initiation call of plugin
573
- $dot_irecommendthis = new DOT_IRecommendThis( $file );
574
 
575
  }
576
 
@@ -600,4 +598,4 @@ if ( ! class_exists( 'DOT_IRecommendThis' ) )
600
  );
601
  }
602
 
603
- ?>
3
  * Plugin Name: I Recommend This
4
  * Plugin URI: http://www.harishchouhan.com/personal-projects/i-recommend-this/
5
  * Description: This plugin allows your visitors to simply recommend or like your posts instead of commment it.
6
+ * Version: 2.1.3
7
  * Author: Harish Chouhan
8
  * Author URI: http://www.harishchouhan.com
9
  * Author Email: me@harishchouhan.com
15
  *
16
  * License:
17
 
18
+ Copyright 2013 "I Recommend This WordPress Plugin" (me@harishchouhan.coms)
19
 
20
  This program is free software; you can redistribute it and/or modify
21
  it under the terms of the GNU General Public License, version 2, as
31
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
32
 
33
  */
34
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
 
 
 
35
  if ( ! class_exists( 'DOT_IRecommendThis' ) )
36
  {
37
 
38
 
39
  class DOT_IRecommendThis {
40
 
41
+ public $version = '2.1.3';
42
 
43
  /*--------------------------------------------*
44
  * Constructor
48
  {
49
  $this->file = $file;
50
 
 
 
 
51
  // Run this on activation / deactivation
52
+ register_activation_hook( $file, array( $this, 'activate' ) );
53
 
54
+ // Load text domain
55
+ add_action( 'init', array( &$this, 'load_localisation' ), 0 );
56
+
57
  add_action( 'admin_menu', array( &$this, 'dot_irecommendthis_menu' ) );
58
  add_action( 'admin_init', array( &$this, 'dot_irecommendthis_settings' ) );
59
  add_action( 'init', array( &$this, 'add_widget_most_recommended_posts' ) );
66
 
67
  } // end constructor
68
 
69
+
 
 
 
 
 
 
 
 
 
 
 
70
  /*--------------------------------------------*
71
  * Activate
72
  *--------------------------------------------*/
73
 
74
  public function activate( $network_wide ) {
75
+ if (!isset($wpdb)) $wpdb = $GLOBALS['wpdb'];
76
  global $wpdb;
77
 
78
  $table_name = $wpdb->prefix . "irecommendthis_votes";
79
+ if($wpdb->get_var("show tables like '$table_name'") != $table_name)
80
+ {
81
  $sql = "CREATE TABLE " . $table_name . " (
82
  id MEDIUMINT(9) NOT NULL AUTO_INCREMENT,
83
  time TIMESTAMP NOT NULL,
87
  );";
88
 
89
  require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
90
+
91
  dbDelta($sql);
92
 
93
  $this->register_plugin_version();
94
 
95
+ add_option("dot_irecommendthis_db_version", $dot_irecommendthis_db_version);
96
  }
97
 
98
  } // end activate
102
  update_option( 'dot-irecommendthis' . '-version', $this->version );
103
  }
104
  } // End register_plugin_version()
105
+
106
+ /*--------------------------------------------*
107
+ * Localisation | Public | 1.4.6 | Return : void
108
+ *--------------------------------------------*/
109
+
110
+ public function load_localisation ()
111
+ {
112
+ load_plugin_textdomain( 'dot', false, dirname( plugin_basename( $this->file ) ) . '/languages/' );
113
+
114
+ } // End load_localisation()
115
 
116
 
117
  /*--------------------------------------------*
247
  $options = get_option( 'dot_irecommendthis_settings' );
248
  if( !isset($options['recommend_style']) ) $options['recommend_style'] = '0';
249
 
250
+ echo '<label><input type="radio" name="dot_irecommendthis_settings[recommend_style]" value="0"'. (($options['recommend_style']) == "0" ? 'checked' : '') .' />
251
  '. __('Default style - Thumb', 'dot') .'</label><br />
252
 
253
+ <label><input type="radio" name="dot_irecommendthis_settings[recommend_style]" value="1"'. (($options['recommend_style']) == "1" ? 'checked' : '') .' />
254
  '. __('Heart', 'dot') .'</label><br />';
255
  }
256
 
568
  global $dot_irecommendthis;
569
 
570
  // Initiation call of plugin
571
+ $dot_irecommendthis = new DOT_IRecommendThis(__FILE__);
572
 
573
  }
574
 
598
  );
599
  }
600
 
601
+ ?>
readme.txt CHANGED
@@ -3,9 +3,9 @@ Contributors: hchouhan, dreamsonline, dreamsmedia, Benoit "LeBen" Burgener
3
  Donate link: http://www.designerskiosk.com
4
  Tags: recommend, like, love, post, rate, rating, heart, dribbble like, tumblr like
5
  Requires at least: 3.3
6
- Tested up to: 3.5
7
- Stable tag: 2.1.2
8
- Last Updated: 2012-December-20
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -64,6 +64,9 @@ You can also visit the [support center](http://www.harishchouhan.com/personal-pr
64
 
65
  == Changelog ==
66
 
 
 
 
67
  = 2.1.2
68
  * Fixed CSS Disable issue. Thanks to Nicolas Mollet.
69
 
3
  Donate link: http://www.designerskiosk.com
4
  Tags: recommend, like, love, post, rate, rating, heart, dribbble like, tumblr like
5
  Requires at least: 3.3
6
+ Tested up to: 3.5.2
7
+ Stable tag: 2.1.3
8
+ Last Updated: 2013-March-17
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
64
 
65
  == Changelog ==
66
 
67
+ = 2.1.3
68
+ * Fixed errors shown when Debug mode was on. Thanks to [Air](http://profiles.wordpress.org/air-1/)
69
+
70
  = 2.1.2
71
  * Fixed CSS Disable issue. Thanks to Nicolas Mollet.
72