Version Description
- Bug Fix: RSS Killing Script Moved To Head
Download this release
Release Info
Developer | weblizar |
Plugin | Pinterest Pin It Button On Image Hover And Post |
Version | 1.1 |
Comparing to | |
See all releases |
Code changes from version 1.0 to 1.1
- pinterest-pin-It-button.php +18 -26
- readme.txt +5 -2
- template.php +6 -6
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.
|
5 |
* Description: Pin Your WordPress Blog Posts Pages Images With Pinterest
|
6 |
* Author: Weblizar
|
7 |
* Author URI: http://weblizar.com/plugins/
|
@@ -41,50 +41,41 @@ function PiniIt_DefaultSettings(){
|
|
41 |
add_option("WL_Pinit_Btn_Size", "small");
|
42 |
}
|
43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
|
45 |
//Add Pin It Button After Post Content
|
46 |
function Load_pin_it_button_after_post_content($content){
|
47 |
if (is_single()) {
|
48 |
-
//load saved pin it settings
|
49 |
-
$PinItPost = get_option("WL_Enable_Pinit_Post");
|
50 |
-
$PinItPage = get_option("WL_Enable_Pinit_Page");
|
51 |
-
$PinItOnHover = get_option("WL_Pinit_Btn_On_Hover");
|
52 |
-
$PinItDesign = get_option("WL_Pinit_Btn_Design");
|
53 |
-
$PinItColor = get_option("WL_Pinit_Btn_Color");
|
54 |
-
$PinItSize = get_option("WL_Pinit_Btn_Size");
|
55 |
-
|
56 |
//check for enable post pin it button
|
|
|
57 |
if(get_option("WL_Enable_Pinit_Post")) {
|
58 |
$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>';
|
59 |
-
}
|
60 |
-
if($PinItOnHover == "true"){ ?>
|
61 |
-
<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>
|
62 |
-
<?php
|
63 |
-
}
|
64 |
}
|
65 |
return $content;
|
66 |
}
|
67 |
add_filter( "the_content", "Load_pin_it_button_after_post_content" );
|
68 |
|
|
|
69 |
//Add Pin It Button After Page Content
|
70 |
function Load_pin_it_button_after_page_content($content){
|
71 |
if (!is_single()) {
|
72 |
-
//load saved pin it settings
|
73 |
-
$PinItPost = get_option("WL_Enable_Pinit_Post");
|
74 |
-
$PinItPage = get_option("WL_Enable_Pinit_Page");
|
75 |
-
$PinItOnHover = get_option("WL_Pinit_Btn_On_Hover");
|
76 |
-
$PinItDesign = get_option("WL_Pinit_Btn_Design");
|
77 |
-
$PinItColor = get_option("WL_Pinit_Btn_Color");
|
78 |
-
$PinItSize = get_option("WL_Pinit_Btn_Size");
|
79 |
-
|
80 |
//check for enable page pin it button
|
|
|
81 |
if(get_option("WL_Enable_Pinit_Page")) {
|
82 |
$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>';
|
83 |
}
|
84 |
-
if($PinItOnHover == "true"){ ?>
|
85 |
-
<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>
|
86 |
-
<?php
|
87 |
-
}
|
88 |
}
|
89 |
return $content;
|
90 |
}
|
@@ -92,6 +83,7 @@ function Load_pin_it_button_after_page_content($content){
|
|
92 |
add_filter( "the_content", "Load_pin_it_button_after_page_content" );
|
93 |
|
94 |
|
|
|
95 |
/**
|
96 |
* Plugin Settings Admin Menu
|
97 |
*/
|
1 |
<?php
|
2 |
/**
|
3 |
* Plugin Name: Pinterest Pin It Button On Image Hover And Post
|
4 |
+
* Version: 1.1
|
5 |
* Description: Pin Your WordPress Blog Posts Pages Images With Pinterest
|
6 |
* Author: Weblizar
|
7 |
* Author URI: http://weblizar.com/plugins/
|
41 |
add_option("WL_Pinit_Btn_Size", "small");
|
42 |
}
|
43 |
|
44 |
+
//Load saved pin it button settings
|
45 |
+
$PinItOnHover = get_option("WL_Pinit_Btn_On_Hover");
|
46 |
+
if($PinItOnHover == "true"){
|
47 |
+
// Add hook for frontend <head></head>
|
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;
|
67 |
}
|
68 |
add_filter( "the_content", "Load_pin_it_button_after_post_content" );
|
69 |
|
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;
|
81 |
}
|
83 |
add_filter( "the_content", "Load_pin_it_button_after_page_content" );
|
84 |
|
85 |
|
86 |
+
|
87 |
/**
|
88 |
* Plugin Settings Admin Menu
|
89 |
*/
|
readme.txt
CHANGED
@@ -5,8 +5,8 @@ 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.3
|
8 |
-
Tested up to: 4.1
|
9 |
-
Stable tag: 1.
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
@@ -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 |
= 1.0 =
|
46 |
* New: Show Pinterest Pin It Button On Image Hover
|
47 |
* New: Show Pinterest Pin It Button In Post
|
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.3
|
8 |
+
Tested up to: 4.1.1
|
9 |
+
Stable tag: 1.1
|
10 |
License: GPLv2 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
12 |
|
42 |
|
43 |
For more information, see [Weblizar](http://wwww.weblizar.com/).
|
44 |
|
45 |
+
= 1.1 =
|
46 |
+
* Bug Fix: RSS Killing Script Moved To Head
|
47 |
+
|
48 |
= 1.0 =
|
49 |
* New: Show Pinterest Pin It Button On Image Hover
|
50 |
* New: Show Pinterest Pin It Button In Post
|
template.php
CHANGED
@@ -215,12 +215,12 @@ function SaveSettings(){
|
|
215 |
type: "POST",
|
216 |
url: ajaxurl,
|
217 |
data: { action: "save_pinit",
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
},
|
225 |
dataType: 'html',
|
226 |
complete : function() { },
|
215 |
type: "POST",
|
216 |
url: ajaxurl,
|
217 |
data: { action: "save_pinit",
|
218 |
+
PinItPost: jQuery("input[name=pinitpost]:radio:checked").val(),
|
219 |
+
PinItPage: jQuery("input[name=pinitpage]:radio:checked").val(),
|
220 |
+
PinItOnHover: jQuery("input[name=pinitonhover]:radio:checked").val(),
|
221 |
+
PinItColor: jQuery("select#pinitcolor").val(),
|
222 |
+
PinItDesign: jQuery("select#pinitdesign").val(),
|
223 |
+
PinItSize: jQuery("select#pinitsize").val()
|
224 |
},
|
225 |
dataType: 'html',
|
226 |
complete : function() { },
|