I Recommend This - Version 3.7.7

Version Description

Download this release

Release Info

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

Code changes from version 3.7.6 to 3.7.7

dot-irecommendthis.php CHANGED
@@ -1,36 +1,32 @@
1
  <?php
2
  /*
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: 3.7.6
7
- * Author: Harish Chouhan
8
- * Author URI: http://www.harishchouhan.com
9
- * Author Email: me@harishchouhan.com
10
- *
11
- * @package WordPress
12
- * @subpackage DOT_IRecommendThis
13
- * @author Harish
14
- * @since 2.0
15
- *
16
- * License:
17
-
18
- Copyright 2014 "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
22
- published by the Free Software Foundation.
23
-
24
- This program is distributed in the hope that it will be useful,
25
- but WITHOUT ANY WARRANTY; without even the implied warranty of
26
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27
- GNU General Public License for more details.
28
-
29
- You should have received a copy of the GNU General Public License
30
- along with this program; if not, write to the Free Software
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
  {
@@ -54,6 +50,9 @@ if ( ! class_exists( 'DOT_IRecommendThis' ) )
54
 
55
  // Load text domain
56
  add_action( 'init', array( &$this, 'load_localisation' ), 0 );
 
 
 
57
 
58
  add_action( 'admin_menu', array( &$this, 'dot_irecommendthis_menu' ) );
59
  add_action( 'admin_init', array( &$this, 'dot_irecommendthis_settings' ) );
@@ -66,6 +65,7 @@ if ( ! class_exists( 'DOT_IRecommendThis' ) )
66
  add_shortcode( 'dot_recommends', array( &$this, 'shortcode' ) );
67
  add_shortcode( 'dot_recommended_posts', array( &$this, 'dot_recommended_top_posts' ) );
68
 
 
69
  } // end constructor
70
 
71
 
@@ -84,7 +84,7 @@ if ( ! class_exists( 'DOT_IRecommendThis' ) )
84
  id MEDIUMINT(9) NOT NULL AUTO_INCREMENT,
85
  time TIMESTAMP NOT NULL,
86
  post_id BIGINT(20) NOT NULL,
87
- ip VARCHAR(15) NOT NULL,
88
  UNIQUE KEY id (id)
89
  );";
90
 
@@ -109,19 +109,27 @@ if ( ! class_exists( 'DOT_IRecommendThis' ) )
109
  }
110
  } // End register_plugin_version()
111
 
112
- /*--------------------------------------------*
113
- * Localisation | Public | 1.4.6 | Return : void
114
- *--------------------------------------------*/
115
-
116
- public function load_localisation ()
117
- {
118
 
119
- load_plugin_textdomain( 'dot', false, dirname( plugin_basename( $this->file ) ) . '/languages/' );
 
 
120
 
121
 
122
  } // End load_localisation()
123
 
124
 
 
 
 
 
 
 
125
 
126
  /*--------------------------------------------*
127
  * Enqueue Scripts
@@ -158,8 +166,8 @@ if ( ! class_exists( 'DOT_IRecommendThis' ) )
158
 
159
  function dot_irecommendthis_menu()
160
  {
161
- $page_title = __('I Recommend This', 'dot');
162
- $menu_title = __('I Recommend This', 'dot');
163
  $capability = 'manage_options';
164
  $menu_slug = 'dot-irecommendthis';
165
  $function = array( &$this, 'dot_settings_page');
@@ -178,27 +186,27 @@ if ( ! class_exists( 'DOT_IRecommendThis' ) )
178
 
179
  add_settings_section( 'dot-irecommendthis', '', array(&$this, 'section_intro'), 'dot-irecommendthis' );
180
 
181
- add_settings_field( 'show_on', __( 'Automatically display on', 'dot' ), array(&$this, 'setting_show_on'), 'dot-irecommendthis', 'dot-irecommendthis' );
182
 
183
- add_settings_field( 'text_zero_suffix', __( 'Text after 0 Count', 'dot' ), array(&$this, 'setting_text_zero_suffix'), 'dot-irecommendthis', 'dot-irecommendthis' );
184
 
185
- add_settings_field( 'text_one_suffix', __( 'Text after 1 Count', 'dot' ), array(&$this, 'setting_text_one_suffix'), 'dot-irecommendthis', 'dot-irecommendthis' );
186
 
187
- add_settings_field( 'text_more_suffix', __( 'Text after more than 1 Count', 'dot' ), array(&$this, 'setting_text_more_suffix'), 'dot-irecommendthis', 'dot-irecommendthis' );
188
 
189
- add_settings_field( 'link_title_new', __( 'Title for New posts', 'dot' ), array(&$this, 'setting_link_title_new'), 'dot-irecommendthis', 'dot-irecommendthis' );
190
 
191
- add_settings_field( 'link_title_active', __( 'Title for already voted posts', 'dot' ), array(&$this, 'setting_link_title_active'), 'dot-irecommendthis', 'dot-irecommendthis' );
192
 
193
- add_settings_field( 'disable_css', __( 'Disable CSS', 'dot' ), array(&$this, 'setting_disable_css'), 'dot-irecommendthis', 'dot-irecommendthis' );
194
 
195
- add_settings_field( 'hide_zero', __( 'Hide Zero Count', 'dot' ), array(&$this, 'setting_hide_zero'), 'dot-irecommendthis', 'dot-irecommendthis' );
196
 
197
- add_settings_field( 'disable_unique_ip', __( 'Disable IP saving', 'dot' ), array(&$this, 'setting_disable_unique_ip'), 'dot-irecommendthis', 'dot-irecommendthis' );
198
 
199
- add_settings_field( 'recommend_style', __( 'Choose a style', 'dot' ), array(&$this, 'setting_recommend_style'), 'dot-irecommendthis', 'dot-irecommendthis' );
200
 
201
- add_settings_field( 'instructions', __( 'Shortcode and Template Tag', 'dot' ), array(&$this, 'setting_instructions'), 'dot-irecommendthis', 'dot-irecommendthis' );
202
 
203
  } //dot_irecommendthis_settings
204
 
@@ -226,7 +234,7 @@ if ( ! class_exists( 'DOT_IRecommendThis' ) )
226
  <form action="options.php" method="post">
227
  <?php settings_fields( 'dot-irecommendthis' ); ?>
228
  <?php do_settings_sections( 'dot-irecommendthis' ); ?>
229
- <p class="submit"><input type="submit" class="button-primary" value="<?php _e( 'Save Changes', 'dot' ); ?>" /></p>
230
  </form>
231
  </div>
232
  </div> <!-- //main content -->
@@ -241,9 +249,9 @@ if ( ! class_exists( 'DOT_IRecommendThis' ) )
241
  ?>
242
 
243
  <p><?php _e('<a href="https://twitter.com/harishchouhan" class="twitter-follow-button" data-show-count="false">Follow @harishchouhan</a>
244
- <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>', 'dot'); ?><br />
245
- <?php _e('or Check out our other themes & plugins at <a href="http://www.dreamsonline.net">Dreams Online Themes</a>.', 'dot'); ?></p>
246
- <p><?php _e('This plugin allows your visitors to simply recommend or like your posts instead of commment it.', 'dot'); ?></p>
247
  <?php
248
  }
249
 
@@ -255,10 +263,10 @@ if ( ! class_exists( 'DOT_IRecommendThis' ) )
255
 
256
  echo '<input type="hidden" name="dot_irecommendthis_settings[add_to_posts]" value="0" />
257
  <label><input type="checkbox" name="dot_irecommendthis_settings[add_to_posts]" value="1"'. (($options['add_to_posts']) ? ' checked="checked"' : '') .' />
258
- '. __('Posts', 'dot') .'</label><br />
259
  <input type="hidden" name="dot_irecommendthis_settings[add_to_other]" value="0" />
260
  <label><input type="checkbox" name="dot_irecommendthis_settings[add_to_other]" value="1"'. (($options['add_to_other']) ? ' checked="checked"' : '') .' />
261
- '. __('All other pages like Index, Archive, etc.', 'dot') .'</label><br />';
262
  }
263
 
264
  function setting_hide_zero()
@@ -268,7 +276,7 @@ if ( ! class_exists( 'DOT_IRecommendThis' ) )
268
 
269
  echo '<input type="hidden" name="dot_irecommendthis_settings[hide_zero]" value="0" />
270
  <label><input type="checkbox" name="dot_irecommendthis_settings[hide_zero]" value="1"'. (($options['hide_zero']) ? ' checked="checked"' : '') .' />' .
271
- __('Hide count if count is zero', 'dot') . '</label>';
272
  }
273
 
274
  function setting_disable_unique_ip()
@@ -278,7 +286,7 @@ if ( ! class_exists( 'DOT_IRecommendThis' ) )
278
 
279
  echo '<input type="hidden" name="dot_irecommendthis_settings[disable_unique_ip]" value="0" />
280
  <label><input type="checkbox" name="dot_irecommendthis_settings[disable_unique_ip]" value="1"'. (($options['disable_unique_ip']) ? ' checked="checked"' : '') .' />' .
281
- __('Disable saving of IP Address. Will only save cookies to track user votes.', 'dot') . '</label>';
282
  }
283
 
284
  function setting_disable_css()
@@ -288,7 +296,7 @@ if ( ! class_exists( 'DOT_IRecommendThis' ) )
288
 
289
  echo '<input type="hidden" name="dot_irecommendthis_settings[disable_css]" value="0" />
290
  <label><input type="checkbox" name="dot_irecommendthis_settings[disable_css]" value="1"'. (($options['disable_css']) ? ' checked="checked"' : '') .' />' .
291
- __('I want to use my own CSS styles', 'dot') . '</label>';
292
  }
293
 
294
  function setting_text_zero_suffix()
@@ -297,7 +305,7 @@ if ( ! class_exists( 'DOT_IRecommendThis' ) )
297
  if( !isset($options['text_zero_suffix']) ) $options['text_zero_suffix'] = '';
298
 
299
  echo '<input type="text" name="dot_irecommendthis_settings[text_zero_suffix]" class="regular-text" value="'. $options['text_zero_suffix'] .'" /><br />
300
- <span class="description">'. __('Text to display after zero count. Leave blank for no text after the count.', 'dot') .'</span>';
301
  }
302
 
303
  function setting_text_one_suffix() {
@@ -305,7 +313,7 @@ if ( ! class_exists( 'DOT_IRecommendThis' ) )
305
  if( !isset($options['text_one_suffix']) ) $options['text_one_suffix'] = '';
306
 
307
  echo '<input type="text" name="dot_irecommendthis_settings[text_one_suffix]" class="regular-text" value="'. $options['text_one_suffix'] .'" /><br />
308
- <span class="description">'. __('Text to display after 1 person has recommended. Leave blank for no text after the count.', 'dot') .'</span>';
309
  }
310
 
311
  function setting_text_more_suffix()
@@ -314,7 +322,7 @@ if ( ! class_exists( 'DOT_IRecommendThis' ) )
314
  if( !isset($options['text_more_suffix']) ) $options['text_more_suffix'] = '';
315
 
316
  echo '<input type="text" name="dot_irecommendthis_settings[text_more_suffix]" class="regular-text" value="'. $options['text_more_suffix'] .'" /><br />
317
- <span class="description">'. __('Text to display after more than 1 person have recommended. Leave blank for no text after the count.', 'dot') .'</span>';
318
  }
319
 
320
  function setting_link_title_new()
@@ -323,7 +331,7 @@ if ( ! class_exists( 'DOT_IRecommendThis' ) )
323
  if( !isset($options['link_title_new']) ) $options['link_title_new'] = '';
324
 
325
  echo '<input type="text" name="dot_irecommendthis_settings[link_title_new]" class="regular-text" value="'. $options['link_title_new'] .'" /><br />
326
- <span class="description">'. __('Link Title element for posts not yet voted by a user.', 'dot') .'</span>';
327
  }
328
 
329
  function setting_link_title_active()
@@ -332,7 +340,7 @@ if ( ! class_exists( 'DOT_IRecommendThis' ) )
332
  if( !isset($options['link_title_active']) ) $options['link_title_active'] = '';
333
 
334
  echo '<input type="text" name="dot_irecommendthis_settings[link_title_active]" class="regular-text" value="'. $options['link_title_active'] .'" /><br />
335
- <span class="description">'. __('Link Title element for posts already voted by a user.', 'dot') .'</span>';
336
  }
337
 
338
  function setting_recommend_style()
@@ -341,19 +349,19 @@ if ( ! class_exists( 'DOT_IRecommendThis' ) )
341
  if( !isset($options['recommend_style']) ) $options['recommend_style'] = '0';
342
 
343
  echo '<label><input type="radio" name="dot_irecommendthis_settings[recommend_style]" value="0"'. (($options['recommend_style']) == "0" ? 'checked' : '') .' />
344
- '. __('Default style - Thumb', 'dot') .'</label><br />
345
 
346
  <label><input type="radio" name="dot_irecommendthis_settings[recommend_style]" value="1"'. (($options['recommend_style']) == "1" ? 'checked' : '') .' />
347
- '. __('Heart', 'dot') .'</label><br />';
348
  }
349
 
350
  function setting_instructions()
351
  {
352
- echo '<p>'. __('To use I Recomment This in your posts and pages you can use the shortcode:', 'dot') .'</p>
353
  <p><code>[dot_recommends]</code></p>
354
- <p>'. __('To use I Recomment This manually in your theme template use the following PHP code:', 'dot') .'</p>
355
  <p><code>&lt;?php if( function_exists(\'dot_irecommendthis\') ) dot_irecommendthis(); ?&gt;</code></p>
356
- <p>'. __('To show top recommended post from a particular date use below shortcode', 'dot') .'</p>
357
  <p><code>[dot_recommended_posts container=\'div\' post_type=\'showcase\' number=\'10\' year=\'2013\' monthnum=\'7\']</code></p>';
358
  }
359
 
@@ -596,7 +604,7 @@ if ( ! class_exists( 'DOT_IRecommendThis' ) )
596
 
597
  if( $options['link_title_new'] == '' ) {
598
 
599
- $title = __('Recommend this', 'dot');
600
 
601
  } else {
602
 
@@ -611,7 +619,7 @@ if ( ! class_exists( 'DOT_IRecommendThis' ) )
611
 
612
  if( $options['link_title_active'] == '' ) {
613
 
614
- $title = __('You already recommended this', 'dot');
615
 
616
  } else {
617
 
@@ -629,7 +637,7 @@ if ( ! class_exists( 'DOT_IRecommendThis' ) )
629
 
630
  if( $options['link_title_new'] == '' ) {
631
 
632
- $title = __('Recommend this', 'dot');
633
 
634
  } else {
635
 
@@ -644,7 +652,7 @@ if ( ! class_exists( 'DOT_IRecommendThis' ) )
644
 
645
  if( $options['link_title_active'] == '' ) {
646
 
647
- $title = __('You already recommended this', 'dot');
648
 
649
  } else {
650
 
@@ -776,8 +784,8 @@ if ( ! class_exists( 'DOT_IRecommendThis' ) )
776
  if (!is_array( $options ))
777
  {
778
  $options = array(
779
- 'title' => __('Most recommended posts', 'dot'),
780
- 'number' => __('5', 'dot'),
781
  'show_count' => '0'
782
  );
783
  }
@@ -795,14 +803,14 @@ if ( ! class_exists( 'DOT_IRecommendThis' ) )
795
  echo $after_widget;
796
  }
797
 
798
- wp_register_sidebar_widget('most_recommended_posts', __('Most recommended posts', 'dot'), 'widget_most_recommended_posts');
799
 
800
  function options_widget_most_recommended_posts() {
801
  $options = get_option("most_recommended_posts");
802
 
803
  if (!is_array( $options )) {
804
  $options = array(
805
- 'title' => __('Most recommended posts', 'dot'),
806
  'number' => __('5', 'dot'),
807
  'show_count' => '0'
808
  );
@@ -818,18 +826,18 @@ if ( ! class_exists( 'DOT_IRecommendThis' ) )
818
  update_option("most_recommended_posts", $options);
819
  }
820
  ?>
821
- <p><label for="mrp-title"><?php _e('Title:', 'dot'); ?><br />
822
  <input class="widefat" type="text" id="mrp-title" name="mrp-title" value="<?php echo $options['title'];?>" /></label></p>
823
 
824
- <p><label for="mrp-number"><?php _e('Number of posts to show:', 'dot'); ?><br />
825
  <input type="text" id="mrp-number" name="mrp-number" style="width: 25px;" value="<?php echo $options['number'];?>" /> <small>(max. 15)</small></label></p>
826
 
827
- <p><label for="mrp-show-count"><input type="checkbox" id="mrp-show-count" name="mrp-show-count" value="1"<?php if($options['show_count'] == '1') echo 'checked="checked"'; ?> /> <?php _e('Show post count', 'dot'); ?></label></p>
828
 
829
  <input type="hidden" id="mrp-submit" name="mrp-submit" value="1" />
830
  <?php
831
  }
832
- wp_register_widget_control('most_recommended_posts', __('Most recommended posts', 'dot'), 'options_widget_most_recommended_posts');
833
  }
834
 
835
 
@@ -873,13 +881,13 @@ if ( ! class_exists( 'DOT_IRecommendThis' ) )
873
  *--------------------------------------------*/
874
 
875
  function dot_columns_head($defaults) {
876
- $defaults['likes'] = __('Likes', 'dot');
877
  return $defaults;
878
  }
879
 
880
  function dot_column_content($column_name, $post_ID) {
881
  if ($column_name == 'likes')
882
- echo get_post_meta($post_ID, '_recommended', true) . ' ' . __('like', 'dot');
883
  }
884
 
885
  function dot_column_register_sortable( $columns ) {
1
  <?php
2
  /*
3
+ Plugin Name: I Recommend This
4
+ Plugin URI: https://themeist.com/plugins/wordpress/i-recommend-this/#utm_source=wp-plugin&utm_medium=i-recommend-this&utm_campaign=plugins-page
5
+ Description: This plugin allows your visitors to simply recommend or like your posts instead of commment it.
6
+ Version: 3.7.7
7
+ Author: themeist
8
+ Author URI: https://themeist.com/
9
+ Text Domain: i-recommend-this
10
+ Domain Path: /languages
11
+ License: GPL v3
12
+
13
+ I Recommend This WordPress Plugin
14
+ Copyright (C) 2012-2016, Harish Chouhan, me@harishchouhan.com
15
+
16
+ This program is free software: you can redistribute it and/or modify
17
+ it under the terms of the GNU General Public License as published by
18
+ the Free Software Foundation, either version 3 of the License, or
19
+ (at your option) any later version.
20
+
21
+ This program is distributed in the hope that it will be useful,
22
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
23
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24
+ GNU General Public License for more details.
25
+
26
+ You should have received a copy of the GNU General Public License
27
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
28
+ */
29
+
 
 
 
 
30
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
31
  if ( ! class_exists( 'DOT_IRecommendThis' ) )
32
  {
50
 
51
  // Load text domain
52
  add_action( 'init', array( &$this, 'load_localisation' ), 0 );
53
+
54
+ //add_action( 'plugins_loaded', 'i_recommend_this_load_plugin_textdomain' );
55
+ //add_action( 'plugins_loaded', array( &$this, 'i_recommend_this_load_plugin_textdomain' ), 0 );
56
 
57
  add_action( 'admin_menu', array( &$this, 'dot_irecommendthis_menu' ) );
58
  add_action( 'admin_init', array( &$this, 'dot_irecommendthis_settings' ) );
65
  add_shortcode( 'dot_recommends', array( &$this, 'shortcode' ) );
66
  add_shortcode( 'dot_recommended_posts', array( &$this, 'dot_recommended_top_posts' ) );
67
 
68
+
69
  } // end constructor
70
 
71
 
84
  id MEDIUMINT(9) NOT NULL AUTO_INCREMENT,
85
  time TIMESTAMP NOT NULL,
86
  post_id BIGINT(20) NOT NULL,
87
+ ip VARCHAR(45) NOT NULL,
88
  UNIQUE KEY id (id)
89
  );";
90
 
109
  }
110
  } // End register_plugin_version()
111
 
112
+ /**
113
+ * Load the plugin text domain for translation.
114
+ *
115
+ * @since 1.4.6
116
+ */
117
+ public function load_localisation () {
118
 
119
+ //load_plugin_textdomain( 'i-recommend-this', false, dirname( dirname( plugin_basename( __FILE__ ) ) ) . '/languages/' );
120
+ load_plugin_textdomain( 'i-recommend-this', false, dirname( plugin_basename( $this->file ) ) . '/languages/' );
121
+ //load_plugin_textdomain( 'i-recommend-this', false, dirname( plugin_basename( $this->file ) ) . '/languages/' );
122
 
123
 
124
  } // End load_localisation()
125
 
126
 
127
+ function i_recommend_this_load_plugin_textdomain() {
128
+ load_plugin_textdomain( 'i-recommend-this', FALSE, dirname( dirname( plugin_basename( __FILE__ ) ) ) . '/languages/' );
129
+ //load_plugin_textdomain( 'i-recommend-this', FALSE, basename( dirname( __FILE__ ) ) . '/languages/' );
130
+ }
131
+
132
+
133
 
134
  /*--------------------------------------------*
135
  * Enqueue Scripts
166
 
167
  function dot_irecommendthis_menu()
168
  {
169
+ $page_title = __('I Recommend This', 'i-recommend-this');
170
+ $menu_title = __('I Recommend This', 'i-recommend-this');
171
  $capability = 'manage_options';
172
  $menu_slug = 'dot-irecommendthis';
173
  $function = array( &$this, 'dot_settings_page');
186
 
187
  add_settings_section( 'dot-irecommendthis', '', array(&$this, 'section_intro'), 'dot-irecommendthis' );
188
 
189
+ add_settings_field( 'show_on', __( 'Automatically display on', 'i-recommend-this' ), array(&$this, 'setting_show_on'), 'dot-irecommendthis', 'dot-irecommendthis' );
190
 
191
+ add_settings_field( 'text_zero_suffix', __( 'Text after 0 Count', 'i-recommend-this' ), array(&$this, 'setting_text_zero_suffix'), 'dot-irecommendthis', 'dot-irecommendthis' );
192
 
193
+ add_settings_field( 'text_one_suffix', __( 'Text after 1 Count', 'i-recommend-this' ), array(&$this, 'setting_text_one_suffix'), 'dot-irecommendthis', 'dot-irecommendthis' );
194
 
195
+ add_settings_field( 'text_more_suffix', __( 'Text after more than 1 Count', 'i-recommend-this' ), array(&$this, 'setting_text_more_suffix'), 'dot-irecommendthis', 'dot-irecommendthis' );
196
 
197
+ add_settings_field( 'link_title_new', __( 'Title for New posts', 'i-recommend-this' ), array(&$this, 'setting_link_title_new'), 'dot-irecommendthis', 'dot-irecommendthis' );
198
 
199
+ add_settings_field( 'link_title_active', __( 'Title for already voted posts', 'i-recommend-this' ), array(&$this, 'setting_link_title_active'), 'dot-irecommendthis', 'dot-irecommendthis' );
200
 
201
+ add_settings_field( 'disable_css', __( 'Disable CSS', 'i-recommend-this' ), array(&$this, 'setting_disable_css'), 'dot-irecommendthis', 'dot-irecommendthis' );
202
 
203
+ add_settings_field( 'hide_zero', __( 'Hide Zero Count', 'i-recommend-this' ), array(&$this, 'setting_hide_zero'), 'dot-irecommendthis', 'dot-irecommendthis' );
204
 
205
+ add_settings_field( 'disable_unique_ip', __( 'Disable IP saving', 'i-recommend-this' ), array(&$this, 'setting_disable_unique_ip'), 'dot-irecommendthis', 'dot-irecommendthis' );
206
 
207
+ add_settings_field( 'recommend_style', __( 'Choose a style', 'i-recommend-this' ), array(&$this, 'setting_recommend_style'), 'dot-irecommendthis', 'dot-irecommendthis' );
208
 
209
+ add_settings_field( 'instructions', __( 'Shortcode and Template Tag', 'i-recommend-this' ), array(&$this, 'setting_instructions'), 'dot-irecommendthis', 'dot-irecommendthis' );
210
 
211
  } //dot_irecommendthis_settings
212
 
234
  <form action="options.php" method="post">
235
  <?php settings_fields( 'dot-irecommendthis' ); ?>
236
  <?php do_settings_sections( 'dot-irecommendthis' ); ?>
237
+ <p class="submit"><input type="submit" class="button-primary" value="<?php _e( 'Save Changes', 'i-recommend-this' ); ?>" /></p>
238
  </form>
239
  </div>
240
  </div> <!-- //main content -->
249
  ?>
250
 
251
  <p><?php _e('<a href="https://twitter.com/harishchouhan" class="twitter-follow-button" data-show-count="false">Follow @harishchouhan</a>
252
+ <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>', 'i-recommend-this'); ?><br />
253
+ <?php _e('or Check out our other themes & plugins at <a href="https://themeist.com">Themeist</a>.', 'i-recommend-this'); ?></p>
254
+ <p><?php _e('This plugin allows your visitors to simply recommend or like your posts instead of commment it.', 'i-recommend-this'); ?></p>
255
  <?php
256
  }
257
 
263
 
264
  echo '<input type="hidden" name="dot_irecommendthis_settings[add_to_posts]" value="0" />
265
  <label><input type="checkbox" name="dot_irecommendthis_settings[add_to_posts]" value="1"'. (($options['add_to_posts']) ? ' checked="checked"' : '') .' />
266
+ '. __('Posts', 'i-recommend-this') .'</label><br />
267
  <input type="hidden" name="dot_irecommendthis_settings[add_to_other]" value="0" />
268
  <label><input type="checkbox" name="dot_irecommendthis_settings[add_to_other]" value="1"'. (($options['add_to_other']) ? ' checked="checked"' : '') .' />
269
+ '. __('All other pages like Index, Archive, etc.', 'i-recommend-this') .'</label><br />';
270
  }
271
 
272
  function setting_hide_zero()
276
 
277
  echo '<input type="hidden" name="dot_irecommendthis_settings[hide_zero]" value="0" />
278
  <label><input type="checkbox" name="dot_irecommendthis_settings[hide_zero]" value="1"'. (($options['hide_zero']) ? ' checked="checked"' : '') .' />' .
279
+ __('Hide count if count is zero', 'i-recommend-this') . '</label>';
280
  }
281
 
282
  function setting_disable_unique_ip()
286
 
287
  echo '<input type="hidden" name="dot_irecommendthis_settings[disable_unique_ip]" value="0" />
288
  <label><input type="checkbox" name="dot_irecommendthis_settings[disable_unique_ip]" value="1"'. (($options['disable_unique_ip']) ? ' checked="checked"' : '') .' />' .
289
+ __('Disable saving of IP Address. Will only save cookies to track user votes.', 'i-recommend-this') . '</label>';
290
  }
291
 
292
  function setting_disable_css()
296
 
297
  echo '<input type="hidden" name="dot_irecommendthis_settings[disable_css]" value="0" />
298
  <label><input type="checkbox" name="dot_irecommendthis_settings[disable_css]" value="1"'. (($options['disable_css']) ? ' checked="checked"' : '') .' />' .
299
+ __('I want to use my own CSS styles', 'i-recommend-this') . '</label>';
300
  }
301
 
302
  function setting_text_zero_suffix()
305
  if( !isset($options['text_zero_suffix']) ) $options['text_zero_suffix'] = '';
306
 
307
  echo '<input type="text" name="dot_irecommendthis_settings[text_zero_suffix]" class="regular-text" value="'. $options['text_zero_suffix'] .'" /><br />
308
+ <span class="description">'. __('Text to display after zero count. Leave blank for no text after the count.', 'i-recommend-this') .'</span>';
309
  }
310
 
311
  function setting_text_one_suffix() {
313
  if( !isset($options['text_one_suffix']) ) $options['text_one_suffix'] = '';
314
 
315
  echo '<input type="text" name="dot_irecommendthis_settings[text_one_suffix]" class="regular-text" value="'. $options['text_one_suffix'] .'" /><br />
316
+ <span class="description">'. __('Text to display after 1 person has recommended. Leave blank for no text after the count.', 'i-recommend-this') .'</span>';
317
  }
318
 
319
  function setting_text_more_suffix()
322
  if( !isset($options['text_more_suffix']) ) $options['text_more_suffix'] = '';
323
 
324
  echo '<input type="text" name="dot_irecommendthis_settings[text_more_suffix]" class="regular-text" value="'. $options['text_more_suffix'] .'" /><br />
325
+ <span class="description">'. __('Text to display after more than 1 person have recommended. Leave blank for no text after the count.', 'i-recommend-this') .'</span>';
326
  }
327
 
328
  function setting_link_title_new()
331
  if( !isset($options['link_title_new']) ) $options['link_title_new'] = '';
332
 
333
  echo '<input type="text" name="dot_irecommendthis_settings[link_title_new]" class="regular-text" value="'. $options['link_title_new'] .'" /><br />
334
+ <span class="description">'. __('Link Title element for posts not yet voted by a user.', 'i-recommend-this') .'</span>';
335
  }
336
 
337
  function setting_link_title_active()
340
  if( !isset($options['link_title_active']) ) $options['link_title_active'] = '';
341
 
342
  echo '<input type="text" name="dot_irecommendthis_settings[link_title_active]" class="regular-text" value="'. $options['link_title_active'] .'" /><br />
343
+ <span class="description">'. __('Link Title element for posts already voted by a user.', 'i-recommend-this') .'</span>';
344
  }
345
 
346
  function setting_recommend_style()
349
  if( !isset($options['recommend_style']) ) $options['recommend_style'] = '0';
350
 
351
  echo '<label><input type="radio" name="dot_irecommendthis_settings[recommend_style]" value="0"'. (($options['recommend_style']) == "0" ? 'checked' : '') .' />
352
+ '. __('Default style - Thumb', 'i-recommend-this') .'</label><br />
353
 
354
  <label><input type="radio" name="dot_irecommendthis_settings[recommend_style]" value="1"'. (($options['recommend_style']) == "1" ? 'checked' : '') .' />
355
+ '. __('Heart', 'i-recommend-this') .'</label><br />';
356
  }
357
 
358
  function setting_instructions()
359
  {
360
+ echo '<p>'. __('To use I Recomment This in your posts and pages you can use the shortcode:', 'i-recommend-this') .'</p>
361
  <p><code>[dot_recommends]</code></p>
362
+ <p>'. __('To use I Recomment This manually in your theme template use the following PHP code:', 'i-recommend-this') .'</p>
363
  <p><code>&lt;?php if( function_exists(\'dot_irecommendthis\') ) dot_irecommendthis(); ?&gt;</code></p>
364
+ <p>'. __('To show top recommended post from a particular date use below shortcode', 'i-recommend-this') .'</p>
365
  <p><code>[dot_recommended_posts container=\'div\' post_type=\'showcase\' number=\'10\' year=\'2013\' monthnum=\'7\']</code></p>';
366
  }
367
 
604
 
605
  if( $options['link_title_new'] == '' ) {
606
 
607
+ $title = __('Recommend this', 'i-recommend-this');
608
 
609
  } else {
610
 
619
 
620
  if( $options['link_title_active'] == '' ) {
621
 
622
+ $title = __('You already recommended this', 'i-recommend-this');
623
 
624
  } else {
625
 
637
 
638
  if( $options['link_title_new'] == '' ) {
639
 
640
+ $title = __('Recommend this', 'i-recommend-this');
641
 
642
  } else {
643
 
652
 
653
  if( $options['link_title_active'] == '' ) {
654
 
655
+ $title = __('You already recommended this', 'i-recommend-this');
656
 
657
  } else {
658
 
784
  if (!is_array( $options ))
785
  {
786
  $options = array(
787
+ 'title' => __('Most recommended posts', 'i-recommend-this'),
788
+ 'number' => __('5', 'i-recommend-this'),
789
  'show_count' => '0'
790
  );
791
  }
803
  echo $after_widget;
804
  }
805
 
806
+ wp_register_sidebar_widget('most_recommended_posts', __('Most recommended posts', 'i-recommend-this'), 'widget_most_recommended_posts');
807
 
808
  function options_widget_most_recommended_posts() {
809
  $options = get_option("most_recommended_posts");
810
 
811
  if (!is_array( $options )) {
812
  $options = array(
813
+ 'title' => __('Most recommended posts', 'i-recommend-this'),
814
  'number' => __('5', 'dot'),
815
  'show_count' => '0'
816
  );
826
  update_option("most_recommended_posts", $options);
827
  }
828
  ?>
829
+ <p><label for="mrp-title"><?php _e('Title:', 'i-recommend-this'); ?><br />
830
  <input class="widefat" type="text" id="mrp-title" name="mrp-title" value="<?php echo $options['title'];?>" /></label></p>
831
 
832
+ <p><label for="mrp-number"><?php _e('Number of posts to show:', 'i-recommend-this'); ?><br />
833
  <input type="text" id="mrp-number" name="mrp-number" style="width: 25px;" value="<?php echo $options['number'];?>" /> <small>(max. 15)</small></label></p>
834
 
835
+ <p><label for="mrp-show-count"><input type="checkbox" id="mrp-show-count" name="mrp-show-count" value="1"<?php if($options['show_count'] == '1') echo 'checked="checked"'; ?> /> <?php _e('Show post count', 'i-recommend-this'); ?></label></p>
836
 
837
  <input type="hidden" id="mrp-submit" name="mrp-submit" value="1" />
838
  <?php
839
  }
840
+ wp_register_widget_control('most_recommended_posts', __('Most recommended posts', 'i-recommend-this'), 'options_widget_most_recommended_posts');
841
  }
842
 
843
 
881
  *--------------------------------------------*/
882
 
883
  function dot_columns_head($defaults) {
884
+ $defaults['likes'] = __('Likes', 'i-recommend-this');
885
  return $defaults;
886
  }
887
 
888
  function dot_column_content($column_name, $post_ID) {
889
  if ($column_name == 'likes')
890
+ echo get_post_meta($post_ID, '_recommended', true) . ' ' . __('like', 'i-recommend-this');
891
  }
892
 
893
  function dot_column_register_sortable( $columns ) {
languages/{dot-en.mo → i-recommend-this-en.mo} RENAMED
File without changes
languages/{dot-en.po → i-recommend-this-en.po} RENAMED
File without changes
languages/{dot-es.ES.mo → i-recommend-this-es_ES.mo} RENAMED
File without changes
languages/{dot-es.ES.po → i-recommend-this-es_ES.po} RENAMED
File without changes
languages/{dot-fa_IR.mo → i-recommend-this-fa_IR.mo} RENAMED
File without changes
languages/{dot-fa_IR.po → i-recommend-this-fa_IR.po} RENAMED
File without changes
languages/{dot-fr_FR.mo → i-recommend-this-fr_FR.mo} RENAMED
File without changes
languages/{dot-fr_FR.po → i-recommend-this-fr_FR.po} RENAMED
File without changes
languages/i-recommend-this-nl_NL.mo ADDED
Binary file
languages/i-recommend-this-nl_NL.po ADDED
@@ -0,0 +1 @@
 
1
+ msgid ""
languages/{dot-pt_BR.mo → i-recommend-this-pt_BR.mo} RENAMED
File without changes
languages/{dot-pt_BR.po → i-recommend-this-pt_BR.po} RENAMED
File without changes
readme.txt CHANGED
@@ -1,11 +1,10 @@
1
  === Plugin Name ===
2
- Contributors: hchouhan, themeist, dreamsmedia, Benoit "LeBen" Burgener
3
- Donate link: http://themeist.co
4
  Tags: recommend, like, love, post, rate, rating, post rating, heart, dribbble like, tumblr like
5
  Requires at least: 4.0
6
- Tested up to: 4.2.1
7
- Stable tag: 3.7.6
8
- Last Updated: 2014-May-06
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -49,6 +48,7 @@ This plugin allows your visitors to simply like/recommend your posts instead of
49
  - Portuguese (pt_BR) - [Darlan ten Caten](http://i9solucoesdigitais.com.br/)
50
  - Persian (fa_IR) - [Hossein Soroor Golshani](http://profiles.wordpress.org/HSG/)
51
  - Spanish (es_ES) - [Andrew Kurtis - WebHostingHub](http://www.webhostinghub.com/)
 
52
 
53
  If you have created your own language pack (or have an update of an existing one) you can send in your .PO and .MO files so we can bundle it into I Recommend This plugin. You can [download the latest POT file](http://plugins.svn.wordpress.org/i-recommend-this/trunk/languages/dot-en.po), and [PO files in each language](http://plugins.svn.wordpress.org/i-recommend-this/trunk/languages/).
54
 
@@ -99,6 +99,10 @@ You can also visit the [support center](http://www.dreamsonline.net/wordpress-pl
99
 
100
  == Changelog ==
101
 
 
 
 
 
102
  = 3.7.6
103
  * Fixed version number in dot-irecommendthis.php
104
 
1
  === Plugin Name ===
2
+ Contributors: themeist, hchouhan
3
+ Donate link: http://themeist.com
4
  Tags: recommend, like, love, post, rate, rating, post rating, heart, dribbble like, tumblr like
5
  Requires at least: 4.0
6
+ Tested up to: 4.5.2
7
+ Stable tag: 3.7.7
 
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
48
  - Portuguese (pt_BR) - [Darlan ten Caten](http://i9solucoesdigitais.com.br/)
49
  - Persian (fa_IR) - [Hossein Soroor Golshani](http://profiles.wordpress.org/HSG/)
50
  - Spanish (es_ES) - [Andrew Kurtis - WebHostingHub](http://www.webhostinghub.com/)
51
+ - Dutch (nl_NL) - [Tim de Hoog](https://www.timdehoog.nl/)
52
 
53
  If you have created your own language pack (or have an update of an existing one) you can send in your .PO and .MO files so we can bundle it into I Recommend This plugin. You can [download the latest POT file](http://plugins.svn.wordpress.org/i-recommend-this/trunk/languages/dot-en.po), and [PO files in each language](http://plugins.svn.wordpress.org/i-recommend-this/trunk/languages/).
54
 
99
 
100
  == Changelog ==
101
 
102
+ = 3.7.7
103
+ * Dutch Translation added by Tim de Hoog
104
+ * Added support for IPv6
105
+
106
  = 3.7.6
107
  * Fixed version number in dot-irecommendthis.php
108