Pinterest Pin It Button On Image Hover And Post - Version 1.3

Version Description

= 0.1 = Starter version no upgrade is required.

Download this release

Release Info

Developer weblizar
Plugin Icon 128x128 Pinterest Pin It Button On Image Hover And Post
Version 1.3
Comparing to
See all releases

Code changes from version 1.2 to 1.3

Files changed (3) hide show
  1. pinterest-pin-It-button.php +9 -9
  2. readme.txt +6 -3
  3. template.php +2 -2
pinterest-pin-It-button.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
- * Plugin Name: Pinterest Pin It Button On Image Hover And Post
4
- * Version: 1.2
5
  * Description: Pin Your WordPress Blog Posts Pages Images With Pinterest
6
  * Author: Weblizar
7
  * Author URI: http://weblizar.com/plugins/
@@ -48,19 +48,19 @@ if($PinItOnHover == "true"){
48
  add_action('wp_head', 'wl_pinit_js');
49
  }
50
  function wl_pinit_js() {
51
- $PinItOnHover = get_option("WL_Pinit_Btn_On_Hover");
52
- $PinItColor = get_option("WL_Pinit_Btn_Color");
53
  $PinItSize = get_option("WL_Pinit_Btn_Size");
54
- ?><script type="text/javascript" async defer data-pin-color="<?php echo $PinItColor; ?>" <?php if($PinItSize == "large") { ?>data-pin-height="28"<?php }?> data-pin-hover="<?php echo $PinItOnHover; ?>" src="<?php echo WEBLIZAR_PINIT_PLUGIN_URL."js/pinit.js"; ?>"></script><?php
55
  }
56
 
57
  //Add Pin It Button After Post Content
58
  function Load_pin_it_button_after_post_content($content){
59
- if (is_single()) {
60
  //check for enable post pin it button
61
  $PinItPost = get_option("WL_Enable_Pinit_Post");
62
  if(get_option("WL_Enable_Pinit_Post")) {
63
- $content .= '<p><a href="//www.pinterest.com/pin/create/button/" data-pin-do="buttonBookmark" data-pin-color="red" data-pin-height="28"><img src="//assets.pinterest.com/images/pidgets/pinit_fg_en_rect_red_28.png" /></a></p>';
64
  }
65
  }
66
  return $content;
@@ -70,11 +70,11 @@ add_filter( "the_content", "Load_pin_it_button_after_post_content" );
70
 
71
  //Add Pin It Button After Page Content
72
  function Load_pin_it_button_after_page_content($content){
73
- if (!is_single()) {
74
  //check for enable page pin it button
75
  $PinItPage = get_option("WL_Enable_Pinit_Page");
76
  if(get_option("WL_Enable_Pinit_Page")) {
77
- $content .= '<p><a href="//www.pinterest.com/pin/create/button/" data-pin-do="buttonBookmark" data-pin-color="red" data-pin-height="28"><img src="//assets.pinterest.com/images/pidgets/pinit_fg_en_rect_red_28.png" /></a></p>';
78
  }
79
  }
80
  return $content;
1
  <?php
2
  /**
3
+ * Plugin Name: Pinterest Pin It Button On Image Hover And After Post & Page Content
4
+ * Version: 1.3
5
  * Description: Pin Your WordPress Blog Posts Pages Images With Pinterest
6
  * Author: Weblizar
7
  * Author URI: http://weblizar.com/plugins/
48
  add_action('wp_head', 'wl_pinit_js');
49
  }
50
  function wl_pinit_js() {
51
+ $PinItOnHover = get_option("WL_Pinit_Btn_On_Hover");
52
+ $PinItColor = get_option("WL_Pinit_Btn_Color");
53
  $PinItSize = get_option("WL_Pinit_Btn_Size");
54
+ ?><script type="text/javascript" async defer data-pin-color="<?php echo $PinItColor; ?>" <?php if($PinItSize == "large") { ?>data-pin-height="28"<?php }?> data-pin-hover="<?php echo $PinItOnHover; ?>" src="<?php echo WEBLIZAR_PINIT_PLUGIN_URL."js/pinit.js"; ?>"></script><?php
55
  }
56
 
57
  //Add Pin It Button After Post Content
58
  function Load_pin_it_button_after_post_content($content){
59
+ if (is_single() && get_post_type( $post ) == "post") {
60
  //check for enable post pin it button
61
  $PinItPost = get_option("WL_Enable_Pinit_Post");
62
  if(get_option("WL_Enable_Pinit_Post")) {
63
+ $content .= '<p><a href="//www.pinterest.com/pin/create/button/" data-pin-do="buttonBookmark" data-pin-color="red" data-pin-height="128"><img src="//assets.pinterest.com/images/pidgets/pinit_fg_en_rect_red_28.png" /></a></p>';
64
  }
65
  }
66
  return $content;
70
 
71
  //Add Pin It Button After Page Content
72
  function Load_pin_it_button_after_page_content($content){
73
+ if (!is_single() && get_post_type( $post ) == "page") {
74
  //check for enable page pin it button
75
  $PinItPage = get_option("WL_Enable_Pinit_Page");
76
  if(get_option("WL_Enable_Pinit_Page")) {
77
+ $content .= '<p><a href="//www.pinterest.com/pin/create/button/" data-pin-do="buttonBookmark" data-pin-color="red" data-pin-height="28"><img src="//assets.pinterest.com/images/pidgets/pinit_fg_en_rect_red_28.png" /></a></p>';
78
  }
79
  }
80
  return $content;
readme.txt CHANGED
@@ -5,12 +5,12 @@ Contributors: weblizar
5
  Donate link: http://www.weblizar.com/
6
  Tags: advanced pinterest, board, feed, free, free pinterest widget, image, images, media, photo, photo share plugin, photos, pin it, pin it button, pinter pin display, pinterest, pinterest board, pinterest button, pinterest display, Pinterest Feed, pinterest follow, pinterest follow badge, pinterest follow button, pinterest pin, pinterest pin button, pinterest pin it button, pinterest share, pinterest widget, rss, sidebar, social, social button, social media, social share, social share plugin, widget, wordpress, wordpress widget, pinterest pin it button on hover, pin it on hover, pin it image, pin image, pin it button ob post,
7
  Requires at least: 3.5
8
- Tested up to: 4.2
9
- Stable tag: 1.2
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
13
- Pin Your WordPress Blog Posts Pages Images With Pinterest
14
 
15
  == Description ==
16
 
@@ -42,6 +42,9 @@ Pinterest pin it button on image hover plugin provides facility to pins your blo
42
 
43
  For more information, see [Weblizar](http://wwww.weblizar.com/).
44
 
 
 
 
45
  = Version 1.2 22-Apr-2015 =
46
  * New: WordPress 4.2 Compatible
47
 
5
  Donate link: http://www.weblizar.com/
6
  Tags: advanced pinterest, board, feed, free, free pinterest widget, image, images, media, photo, photo share plugin, photos, pin it, pin it button, pinter pin display, pinterest, pinterest board, pinterest button, pinterest display, Pinterest Feed, pinterest follow, pinterest follow badge, pinterest follow button, pinterest pin, pinterest pin button, pinterest pin it button, pinterest share, pinterest widget, rss, sidebar, social, social button, social media, social share, social share plugin, widget, wordpress, wordpress widget, pinterest pin it button on hover, pin it on hover, pin it image, pin image, pin it button ob post,
7
  Requires at least: 3.5
8
+ Tested up to: 4.2.2
9
+ Stable tag: 1.3
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
13
+ Pin Your WordPress Blog Posts Pages Images With Pinterest Plugin
14
 
15
  == Description ==
16
 
42
 
43
  For more information, see [Weblizar](http://wwww.weblizar.com/).
44
 
45
+ = Version 1.3 23-May-2015 =
46
+ * Bug Fix: In Page / Post pin it button appearing according to settings now
47
+
48
  = Version 1.2 22-Apr-2015 =
49
  * New: WordPress 4.2 Compatible
50
 
template.php CHANGED
@@ -172,8 +172,8 @@
172
  </div>
173
  <hr>
174
 
175
- <button id="pinitsave" name="pinitsave" class="btn btn-primary btn-lg" type="button" onclick="return SaveSettings();"><i class="fa fa-save"></i> Settings</button>
176
- <p id="loading" name="loading" style="display: none;"><i class="fa fa-cog fa-spin fa-3x"></i></p>
177
  </div>
178
 
179
  <div id="need-help-tab" class="tab-pane fade">
172
  </div>
173
  <hr>
174
 
175
+ <button id="pinitsave" name="pinitsave" class="btn btn-primary btn-lg" type="button" onclick="return SaveSettings();"><i class="fa fa-save fa-2x"></i> Settings</button>
176
+ <p id="loading" name="loading" style="display: none;"><i class="fa fa-cog fa-spin fa-5x"></i></p>
177
  </div>
178
 
179
  <div id="need-help-tab" class="tab-pane fade">