I Recommend This - Version 2.4.0

Version Description

Download this release

Release Info

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

Code changes from version 2.3.1 to 2.4.0

Files changed (2) hide show
  1. dot-irecommendthis.php +25 -6
  2. readme.txt +8 -2
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.3.1
7
  * Author: Harish Chouhan
8
  * Author URI: http://www.harishchouhan.com
9
  * Author Email: me@harishchouhan.com
@@ -38,7 +38,7 @@ if ( ! class_exists( 'DOT_IRecommendThis' ) )
38
 
39
  class DOT_IRecommendThis {
40
 
41
- public $version = '2.3.0';
42
 
43
  /*--------------------------------------------*
44
  * Constructor
@@ -434,6 +434,7 @@ if ( ! class_exists( 'DOT_IRecommendThis' ) )
434
  $text_one_suffix = strip_tags($text_one_suffix);
435
  $text_more_suffix = strip_tags($text_more_suffix);
436
 
 
437
  switch($action) {
438
 
439
  case 'get':
@@ -458,10 +459,16 @@ if ( ! class_exists( 'DOT_IRecommendThis' ) )
458
 
459
 
460
  if( ($recommended == 0) && $options['hide_zero'] == 1 ) {
461
- return '<span class="dot-irecommendthis-count">&nbsp;</span> <span class="dot-irecommendthis-suffix">'. $suffix .'</span>';
 
 
 
462
 
463
  } else {
464
- return '<span class="dot-irecommendthis-count">'. $recommended .'</span> <span class="dot-irecommendthis-suffix">'. $suffix .'</span>';
 
 
 
465
 
466
  }
467
 
@@ -515,7 +522,12 @@ if ( ! class_exists( 'DOT_IRecommendThis' ) )
515
  elseif( $recommended == 1 ) { $suffix = $text_one_suffix; }
516
  else { $suffix = $text_more_suffix; }
517
 
518
- return '<span class="dot-irecommendthis-count">'. $recommended .'</span> <span class="dot-irecommendthis-suffix">'. $suffix .'</span>';
 
 
 
 
 
519
  break;
520
 
521
  }
@@ -634,7 +646,14 @@ if ( ! class_exists( 'DOT_IRecommendThis' ) )
634
 
635
  }
636
 
637
- return '<a href="#" class="'. $class .'" id="dot-irecommendthis-'. $post_ID .'" title="'. $title .'">'. $output .'</a>';
 
 
 
 
 
 
 
638
  }
639
 
640
 
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.4.0
7
  * Author: Harish Chouhan
8
  * Author URI: http://www.harishchouhan.com
9
  * Author Email: me@harishchouhan.com
38
 
39
  class DOT_IRecommendThis {
40
 
41
+ public $version = '2.4.0';
42
 
43
  /*--------------------------------------------*
44
  * Constructor
434
  $text_one_suffix = strip_tags($text_one_suffix);
435
  $text_more_suffix = strip_tags($text_more_suffix);
436
 
437
+
438
  switch($action) {
439
 
440
  case 'get':
459
 
460
 
461
  if( ($recommended == 0) && $options['hide_zero'] == 1 ) {
462
+
463
+ $output = '<span class="dot-irecommendthis-count">&nbsp;</span> <span class="dot-irecommendthis-suffix">'. $suffix .'</span>';
464
+
465
+ return $output;
466
 
467
  } else {
468
+
469
+ $output = '<span class="dot-irecommendthis-count">'. $recommended .'</span> <span class="dot-irecommendthis-suffix">'. $suffix .'</span>';
470
+
471
+ return $output;
472
 
473
  }
474
 
522
  elseif( $recommended == 1 ) { $suffix = $text_one_suffix; }
523
  else { $suffix = $text_more_suffix; }
524
 
525
+ $output = '<span class="dot-irecommendthis-count">'. $recommended .'</span> <span class="dot-irecommendthis-suffix">'. $suffix .'</span>';
526
+
527
+ $dot_irt_html .= apply_filters( 'dot_irt_before_count', $output );
528
+
529
+ return $dot_irt_html;
530
+
531
  break;
532
 
533
  }
646
 
647
  }
648
 
649
+ $dot_irt_html = '<a href="#" class="'. $class .'" id="dot-irecommendthis-'. $post_ID .'" title="'. $title .'">';
650
+
651
+ $dot_irt_html .= apply_filters( 'dot_irt_before_count', $output );
652
+ $dot_irt_html .= '</a>';
653
+
654
+ return $dot_irt_html;
655
+
656
+ //return '<a href="#" class="'. $class .'" id="dot-irecommendthis-'. $post_ID .'" title="'. $title .'"><i class="icon-heart"></i> '. $output .'</a>';
657
  }
658
 
659
 
readme.txt CHANGED
@@ -4,8 +4,8 @@ Donate link: http://www.dreamsonline.net
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.3.1
8
- Last Updated: 2013-June-30
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -37,6 +37,8 @@ Please report any bugs you find via http://www.dreamsonline.net/wordpress-plugin
37
 
38
  = Examples of how the plugin has been used =
39
 
 
 
40
  * [Harish's blog](http://www.harishchouhan.com/blog/) - Please leave your suggestions here.
41
 
42
 
@@ -72,6 +74,10 @@ You can also visit the [support center](http://www.dreamsonline.net/wordpress-pl
72
 
73
  == Changelog ==
74
 
 
 
 
 
75
  = 2.3.0
76
  * Added option to hide count if count is zero
77
  * Added option to disable saving of IP address in the database
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.4.0
8
+ Last Updated: 2013-July-15
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
37
 
38
  = Examples of how the plugin has been used =
39
 
40
+ * [Flat UI Design Gallery](http://flattrendz.com) - Example usage in website Design Gallery
41
+
42
  * [Harish's blog](http://www.harishchouhan.com/blog/) - Please leave your suggestions here.
43
 
44
 
74
 
75
  == Changelog ==
76
 
77
+ = 2.4.0
78
+ * Added filter dot_irt_before_count to be able to allow custom content or icons before the count.
79
+
80
+
81
  = 2.3.0
82
  * Added option to hide count if count is zero
83
  * Added option to disable saving of IP address in the database