Version Description
- Retweet floating share bar "username" bug fixed
- Smarter tracing of images in a post for pinterest
- Revised code for getting post details
- Bug fixed in the "title" tag for twitter in the urlencoding of hyphen.
- Bug fixed in the mailto link for the "email" button
- Changed hover title of "add to favorites"
- Cleared various "error notices" in the front end
- Fixed several "&" to "&" conversion for the social buttons
- Fixed no "alt" attribute to retweet and pinterest buttons
- Fixed several "W3 Validator" errors
- Admin interface tweaked and now more helpful and easy
- Admin page tabs are renamed
- Admin page "In posts and pages" is renamed to "Shortcodes"
- Bug fixed in the publisher key field in the admin page
- Removed url encoding for Sharethis buttons
- Fixed Facebook send form "Clipping"
Download this release
Release Info
Developer | vaakash |
Plugin | WP Socializer |
Version | 2.4.6 |
Comparing to | |
See all releases |
Code changes from version 2.4.5 to 2.4.6
- admin/images/anpn-thumb.png +0 -0
- admin/images/anpn.png +0 -0
- admin/images/demo.png +0 -0
- admin/images/donate.png +0 -0
- admin/images/purchase.png +0 -0
- admin/wpsr-admin-css.css +73 -8
- admin/wpsr-admin-floating-bar.php +0 -5
- admin/wpsr-admin-js.js +13 -2
- admin/wpsr-admin-other.php +3 -3
- admin/wpsr-admin.php +52 -81
- includes/wpsr-addthis.php +2 -1
- includes/wpsr-google.php +2 -2
- includes/wpsr-other.php +5 -5
- includes/wpsr-retweet.php +3 -2
- includes/wpsr-sharethis.php +4 -4
- includes/wpsr-shortcodes.php +4 -1
- includes/wpsr-socialbuttons.php +8 -5
- public/css/wp-socializer-buttons-css.css +5 -1
- readme.txt +58 -27
- wp-socializer.php +78 -54
admin/images/anpn-thumb.png
ADDED
Binary file
|
admin/images/anpn.png
ADDED
Binary file
|
admin/images/demo.png
ADDED
Binary file
|
admin/images/donate.png
CHANGED
Binary file
|
admin/images/purchase.png
ADDED
Binary file
|
admin/wpsr-admin-css.css
CHANGED
@@ -1,13 +1,14 @@
|
|
1 |
/*
|
2 |
* Admin Page CSS for WP Socializer plugin
|
3 |
* Author : Aakash Chakravarthy
|
4 |
-
* Version : 1.
|
5 |
*/
|
6 |
|
7 |
.wrap{
|
8 |
margin: 15px auto 15px;
|
9 |
width: 630px;
|
10 |
padding: 0px;
|
|
|
11 |
}
|
12 |
.wrap #content{
|
13 |
background: #FFFFFF;
|
@@ -101,7 +102,7 @@
|
|
101 |
border-radius: 0px 0px 10px 10px;
|
102 |
}
|
103 |
.wrap .footer #wpsr_submit{
|
104 |
-
padding: 5px 30px
|
105 |
}
|
106 |
|
107 |
/****************************/
|
@@ -163,17 +164,18 @@
|
|
163 |
|
164 |
#subTabs{
|
165 |
background: #EAFBFF url(images/orange-bg.png) repeat-x;
|
166 |
-
padding:
|
167 |
margin: 0px -15px 10px;
|
168 |
border-bottom: 1px dashed #dfdfdf;
|
169 |
}
|
170 |
#subTabs li{
|
171 |
float: left;
|
172 |
margin: 0px 5px 0px 0px;
|
|
|
173 |
}
|
174 |
#subTabs li a{
|
175 |
text-decoration: none;
|
176 |
-
padding:
|
177 |
}
|
178 |
#subTabs .ui-state-active a{
|
179 |
background: #FBFBFB;
|
@@ -508,9 +510,10 @@
|
|
508 |
font: 12px/2 "Courier New", Courier, monospace;
|
509 |
margin: 0px;
|
510 |
padding: 5px 10px 5px 10px;
|
511 |
-
|
512 |
-moz-box-shadow: inset 0px 0px 6px 1px rgba(0,0,0,0.1);
|
513 |
-
box-shadow: inset 0px 0px 6px 1px rgba(0,0,0,0.1)
|
|
|
514 |
}
|
515 |
|
516 |
/*******/
|
@@ -633,6 +636,30 @@
|
|
633 |
.startBt span:hover{
|
634 |
border-color: #FF9900;
|
635 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
636 |
.smallText{
|
637 |
font-size: 10px;
|
638 |
color: #666666;
|
@@ -673,8 +700,8 @@
|
|
673 |
margin-top: 15px;
|
674 |
}
|
675 |
.introWrap .startForm .button-primary{
|
676 |
-
font-size: 13px !important;
|
677 |
-
padding: 8px
|
678 |
}
|
679 |
.introWrap .infoContent{
|
680 |
padding: 15px;
|
@@ -686,6 +713,44 @@
|
|
686 |
.introWrap .refLinks{
|
687 |
text-align: center;
|
688 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
689 |
.statImg{
|
690 |
display: none;
|
691 |
}
|
1 |
/*
|
2 |
* Admin Page CSS for WP Socializer plugin
|
3 |
* Author : Aakash Chakravarthy
|
4 |
+
* Version : 1.4
|
5 |
*/
|
6 |
|
7 |
.wrap{
|
8 |
margin: 15px auto 15px;
|
9 |
width: 630px;
|
10 |
padding: 0px;
|
11 |
+
position: relative;
|
12 |
}
|
13 |
.wrap #content{
|
14 |
background: #FFFFFF;
|
102 |
border-radius: 0px 0px 10px 10px;
|
103 |
}
|
104 |
.wrap .footer #wpsr_submit{
|
105 |
+
/*padding: 5px 30px;*/
|
106 |
}
|
107 |
|
108 |
/****************************/
|
164 |
|
165 |
#subTabs{
|
166 |
background: #EAFBFF url(images/orange-bg.png) repeat-x;
|
167 |
+
padding: 25px 10px 20px 10px;
|
168 |
margin: 0px -15px 10px;
|
169 |
border-bottom: 1px dashed #dfdfdf;
|
170 |
}
|
171 |
#subTabs li{
|
172 |
float: left;
|
173 |
margin: 0px 5px 0px 0px;
|
174 |
+
font-size: 19px;
|
175 |
}
|
176 |
#subTabs li a{
|
177 |
text-decoration: none;
|
178 |
+
padding: 5px 10px;
|
179 |
}
|
180 |
#subTabs .ui-state-active a{
|
181 |
background: #FBFBFB;
|
510 |
font: 12px/2 "Courier New", Courier, monospace;
|
511 |
margin: 0px;
|
512 |
padding: 5px 10px 5px 10px;
|
513 |
+
/*-webkit-box-shadow: inset 0px 0px 6px 1px rgba(0,0,0,0.1);
|
514 |
-moz-box-shadow: inset 0px 0px 6px 1px rgba(0,0,0,0.1);
|
515 |
+
box-shadow: inset 0px 0px 6px 1px rgba(0,0,0,0.1);*/
|
516 |
+
border-color: lightSeaGreen;
|
517 |
}
|
518 |
|
519 |
/*******/
|
636 |
.startBt span:hover{
|
637 |
border-color: #FF9900;
|
638 |
}
|
639 |
+
|
640 |
+
.startBox{
|
641 |
+
float: left;
|
642 |
+
width: 43%;
|
643 |
+
padding: 15px;
|
644 |
+
border: 2px solid #ccc;
|
645 |
+
margin-top: 20px;
|
646 |
+
box-shadow: 0 0 7px -1px black;
|
647 |
+
background: url(images/menu-bg.png) repeat-x bottom;
|
648 |
+
}
|
649 |
+
.startBox p{
|
650 |
+
font-size: 14px;
|
651 |
+
line-height: 150%;
|
652 |
+
}
|
653 |
+
.startBox.auto{
|
654 |
+
box-shadow: 0 0 7px -1px purple;
|
655 |
+
border-color: purple;
|
656 |
+
margin-right: 15px;
|
657 |
+
}
|
658 |
+
.startBox.manual{
|
659 |
+
box-shadow: 0 0 7px -1px green;
|
660 |
+
border-color: green;
|
661 |
+
}
|
662 |
+
|
663 |
.smallText{
|
664 |
font-size: 10px;
|
665 |
color: #666666;
|
700 |
margin-top: 15px;
|
701 |
}
|
702 |
.introWrap .startForm .button-primary{
|
703 |
+
/*font-size: 13px !important;
|
704 |
+
padding: 8px;*/
|
705 |
}
|
706 |
.introWrap .infoContent{
|
707 |
padding: 15px;
|
713 |
.introWrap .refLinks{
|
714 |
text-align: center;
|
715 |
}
|
716 |
+
|
717 |
+
.plugin_promo{
|
718 |
+
right: -120px;
|
719 |
+
top: 180px;
|
720 |
+
position: absolute;
|
721 |
+
padding: 5px;
|
722 |
+
background: white;
|
723 |
+
box-shadow: 0 0 4px 0px gray;
|
724 |
+
border-radius: 5px;
|
725 |
+
line-height: 0;
|
726 |
+
}
|
727 |
+
.plugin_promo:hover .promo_show{
|
728 |
+
display: block;
|
729 |
+
}
|
730 |
+
.promo_show{
|
731 |
+
background: white;
|
732 |
+
width: 450px;
|
733 |
+
position: absolute;
|
734 |
+
line-height: 150%;
|
735 |
+
top:-100px;
|
736 |
+
right: -2px;
|
737 |
+
padding: 15px;
|
738 |
+
background: black;
|
739 |
+
color: white;
|
740 |
+
box-shadow: 0 0 6px 0px black;
|
741 |
+
display: none;
|
742 |
+
border-radius: 5px;
|
743 |
+
}
|
744 |
+
.promo_show h3{
|
745 |
+
padding:0 !important;
|
746 |
+
border: 0px !important;
|
747 |
+
}
|
748 |
+
.promo_credit{
|
749 |
+
color: gray;
|
750 |
+
text-decoration: none;
|
751 |
+
text-align: right;
|
752 |
+
}
|
753 |
+
|
754 |
.statImg{
|
755 |
display: none;
|
756 |
}
|
admin/wpsr-admin-floating-bar.php
CHANGED
@@ -76,11 +76,6 @@ function wpsr_admin_page_floating_bar(){
|
|
76 |
|
77 |
<form id="content" method="post">
|
78 |
|
79 |
-
<ul id="tabs" class="clearfix">
|
80 |
-
<li><a href="#">Customize</a></li>
|
81 |
-
<li style="float:right"><a href="http://www.aakashweb.com/wordpress-plugins/wp-socializer/" target="_blank">Help</a></li>
|
82 |
-
</ul>
|
83 |
-
|
84 |
<h3>Settings:</h3>
|
85 |
<div class="section">
|
86 |
<table width="100%" height="194" border="0">
|
76 |
|
77 |
<form id="content" method="post">
|
78 |
|
|
|
|
|
|
|
|
|
|
|
79 |
<h3>Settings:</h3>
|
80 |
<div class="section">
|
81 |
<table width="100%" height="194" border="0">
|
admin/wpsr-admin-js.js
CHANGED
@@ -75,7 +75,7 @@ $j(document).ready(function(){
|
|
75 |
|
76 |
nameHtml = '<div class="templateHead">' + name + '</div>';
|
77 |
versionHtml = '<div class="templateDetails">by <a href=' + url + ' target="_blank">' + author + '</a> version ' + version + '</div>';
|
78 |
-
applyBt = '<span class="templateBt applyBt">
|
79 |
hiddenHtml = '<textarea class="templateCont">' + vars + temp1 + temp2 + cnt1 + cnt2 + '</textarea>';
|
80 |
|
81 |
itemContent = applyBt + hiddenHtml + nameHtml + versionHtml;
|
@@ -172,7 +172,7 @@ $j(document).ready(function(){
|
|
172 |
if($j('.introWrap').length != 0){
|
173 |
$j.ajax({
|
174 |
type: "GET",
|
175 |
-
url: 'http://query.yahooapis.com/v1/public/yql?q=%20SELECT%20*%20FROM%20xml%20WHERE%20url%3D%22http%3A%2F%2Fvaakash.
|
176 |
dataType: "xml",
|
177 |
success: function(xml){
|
178 |
try{
|
@@ -352,6 +352,17 @@ $j(document).ready(function(){
|
|
352 |
return false;
|
353 |
}
|
354 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
355 |
|
356 |
});
|
357 |
|
75 |
|
76 |
nameHtml = '<div class="templateHead">' + name + '</div>';
|
77 |
versionHtml = '<div class="templateDetails">by <a href=' + url + ' target="_blank">' + author + '</a> version ' + version + '</div>';
|
78 |
+
applyBt = '<span class="templateBt applyBt">Select this template</span>';
|
79 |
hiddenHtml = '<textarea class="templateCont">' + vars + temp1 + temp2 + cnt1 + cnt2 + '</textarea>';
|
80 |
|
81 |
itemContent = applyBt + hiddenHtml + nameHtml + versionHtml;
|
172 |
if($j('.introWrap').length != 0){
|
173 |
$j.ajax({
|
174 |
type: "GET",
|
175 |
+
url: 'http://query.yahooapis.com/v1/public/yql?q=%20SELECT%20*%20FROM%20xml%20WHERE%20url%3D%22http%3A%2F%2Fvaakash.koding.com%2Fwpsr.xml%22&env=http%3A%2F%2Fdatatables.org%2Falltables.env',
|
176 |
dataType: "xml",
|
177 |
success: function(xml){
|
178 |
try{
|
352 |
return false;
|
353 |
}
|
354 |
});
|
355 |
+
|
356 |
+
// PROMO
|
357 |
+
$j('.promo_p1').mouseenter(function(){
|
358 |
+
$j(this).hide();
|
359 |
+
$j('.promo_p2').show();
|
360 |
+
});
|
361 |
+
$j('.promo_p2').mouseleave(function(){
|
362 |
+
$j(this).hide();
|
363 |
+
$j('.promo_p1').show();
|
364 |
+
});
|
365 |
+
$j('.promo_p2').hide();
|
366 |
|
367 |
});
|
368 |
|
admin/wpsr-admin-other.php
CHANGED
@@ -20,7 +20,7 @@ function wpsr_admin_page_other(){
|
|
20 |
?>
|
21 |
|
22 |
<div class="wrap">
|
23 |
-
<h2><img width="32" height="32" src="<?php echo WPSR_ADMIN_URL; ?>images/wp-socializer.png" align="absmiddle"/> WP Socializer -
|
24 |
|
25 |
<div class="miniWrap">
|
26 |
|
@@ -54,7 +54,7 @@ function wpsr_admin_page_other(){
|
|
54 |
<small class="smallText"><?php _e('These shortcodes have several parameters. You can use them to customize the buttons. View the parameters in this page.', 'wpsr'); ?>
|
55 |
<a href="http://www.aakashweb.com/docs/wp-socializer-docs/function-reference/" target="_blank">Refer the Parameters here.</a></small>
|
56 |
|
57 |
-
<
|
58 |
|
59 |
<h2>In widgets</h2>
|
60 |
<p><?php _e('You must use the above shortcodes in', 'wpsr'); ?> <a href="http://www.aakashweb.com/wordpress-plugins/html-javascript-adder/" target="_blank">HTML Javascript adder</a> <a href="#note" onclick="javascript:$j('.hjaNote').addClass('updated');">(?)</a> <?php _e('plugin to insert the buttons in the widgets.', 'wpsr'); ?></p>
|
@@ -75,7 +75,7 @@ function wpsr_admin_page_other(){
|
|
75 |
?>
|
76 |
</center></p>
|
77 |
|
78 |
-
<
|
79 |
|
80 |
<h2><?php _e('Inside Posts', 'wpsr'); ?></h2>
|
81 |
<p><?php _e('Inorder to use the buttons inside posts, you must use the above shortcodes in the post editor.', 'wpsr'); ?></p>
|
20 |
?>
|
21 |
|
22 |
<div class="wrap">
|
23 |
+
<h2><img width="32" height="32" src="<?php echo WPSR_ADMIN_URL; ?>images/wp-socializer.png" align="absmiddle"/> WP Socializer - Shortcodes</h2>
|
24 |
|
25 |
<div class="miniWrap">
|
26 |
|
54 |
<small class="smallText"><?php _e('These shortcodes have several parameters. You can use them to customize the buttons. View the parameters in this page.', 'wpsr'); ?>
|
55 |
<a href="http://www.aakashweb.com/docs/wp-socializer-docs/function-reference/" target="_blank">Refer the Parameters here.</a></small>
|
56 |
|
57 |
+
<br />
|
58 |
|
59 |
<h2>In widgets</h2>
|
60 |
<p><?php _e('You must use the above shortcodes in', 'wpsr'); ?> <a href="http://www.aakashweb.com/wordpress-plugins/html-javascript-adder/" target="_blank">HTML Javascript adder</a> <a href="#note" onclick="javascript:$j('.hjaNote').addClass('updated');">(?)</a> <?php _e('plugin to insert the buttons in the widgets.', 'wpsr'); ?></p>
|
75 |
?>
|
76 |
</center></p>
|
77 |
|
78 |
+
<br />
|
79 |
|
80 |
<h2><?php _e('Inside Posts', 'wpsr'); ?></h2>
|
81 |
<p><?php _e('Inorder to use the buttons inside posts, you must use the above shortcodes in the post editor.', 'wpsr'); ?></p>
|
admin/wpsr-admin.php
CHANGED
@@ -12,7 +12,7 @@ function wpsr_admin_menu() {
|
|
12 |
add_menu_page('WP Socializer - Admin page', 'WP Socializer', 'manage_options', 'wp_socializer', 'wpsr_admin_page', $icon);
|
13 |
add_submenu_page('wp_socializer', 'WP Socializer - Admin page', 'WP Socializer', 'manage_options', 'wp_socializer', 'wpsr_admin_page');
|
14 |
add_submenu_page('wp_socializer', 'WP Socializer - Floating Share bar', 'Floating Share bar', 'manage_options', 'wp_socializer_floating_bar', 'wpsr_admin_page_floating_bar');
|
15 |
-
add_submenu_page('wp_socializer', 'WP Socializer -
|
16 |
}
|
17 |
add_action('admin_menu', 'wpsr_admin_menu');
|
18 |
|
@@ -38,7 +38,7 @@ function wpsr_admin_css() {
|
|
38 |
$pages = array('wp_socializer', 'wp_socializer_other', 'wp_socializer_floating_bar');
|
39 |
|
40 |
if (isset($_GET['page']) && (in_array($_GET['page'], $pages))){
|
41 |
-
wp_enqueue_style('wp-socializer-admin-css', WPSR_ADMIN_URL . 'wpsr-admin-css.css');
|
42 |
}
|
43 |
}
|
44 |
add_action('admin_print_styles', 'wpsr_admin_css');
|
@@ -150,37 +150,8 @@ echo
|
|
150 |
</ul>
|
151 |
</li>
|
152 |
|
153 |
-
<li class="parentLi btn">Headings
|
154 |
-
<ul class="childMenu">
|
155 |
-
<li openTag="<h1>" closeTag="</h1>">Heading 1</li>
|
156 |
-
<li openTag="<h2>" closeTag="</h2>">Heading 2</li>
|
157 |
-
<li openTag="<h3>" closeTag="</h3>">Heading 3</li>
|
158 |
-
<li openTag="<h4>" closeTag="</h4>">Heading 4</li>
|
159 |
-
<li openTag="<h5>" closeTag="</h5>">Heading 5</li>
|
160 |
-
<li openTag="<h6>" closeTag="</h6>">Heading 6</li>
|
161 |
-
</ul>
|
162 |
-
</li>
|
163 |
-
|
164 |
-
<li class="parentLi btn">Float
|
165 |
-
<ul class="childMenu">
|
166 |
-
<li openTag=\' style="float:left"\'>Float Left</li>
|
167 |
-
<li openTag=\' style="float:right"\'>Float Right</li>
|
168 |
-
</ul>
|
169 |
-
</li>
|
170 |
-
|
171 |
</ul>
|
172 |
-
|
173 |
-
<ul class="tbButtons">
|
174 |
-
<li class="btn" openTag="<p>" closeTag="</p>">p</li>
|
175 |
-
<li class="btn" openTag="</br>">br</li>
|
176 |
-
<li class="btn" openTag="<span>" closeTag="</span>">span</li>
|
177 |
-
<li class="btn" openTag="<div>" closeTag="</div>">div</li>
|
178 |
-
<li class="btn" openTag="</hr>">hr</li>
|
179 |
-
<li class="btn" openTag="<ul>" closeTag="</ul>">ul</li>
|
180 |
-
<li class="btn" openTag="<li>" closeTag="</li>">li</li>
|
181 |
-
<li class="btn" openTag="<div style="clear: both"></div>">clearer</li>
|
182 |
-
<li class="btn"><a href="http://www.aakashweb.com/wordpress-plugins/wp-socializer/" title="Help" target="_blank">?</a></li>
|
183 |
-
</ul>
|
184 |
</div>';
|
185 |
}
|
186 |
|
@@ -472,15 +443,15 @@ function wpsr_admin_page(){
|
|
472 |
}
|
473 |
}
|
474 |
|
475 |
-
if($wpsr_updated == true){
|
476 |
echo "<div class='message updated autoHide'><p>" . __('Updated successfully', 'wpsr') . "</p></div>";
|
477 |
}
|
478 |
|
479 |
-
if($wpsr_reseted == true){
|
480 |
echo "<div class='message updated autoHide'><p>" . __('Values are set to defaults successfully', 'wpsr') . "</p></div>";
|
481 |
}
|
482 |
|
483 |
-
if($wpsr_v1fix == true){
|
484 |
echo "<div class='message updated autoHide'><p>" . __('You have upgraded from version 1.0, So some settings are fixed to suit new version.', 'wpsr') . "</p></div>";
|
485 |
}
|
486 |
|
@@ -531,7 +502,7 @@ function wpsr_admin_page(){
|
|
531 |
<div class="wrap">
|
532 |
<div class="header">
|
533 |
<?php echo wpsr_admin_buttons('fbrec'); ?>
|
534 |
-
<h2><img width="32" height="32" src="<?php echo WPSR_ADMIN_URL; ?>images/wp-socializer.png" align="absmiddle"/> WP Socializer<span class="smallText">
|
535 |
</div><!-- Header -->
|
536 |
|
537 |
<ul class="wpsr_share_wrap">
|
@@ -540,52 +511,54 @@ function wpsr_admin_page(){
|
|
540 |
<li class="wpsr_pressthis" title="Share a small post about this plugin in your blog !"><a href="press-this.php" target="_blank"></a></li>
|
541 |
</ul>
|
542 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
543 |
<form id="content" method="post">
|
544 |
<ul id="tabs" class="clearfix">
|
545 |
<li><a href="#tab-1">Start</a></li>
|
546 |
-
<li><a href="#tab-2">
|
547 |
-
<li><a href="#tab-3">
|
548 |
|
549 |
<li style="float:right"><a href="#tab-5" class="helpTab">Help</a></li>
|
550 |
-
<li style="float:right"><a href="#tab-4">Settings</a></li>
|
551 |
</ul>
|
552 |
|
553 |
<div id="tab-1" class="clearfix">
|
554 |
-
|
555 |
-
|
556 |
-
<p>Start using WP Socializer by selecting pre-made set of button templates for your site. Just select the button set you like to use and Save the settings.</p>
|
557 |
|
|
|
|
|
|
|
|
|
558 |
<div class="startBt"><span data-win="winTemplates" data-title="Select a template">Select an Inbuilt template</span></div>
|
|
|
559 |
|
560 |
-
<
|
561 |
-
|
562 |
<h2>Manual setup</h2>
|
563 |
-
<p>If you want to
|
564 |
-
|
565 |
<div class="startBt" data-tab="2"><span>Manual customization</span></div>
|
566 |
-
|
567 |
-
<h5>Give 5 star rating</h5>
|
568 |
-
<p class="note">If you like this plugin then please give <a href="http://wordpress.org/extend/plugins/wp-socializer/" target="_blank"><img src="<?php echo WPSR_ADMIN_URL; ?>images/five-star.png" align="absmiddle"/></a> rating in the WP page to show the quality and worth of the plugin.</p>
|
569 |
-
|
570 |
-
<h5>Report bugs</h5>
|
571 |
-
<p class="note">If you notice a bug in the plugin, report it immediately in the <a href="http://www.aakashweb.com/forum/" target="_blank">Support Forum</a>.</p>
|
572 |
|
573 |
</div>
|
574 |
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
<p class="note">
|
582 |
-
- <a href="http://www.aakashweb.com/wordpress-plugins/html-javascript-adder/" target="_blank">HTML Javascript Adder</a><br />
|
583 |
-
- <a href="http://www.aakashweb.com/wordpress-plugins/shortcoder/" target="_blank">Shortcoder</a><br />
|
584 |
-
- <a href="http://www.aakashweb.com/wordpress-plugins/super-rss-reader/" target="_blank">Super RSS Reader</a><br />
|
585 |
-
- <a href="http://www.aakashweb.com/wordpress-plugins/announcer/" target="_blank">Announcer</a><br />
|
586 |
-
- <a href="http://www.aakashweb.com/wordpress-plugins/wp-selected-text-sharer/" target="_blank">WP Selected text Sharer</a>
|
587 |
-
</p>
|
588 |
-
</div>
|
589 |
</div>
|
590 |
|
591 |
<div id="tab-2" class="clearfix">
|
@@ -628,15 +601,16 @@ function wpsr_admin_page(){
|
|
628 |
<?php wpsr_addtoolbar(); ?>
|
629 |
</div>
|
630 |
|
631 |
-
|
632 |
-
|
633 |
-
?>
|
|
|
634 |
<div id="sub-tab-<?php echo $k; ?>">
|
635 |
<div class="section">
|
636 |
<textarea class="wpsr_content" name="wpsr_template[<?php echo $k; ?>][content]" id="wpsr_template[<?php echo $k; ?>][content]" rows="7"><?php echo $wpsr_template[$k]['content']; ?></textarea>
|
637 |
</div>
|
638 |
|
639 |
-
<h3>Where to show
|
640 |
<div class="section">
|
641 |
<table width="100%" border="0">
|
642 |
<tr>
|
@@ -662,7 +636,7 @@ function wpsr_admin_page(){
|
|
662 |
</table>
|
663 |
</div>
|
664 |
|
665 |
-
<h3>Where to position
|
666 |
<div class="section">
|
667 |
<label><input name="wpsr_template[<?php echo $k; ?>][abvcontent]" id="wpsr_template[<?php echo $k; ?>][abvcontent]" type="checkbox" value="1" <?php echo $wpsr_template[$k]['abvcontent'] == "1" ? 'checked="checked"' : ""; ?> />
|
668 |
<?php _e('Above content', 'wpsr'); ?></label>
|
@@ -670,11 +644,7 @@ function wpsr_admin_page(){
|
|
670 |
<label><input name="wpsr_template[<?php echo $k; ?>][blwcontent]" id="wpsr_template[<?php echo $k; ?>][blwcontent]" type="checkbox" value="1" <?php echo $wpsr_template[$k]['blwcontent'] == "1" ? 'checked="checked"' : ""; ?> />
|
671 |
<?php _e('Below content', 'wpsr'); ?></label>
|
672 |
</div>
|
673 |
-
|
674 |
-
<br />
|
675 |
-
<h5>Note:</h5>
|
676 |
-
<p class="note">Use the menu above to insert the buttons into the template<br/>All HTML/CSS tags can be used. The button codes can be wrapped with HTML tags for proper aligning.</p>
|
677 |
-
|
678 |
</div>
|
679 |
<?php endforeach; ?>
|
680 |
|
@@ -692,7 +662,7 @@ function wpsr_admin_page(){
|
|
692 |
<option <?php echo $wpsr_settings['smartload'] == 'timeout' ? ' selected="selected"' : ''; ?> value="timeout">After specific time</option>
|
693 |
</select>
|
694 |
<div id="wpsr_lazload_timeout">Load buttons script after: <input name="wpsr_settings_smartload_timeout" type="text" id="wpsr_settings_smartload_timeout" value="<?php echo $wpsr_settings['smartload_timeout']; ?>" size="2"/> seconds</div>
|
695 |
-
|
696 |
</tr>
|
697 |
</table>
|
698 |
<small class="grayText"><strong>Note:</strong> If the buttons fail to load, there might be a <abbr title="Javascript">JS</abbr> error in the page. This plugin is tested on various browsers and it seems to work fine. If you can't find a solution for the problem report it in the <a href="http://www.aakashweb.com/forum/" target="_blank">Support Forum</a></small>
|
@@ -711,6 +681,7 @@ function wpsr_admin_page(){
|
|
711 |
</div>
|
712 |
|
713 |
<h3>Bit.ly <?php _e('Integration', 'wpsr'); ?></h3>
|
|
|
714 |
<div class="section">
|
715 |
<table width="100%" height="39" border="0">
|
716 |
<tr>
|
@@ -817,7 +788,7 @@ function wpsr_admin_page(){
|
|
817 |
'<span class="sbName">' . $sitename . '</span>' .
|
818 |
'<span class="sbAdd sbAdd_16px" data-pixel="16">16</span>';
|
819 |
|
820 |
-
if($property['support32px'] == 1){
|
821 |
echo '<span class="sbAdd sbAdd_32px" data-pixel="32">32</span>';
|
822 |
}
|
823 |
echo "</li>\n";
|
@@ -1040,13 +1011,13 @@ function wpsr_admin_page(){
|
|
1040 |
<table width="100%" height="100" border="0">
|
1041 |
<tr>
|
1042 |
<td width="31%" height="49"><label for="wpsr_sharethis_pubkey">Sharethis Publisher Key</label></td>
|
1043 |
-
<td width="69%"><input name="wpsr_sharethis_pubkey" type="text" id="wpsr_sharethis_pubkey" value="<?php echo $
|
1044 |
</tr>
|
1045 |
<tr>
|
1046 |
<td><label for="wpsr_sharethis_addp">Automatically wrap with paragraph</label></td>
|
1047 |
<td><select id="wpsr_sharethis_addp" name="wpsr_sharethis_addp">
|
1048 |
-
<option <?php echo $
|
1049 |
-
<option <?php echo $
|
1050 |
</select></td>
|
1051 |
</tr>
|
1052 |
</table>
|
12 |
add_menu_page('WP Socializer - Admin page', 'WP Socializer', 'manage_options', 'wp_socializer', 'wpsr_admin_page', $icon);
|
13 |
add_submenu_page('wp_socializer', 'WP Socializer - Admin page', 'WP Socializer', 'manage_options', 'wp_socializer', 'wpsr_admin_page');
|
14 |
add_submenu_page('wp_socializer', 'WP Socializer - Floating Share bar', 'Floating Share bar', 'manage_options', 'wp_socializer_floating_bar', 'wpsr_admin_page_floating_bar');
|
15 |
+
add_submenu_page('wp_socializer', 'WP Socializer - Shortcodes', 'Shortcodes', 'manage_options', 'wp_socializer_other', 'wpsr_admin_page_other');
|
16 |
}
|
17 |
add_action('admin_menu', 'wpsr_admin_menu');
|
18 |
|
38 |
$pages = array('wp_socializer', 'wp_socializer_other', 'wp_socializer_floating_bar');
|
39 |
|
40 |
if (isset($_GET['page']) && (in_array($_GET['page'], $pages))){
|
41 |
+
wp_enqueue_style('wp-socializer-admin-css', WPSR_ADMIN_URL . 'wpsr-admin-css.css?v=' . WPSR_VERSION);
|
42 |
}
|
43 |
}
|
44 |
add_action('admin_print_styles', 'wpsr_admin_css');
|
150 |
</ul>
|
151 |
</li>
|
152 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
153 |
</ul>
|
154 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
155 |
</div>';
|
156 |
}
|
157 |
|
443 |
}
|
444 |
}
|
445 |
|
446 |
+
if(isset($wpsr_updated) && $wpsr_updated == true){
|
447 |
echo "<div class='message updated autoHide'><p>" . __('Updated successfully', 'wpsr') . "</p></div>";
|
448 |
}
|
449 |
|
450 |
+
if(isset($wpsr_reseted) && $wpsr_reseted == true){
|
451 |
echo "<div class='message updated autoHide'><p>" . __('Values are set to defaults successfully', 'wpsr') . "</p></div>";
|
452 |
}
|
453 |
|
454 |
+
if(isset($wpsr_v1fix) && $wpsr_v1fix == true){
|
455 |
echo "<div class='message updated autoHide'><p>" . __('You have upgraded from version 1.0, So some settings are fixed to suit new version.', 'wpsr') . "</p></div>";
|
456 |
}
|
457 |
|
502 |
<div class="wrap">
|
503 |
<div class="header">
|
504 |
<?php echo wpsr_admin_buttons('fbrec'); ?>
|
505 |
+
<h2><img width="32" height="32" src="<?php echo WPSR_ADMIN_URL; ?>images/wp-socializer.png" align="absmiddle"/> WP Socializer<span class="smallText"> v2.4.6<?php //echo WPSR_VERSION; ?><?php echo $wpsr_is_disabled; ?></span></h2>
|
506 |
</div><!-- Header -->
|
507 |
|
508 |
<ul class="wpsr_share_wrap">
|
511 |
<li class="wpsr_pressthis" title="Share a small post about this plugin in your blog !"><a href="press-this.php" target="_blank"></a></li>
|
512 |
</ul>
|
513 |
|
514 |
+
<div class="plugin_promo">
|
515 |
+
<img src="<?php echo WPSR_ADMIN_URL; ?>images/anpn-thumb.png" width="80" height="80" />
|
516 |
+
<div class="promo_show">
|
517 |
+
<h3>Advanced Post Navigator - WordPress plugin</h3>
|
518 |
+
<div class="promo_slide"><a href="http://bit.ly/anpnPro" target="_blank"><img src="<?php echo WPSR_ADMIN_URL; ?>images/anpn.png" alt="Advanced Post Navigator" width="100%" border="0"/></a></div>
|
519 |
+
<p class="promo_p1 promo_text">Advanced Post Navigator is a WordPress plugin, which adds <strong>"Next post"</strong> and <strong>"Previous post"</strong> buttons to the sides of the Posts and pages.</p>
|
520 |
+
<p class="promo_p2 promo_text">It also shows more information about the Next and previous post in a hover bubble displaying the post <strong>"Excerpt, thumbnail, date, comments, category, tags and further posts"</strong></p>
|
521 |
+
<div><a href="http://bit.ly/anpnPro" target="_blank"><img src="<?php echo WPSR_ADMIN_URL; ?>images/purchase.png" alt="purchase" width="200px" border="0" align="absmiddle"/></a> at Codecanyon<a href="http://www.aakashweb.com/demos/advanced-post-navigator" target="_blank"><img src="<?php echo WPSR_ADMIN_URL; ?>images/demo.png" alt="demo" width="130px" border="0" align="right" /></a></div>
|
522 |
+
<div><a href="http://www.aakashweb.com/wordpress-plugins/advanced-post-navigator/" class="promo_credit" target="_blank">A plugin from Aakash Web - Official home page</a></div>
|
523 |
+
</div>
|
524 |
+
</div>
|
525 |
+
|
526 |
<form id="content" method="post">
|
527 |
<ul id="tabs" class="clearfix">
|
528 |
<li><a href="#tab-1">Start</a></li>
|
529 |
+
<li><a href="#tab-2">Button Settings</a></li>
|
530 |
+
<li><a href="#tab-3" title="Placement">Edit templates</a></li>
|
531 |
|
532 |
<li style="float:right"><a href="#tab-5" class="helpTab">Help</a></li>
|
533 |
+
<li style="float:right"><a href="#tab-4">Global Settings</a></li>
|
534 |
</ul>
|
535 |
|
536 |
<div id="tab-1" class="clearfix">
|
537 |
+
|
538 |
+
<div class="clearfix">
|
|
|
539 |
|
540 |
+
<div class="startBox auto">
|
541 |
+
<h2>Automatic setup</h2>
|
542 |
+
<p>Start using WP Socializer by selecting pre-made set of button templates for your site.</p>
|
543 |
+
<p>Just select the template style you like to use and "Save the settings".</p>
|
544 |
<div class="startBt"><span data-win="winTemplates" data-title="Select a template">Select an Inbuilt template</span></div>
|
545 |
+
</div>
|
546 |
|
547 |
+
<div class="startBox manual">
|
|
|
548 |
<h2>Manual setup</h2>
|
549 |
+
<p>If you want to create your own button arrangement, then edit the individual button settings if needed.</p>
|
550 |
+
<p>Then use the "Placement" section to place the buttons in the template</p>
|
551 |
<div class="startBt" data-tab="2"><span>Manual customization</span></div>
|
552 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
553 |
|
554 |
</div>
|
555 |
|
556 |
+
<h5>Give 5 star rating</h5>
|
557 |
+
<p class="note">If you like this plugin then please give <a href="http://wordpress.org/extend/plugins/wp-socializer/" target="_blank"><img src="<?php echo WPSR_ADMIN_URL; ?>images/five-star.png" align="absmiddle"/></a> rating in the WP page to show the quality and worth of the plugin.</p>
|
558 |
+
|
559 |
+
<h5>Report bugs</h5>
|
560 |
+
<p class="note">If you notice a bug in the plugin, report it immediately in the <a href="http://www.aakashweb.com/forum/" target="_blank">Support Forum</a>.</p>
|
561 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
562 |
</div>
|
563 |
|
564 |
<div id="tab-2" class="clearfix">
|
601 |
<?php wpsr_addtoolbar(); ?>
|
602 |
</div>
|
603 |
|
604 |
+
<p class="note"><strong>Note:</strong> Use the menu above to insert the corresponding button's <code>{button-code}</code> into the template. Use HTML/CSS to properly align the buttons. <a data-win="winTemplates" data-title="Select a template" href="#">Predefined templates</a> can also be selected and edited.</p>
|
605 |
+
|
606 |
+
<?php foreach($templates as $k => $v): ?>
|
607 |
+
|
608 |
<div id="sub-tab-<?php echo $k; ?>">
|
609 |
<div class="section">
|
610 |
<textarea class="wpsr_content" name="wpsr_template[<?php echo $k; ?>][content]" id="wpsr_template[<?php echo $k; ?>][content]" rows="7"><?php echo $wpsr_template[$k]['content']; ?></textarea>
|
611 |
</div>
|
612 |
|
613 |
+
<h3>Where to show this template ?</h3>
|
614 |
<div class="section">
|
615 |
<table width="100%" border="0">
|
616 |
<tr>
|
636 |
</table>
|
637 |
</div>
|
638 |
|
639 |
+
<h3>Where to position this template ?</h3>
|
640 |
<div class="section">
|
641 |
<label><input name="wpsr_template[<?php echo $k; ?>][abvcontent]" id="wpsr_template[<?php echo $k; ?>][abvcontent]" type="checkbox" value="1" <?php echo $wpsr_template[$k]['abvcontent'] == "1" ? 'checked="checked"' : ""; ?> />
|
642 |
<?php _e('Above content', 'wpsr'); ?></label>
|
644 |
<label><input name="wpsr_template[<?php echo $k; ?>][blwcontent]" id="wpsr_template[<?php echo $k; ?>][blwcontent]" type="checkbox" value="1" <?php echo $wpsr_template[$k]['blwcontent'] == "1" ? 'checked="checked"' : ""; ?> />
|
645 |
<?php _e('Below content', 'wpsr'); ?></label>
|
646 |
</div>
|
647 |
+
|
|
|
|
|
|
|
|
|
648 |
</div>
|
649 |
<?php endforeach; ?>
|
650 |
|
662 |
<option <?php echo $wpsr_settings['smartload'] == 'timeout' ? ' selected="selected"' : ''; ?> value="timeout">After specific time</option>
|
663 |
</select>
|
664 |
<div id="wpsr_lazload_timeout">Load buttons script after: <input name="wpsr_settings_smartload_timeout" type="text" id="wpsr_settings_smartload_timeout" value="<?php echo $wpsr_settings['smartload_timeout']; ?>" size="2"/> seconds</div>
|
665 |
+
</td>
|
666 |
</tr>
|
667 |
</table>
|
668 |
<small class="grayText"><strong>Note:</strong> If the buttons fail to load, there might be a <abbr title="Javascript">JS</abbr> error in the page. This plugin is tested on various browsers and it seems to work fine. If you can't find a solution for the problem report it in the <a href="http://www.aakashweb.com/forum/" target="_blank">Support Forum</a></small>
|
681 |
</div>
|
682 |
|
683 |
<h3>Bit.ly <?php _e('Integration', 'wpsr'); ?></h3>
|
684 |
+
<span class="smallText">Bit.ly is used only in Social bookmarking button for Twitter</span>
|
685 |
<div class="section">
|
686 |
<table width="100%" height="39" border="0">
|
687 |
<tr>
|
788 |
'<span class="sbName">' . $sitename . '</span>' .
|
789 |
'<span class="sbAdd sbAdd_16px" data-pixel="16">16</span>';
|
790 |
|
791 |
+
if(isset($property['support32px']) && $property['support32px'] == 1){
|
792 |
echo '<span class="sbAdd sbAdd_32px" data-pixel="32">32</span>';
|
793 |
}
|
794 |
echo "</li>\n";
|
1011 |
<table width="100%" height="100" border="0">
|
1012 |
<tr>
|
1013 |
<td width="31%" height="49"><label for="wpsr_sharethis_pubkey">Sharethis Publisher Key</label></td>
|
1014 |
+
<td width="69%"><input name="wpsr_sharethis_pubkey" type="text" id="wpsr_sharethis_pubkey" value="<?php echo $wpsr_sharethis['pubkey']; ?>" size="50" /><br /><span class="smallText"><?php _e('You can see you publisher key in this page. ', 'wpsr'); ?> <a href="http://sharethis.com/account/" target="_blank"><?php _e('Click here', 'wpsr'); ?></a></span></td>
|
1015 |
</tr>
|
1016 |
<tr>
|
1017 |
<td><label for="wpsr_sharethis_addp">Automatically wrap with paragraph</label></td>
|
1018 |
<td><select id="wpsr_sharethis_addp" name="wpsr_sharethis_addp">
|
1019 |
+
<option <?php echo $wpsr_sharethis['addp'] == '1' ? ' selected="selected"' : ''; ?> value="1"><?php _e('Yes', 'wpsr'); ?></option>
|
1020 |
+
<option <?php echo $wpsr_sharethis['addp'] == '0' ? ' selected="selected"' : ''; ?> value="0"><?php _e('No', 'wpsr'); ?></option>
|
1021 |
</select></td>
|
1022 |
</tr>
|
1023 |
</table>
|
includes/wpsr-addthis.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
* Addthis button Processor code for WP Socializer Plugin
|
4 |
-
* Version : 2.
|
5 |
* Author : Aakash Chakravarthy
|
6 |
*/
|
7 |
|
@@ -118,6 +118,7 @@ function wpsr_addthis($args = ''){
|
|
118 |
$btwidth = (strpos($btstyle, 'lg') === false) ? '83' : '125';
|
119 |
|
120 |
$addthis_processed = "\n<!-- Start WP Socializer Plugin - Addthis Button -->\n";
|
|
|
121 |
|
122 |
switch($output){
|
123 |
// Output the ordinary button
|
1 |
<?php
|
2 |
/*
|
3 |
* Addthis button Processor code for WP Socializer Plugin
|
4 |
+
* Version : 2.2
|
5 |
* Author : Aakash Chakravarthy
|
6 |
*/
|
7 |
|
118 |
$btwidth = (strpos($btstyle, 'lg') === false) ? '83' : '125';
|
119 |
|
120 |
$addthis_processed = "\n<!-- Start WP Socializer Plugin - Addthis Button -->\n";
|
121 |
+
$inner = '';
|
122 |
|
123 |
switch($output){
|
124 |
// Output the ordinary button
|
includes/wpsr-google.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
* Google +1 button Processor code for WP Socializer Plugin
|
4 |
-
* Version : 3.
|
5 |
* Author : Aakash Chakravarthy
|
6 |
*/
|
7 |
|
@@ -32,7 +32,7 @@ function wpsr_plusone($args = ''){
|
|
32 |
'type' => 'standard',
|
33 |
//'text' => __('+1 this' ,'wpsr'),
|
34 |
//'image' => WPSR_PUBLIC_URL . 'buttons/plusone-bt.png',
|
35 |
-
|
36 |
);
|
37 |
|
38 |
$args = wp_parse_args($args, $defaults);
|
1 |
<?php
|
2 |
/*
|
3 |
* Google +1 button Processor code for WP Socializer Plugin
|
4 |
+
* Version : 3.2
|
5 |
* Author : Aakash Chakravarthy
|
6 |
*/
|
7 |
|
32 |
'type' => 'standard',
|
33 |
//'text' => __('+1 this' ,'wpsr'),
|
34 |
//'image' => WPSR_PUBLIC_URL . 'buttons/plusone-bt.png',
|
35 |
+
'params' => '',
|
36 |
);
|
37 |
|
38 |
$args = wp_parse_args($args, $defaults);
|
includes/wpsr-other.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
* Pinterest, Reddit, StumbleUpon and LinkedIn buttons Processor code for WP Socializer Plugin
|
4 |
-
* Version : 2.
|
5 |
* Since v2.0
|
6 |
* Author : Aakash Chakravarthy
|
7 |
*/
|
@@ -104,7 +104,7 @@ function wpsr_pinterest($args = ''){
|
|
104 |
$def_url = $details['permalink'];
|
105 |
$def_title = $details['title'];
|
106 |
$def_media = $details['image'];
|
107 |
-
|
108 |
$defaults = array (
|
109 |
'output' => 'button',
|
110 |
'url' => $def_url,
|
@@ -124,17 +124,17 @@ function wpsr_pinterest($args = ''){
|
|
124 |
switch($output){
|
125 |
// Display the ordinary button
|
126 |
case 'button':
|
127 |
-
$pinterest_processed .= '<a href="http://pinterest.com/pin/create/button/?url=' . urlencode($url) . '&media=' . urlencode($media) . '" class="pin-it-button" count-layout="' . $type . '"><img border="0" src="//assets.pinterest.com/images/PinExt.png" title="Pin It" /></a>';
|
128 |
break;
|
129 |
|
130 |
// Display the Image format
|
131 |
case 'image':
|
132 |
-
$pinterest_processed .= '<a href="http://pinterest.com/pin/create/button/?url=' . urlencode($url) . '&media=' . urlencode($media) . '" ' . $params . '><img src="' . $image . '" alt="Submit to Reddit" /></a>';
|
133 |
break;
|
134 |
|
135 |
// Display the Text format
|
136 |
case 'text':
|
137 |
-
$pinterest_processed .= '<a href="http://pinterest.com/pin/create/button/?url=' . urlencode($url) . '&media=' . urlencode($media) . '" ' . $params . '>' . $text . '</a>';
|
138 |
break;
|
139 |
}
|
140 |
|
1 |
<?php
|
2 |
/*
|
3 |
* Pinterest, Reddit, StumbleUpon and LinkedIn buttons Processor code for WP Socializer Plugin
|
4 |
+
* Version : 2.4
|
5 |
* Since v2.0
|
6 |
* Author : Aakash Chakravarthy
|
7 |
*/
|
104 |
$def_url = $details['permalink'];
|
105 |
$def_title = $details['title'];
|
106 |
$def_media = $details['image'];
|
107 |
+
|
108 |
$defaults = array (
|
109 |
'output' => 'button',
|
110 |
'url' => $def_url,
|
124 |
switch($output){
|
125 |
// Display the ordinary button
|
126 |
case 'button':
|
127 |
+
$pinterest_processed .= '<a href="http://pinterest.com/pin/create/button/?url=' . urlencode($url) . '&media=' . urlencode($media) . '" class="pin-it-button" count-layout="' . $type . '"><img border="0" src="//assets.pinterest.com/images/PinExt.png" alt="Pinterest" title="Pin It" /></a>';
|
128 |
break;
|
129 |
|
130 |
// Display the Image format
|
131 |
case 'image':
|
132 |
+
$pinterest_processed .= '<a href="http://pinterest.com/pin/create/button/?url=' . urlencode($url) . '&media=' . urlencode($media) . '" ' . $params . '><img src="' . $image . '" alt="Submit to Reddit" /></a>';
|
133 |
break;
|
134 |
|
135 |
// Display the Text format
|
136 |
case 'text':
|
137 |
+
$pinterest_processed .= '<a href="http://pinterest.com/pin/create/button/?url=' . urlencode($url) . '&media=' . urlencode($media) . '" ' . $params . '>' . $text . '</a>';
|
138 |
break;
|
139 |
}
|
140 |
|
includes/wpsr-retweet.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
* Retweet buttons Processor code for WP Socializer Plugin
|
4 |
-
* Version : 2.
|
5 |
* Author : Aakash Chakravarthy
|
6 |
*/
|
7 |
|
@@ -46,6 +46,7 @@ function wpsr_retweet($args = ''){
|
|
46 |
|
47 |
$pid = $post->ID;
|
48 |
$purl = home_url() . '/?p=' . $pid;
|
|
|
49 |
|
50 |
## Start Output
|
51 |
$retweet_processed = "\n<!-- Start WP Socializer Plugin - Retweet Button -->\n";
|
@@ -109,7 +110,7 @@ function wpsr_retweet($args = ''){
|
|
109 |
|
110 |
// Display the image format
|
111 |
case 'image':
|
112 |
-
$retweet_processed .= '<a href="http://twitter.com/?status=RT @' . $username . ' ' . $title .' ' . $purl .'" ' . $params . '><img src="' . $image . '" /></a>';
|
113 |
break;
|
114 |
|
115 |
// Display the text format
|
1 |
<?php
|
2 |
/*
|
3 |
* Retweet buttons Processor code for WP Socializer Plugin
|
4 |
+
* Version : 2.2
|
5 |
* Author : Aakash Chakravarthy
|
6 |
*/
|
7 |
|
46 |
|
47 |
$pid = $post->ID;
|
48 |
$purl = home_url() . '/?p=' . $pid;
|
49 |
+
$title = trim(str_replace(array( '&', '#' ), '', $title)); // revised since v2.4.6
|
50 |
|
51 |
## Start Output
|
52 |
$retweet_processed = "\n<!-- Start WP Socializer Plugin - Retweet Button -->\n";
|
110 |
|
111 |
// Display the image format
|
112 |
case 'image':
|
113 |
+
$retweet_processed .= '<a href="http://twitter.com/?status=RT @' . $username . ' ' . $title .' ' . $purl .'" ' . $params . '><img src="' . $image . '" alt="Retweet" /></a>';
|
114 |
break;
|
115 |
|
116 |
// Display the text format
|
includes/wpsr-sharethis.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
* Sharethis buttons Processor code for WP Socializer Plugin
|
4 |
-
* Version : 2.
|
5 |
* Author : Aakash Chakravarthy
|
6 |
*/
|
7 |
|
@@ -68,7 +68,7 @@ function wpsr_sharethis($args = ''){
|
|
68 |
}
|
69 |
|
70 |
// $title = urlencode($title); (fix v2.1)
|
71 |
-
$url = urlencode($url);
|
72 |
|
73 |
if($addp == 1){
|
74 |
$before_st = '<p>';
|
@@ -152,8 +152,8 @@ function wpsr_sharethis_bt($type){
|
|
152 |
## Start Output
|
153 |
$wpsr_sharethis_processed = wpsr_sharethis(array(
|
154 |
'output' => $type,
|
155 |
-
'services' => $wpsr_sharethis[$type . '_order'],
|
156 |
-
'addp' => $
|
157 |
));
|
158 |
## End Output
|
159 |
|
1 |
<?php
|
2 |
/*
|
3 |
* Sharethis buttons Processor code for WP Socializer Plugin
|
4 |
+
* Version : 2.3
|
5 |
* Author : Aakash Chakravarthy
|
6 |
*/
|
7 |
|
68 |
}
|
69 |
|
70 |
// $title = urlencode($title); (fix v2.1)
|
71 |
+
// $url = urlencode($url); (fix v2.4.6)
|
72 |
|
73 |
if($addp == 1){
|
74 |
$before_st = '<p>';
|
152 |
## Start Output
|
153 |
$wpsr_sharethis_processed = wpsr_sharethis(array(
|
154 |
'output' => $type,
|
155 |
+
'services' => isset($wpsr_sharethis[$type . '_order']) ? $wpsr_sharethis[$type . '_order'] : '',
|
156 |
+
'addp' => $wpsr_sharethis['addp'],
|
157 |
));
|
158 |
## End Output
|
159 |
|
includes/wpsr-shortcodes.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
* Shortcodes for WP Socializer plugin
|
4 |
-
* Version : 2.
|
5 |
* Author : Aakash Chakravarthy
|
6 |
* Since : 2.0
|
7 |
*/
|
@@ -26,6 +26,8 @@ add_shortcode('wpsr_sharethis', 'wpsr_sharethis_shortcode');
|
|
26 |
|
27 |
## Retweet button Shortcode
|
28 |
function wpsr_retweet_shortcode($atts){
|
|
|
|
|
29 |
if($atts['service'] == 'twitter' || $atts['service'] == ''){
|
30 |
$script = ($atts['script'] == "0") ? '' : wpsr_retweet_twitter_script();
|
31 |
}elseif($atts['service'] == 'topsy'){
|
@@ -34,6 +36,7 @@ function wpsr_retweet_shortcode($atts){
|
|
34 |
$script = '';
|
35 |
}
|
36 |
|
|
|
37 |
return wpsr_retweet($atts) . $script;
|
38 |
}
|
39 |
add_shortcode('wpsr_retweet', 'wpsr_retweet_shortcode');
|
1 |
<?php
|
2 |
/*
|
3 |
* Shortcodes for WP Socializer plugin
|
4 |
+
* Version : 2.4
|
5 |
* Author : Aakash Chakravarthy
|
6 |
* Since : 2.0
|
7 |
*/
|
26 |
|
27 |
## Retweet button Shortcode
|
28 |
function wpsr_retweet_shortcode($atts){
|
29 |
+
$wpsr_retweet = get_option('wpsr_retweet_data');
|
30 |
+
|
31 |
if($atts['service'] == 'twitter' || $atts['service'] == ''){
|
32 |
$script = ($atts['script'] == "0") ? '' : wpsr_retweet_twitter_script();
|
33 |
}elseif($atts['service'] == 'topsy'){
|
36 |
$script = '';
|
37 |
}
|
38 |
|
39 |
+
$atts['username'] = $wpsr_retweet['username']; // Included @username for retweet buttons v2.4.6
|
40 |
return wpsr_retweet($atts) . $script;
|
41 |
}
|
42 |
add_shortcode('wpsr_retweet', 'wpsr_retweet_shortcode');
|
includes/wpsr-socialbuttons.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
* Social buttons Processor code for WP Socializer Plugin
|
4 |
-
* Version : 4.
|
5 |
* Author : Aakash Chakravarthy
|
6 |
*/
|
7 |
|
@@ -104,7 +104,8 @@ function wpsr_get_shorturl($url){
|
|
104 |
|
105 |
if(empty($username) || empty($apikey)){
|
106 |
if(in_the_loop()){
|
107 |
-
return urlencode(get_bloginfo('url') . '?p=' . $post->ID);
|
|
|
108 |
}else{
|
109 |
return urlencode($url);
|
110 |
}
|
@@ -156,9 +157,9 @@ function wpsr_socialbts_processlist($args = ''){
|
|
156 |
$url = urlencode($pUrl);
|
157 |
$deUrl = $pUrl;
|
158 |
|
159 |
-
$title = urlencode(trim($pTitle));
|
160 |
$deTitle = trim($pTitle);
|
161 |
-
|
162 |
$excerpt = trim(urlencode($pExcerpt));
|
163 |
$deExcerpt = htmlspecialchars($pExcerpt);
|
164 |
|
@@ -186,8 +187,10 @@ function wpsr_socialbts_processlist($args = ''){
|
|
186 |
$srvcsSplit = explode(',', $services);
|
187 |
$spriteImage = WPSR_SOCIALBT_IMGPATH . "wp-socializer-sprite-$pixel.png";
|
188 |
$spriteMaskImage = WPSR_SOCIALBT_IMGPATH . "wp-socializer-sprite-mask-$pixel.gif";
|
|
|
|
|
189 |
|
190 |
-
for($i = 0; $i <
|
191 |
$sitename = $srvcsSplit[$i];
|
192 |
$finalTitle = $sitename;
|
193 |
$finalName = $wpsr_socialsites_list[$sitename]['name'];
|
1 |
<?php
|
2 |
/*
|
3 |
* Social buttons Processor code for WP Socializer Plugin
|
4 |
+
* Version : 4.7
|
5 |
* Author : Aakash Chakravarthy
|
6 |
*/
|
7 |
|
104 |
|
105 |
if(empty($username) || empty($apikey)){
|
106 |
if(in_the_loop()){
|
107 |
+
//return urlencode(get_bloginfo('url') . '?p=' . $post->ID);
|
108 |
+
return urlencode($url); // changed since v2.4.6 as per user requests http://bit.ly/V6zsH7
|
109 |
}else{
|
110 |
return urlencode($url);
|
111 |
}
|
157 |
$url = urlencode($pUrl);
|
158 |
$deUrl = $pUrl;
|
159 |
|
160 |
+
$title = urlencode(trim(str_replace('–', '-', $pTitle))); // Revised in v2.4.6
|
161 |
$deTitle = trim($pTitle);
|
162 |
+
|
163 |
$excerpt = trim(urlencode($pExcerpt));
|
164 |
$deExcerpt = htmlspecialchars($pExcerpt);
|
165 |
|
187 |
$srvcsSplit = explode(',', $services);
|
188 |
$spriteImage = WPSR_SOCIALBT_IMGPATH . "wp-socializer-sprite-$pixel.png";
|
189 |
$spriteMaskImage = WPSR_SOCIALBT_IMGPATH . "wp-socializer-sprite-mask-$pixel.gif";
|
190 |
+
$srvcsCount = count($srvcsSplit);
|
191 |
+
$socialbts_list = '';
|
192 |
|
193 |
+
for($i = 0; $i < $srvcsCount; $i++){
|
194 |
$sitename = $srvcsSplit[$i];
|
195 |
$finalTitle = $sitename;
|
196 |
$finalName = $wpsr_socialsites_list[$sitename]['name'];
|
public/css/wp-socializer-buttons-css.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
/*
|
2 |
-
* WP Socializer Social buttons - CSS File - v2.
|
3 |
* Author: Aakash Chakravarthy
|
4 |
*/
|
5 |
|
@@ -110,6 +110,10 @@
|
|
110 |
.wp-socializer-buttons .wpsr-btn iframe{
|
111 |
margin: 0px !important; /** Fix for Facebook v2.4.2 **/
|
112 |
}
|
|
|
|
|
|
|
|
|
113 |
.floatleft{
|
114 |
float:left !important;
|
115 |
}
|
1 |
/*
|
2 |
+
* WP Socializer Social buttons - CSS File - v2.5
|
3 |
* Author: Aakash Chakravarthy
|
4 |
*/
|
5 |
|
110 |
.wp-socializer-buttons .wpsr-btn iframe{
|
111 |
margin: 0px !important; /** Fix for Facebook v2.4.2 **/
|
112 |
}
|
113 |
+
/** Facebook clipping fix v2.4.6 **/
|
114 |
+
.wp-socializer-buttons .wpsr-btn .fb-like .fb_send_button_form_widget > span{
|
115 |
+
width: 401px !important;
|
116 |
+
}
|
117 |
.floatleft{
|
118 |
float:left !important;
|
119 |
}
|
readme.txt
CHANGED
@@ -5,9 +5,9 @@ Plugin URI: http://www.aakashweb.com/wordpress-plugins/wp-socializer/
|
|
5 |
Tags: social, social bookmarking, bookmarks, bookmarking, bookmarks menu, share, sharing, search, rss, post, posts, plugin, seo, page, pages, google, widget, excerpt, content, bookmark, button, technorati, email, gmail, facebook, twitter, retweet, myspace, diigo, delicious, digg, buzz, linkedin, google buzz, yahoo, reddit, dzone, sphinn, addthis, template, socializer, sociable, wp, wordpress, sexy bookmarks
|
6 |
License: GPLv2 or later
|
7 |
Donate Link: http://bit.ly/wpsrDonate
|
8 |
-
Requires at least:
|
9 |
-
Tested up to: 3.
|
10 |
-
Stable tag: 2.4.
|
11 |
|
12 |
Super Cool Plugin for inserting all kinds of Social Bookmarking & Sharing buttons. Has customizable Floating Share Bar, Widgets, Shortcodes also.
|
13 |
|
@@ -15,6 +15,8 @@ Super Cool Plugin for inserting all kinds of Social Bookmarking & Sharing button
|
|
15 |
|
16 |
WP Socializer is an advanced plugin for inserting all kinds of Social bookmarking & sharing buttons. It has super cool features to insert the buttons into posts, sidebar. It also has Floating sharebar.
|
17 |
|
|
|
|
|
18 |
= Notable features =
|
19 |
|
20 |
* Insert all kinds of social buttons in posts & pages.
|
@@ -24,47 +26,58 @@ WP Socializer is an advanced plugin for inserting all kinds of Social bookmarkin
|
|
24 |
* Widgets for inserting FB like box & G+ badges in sidebar.
|
25 |
* Template functions are available for advanced placements.
|
26 |
|
27 |
-
= New in v2.4.
|
28 |
-
*
|
29 |
-
*
|
30 |
-
*
|
31 |
-
*
|
32 |
-
*
|
33 |
|
34 |
-
[
|
35 |
|
36 |
= Buttons available =
|
37 |
|
38 |
Using WP Socializer, you can insert all these buttons into your site. These buttons can be inserted easily in any desired way. There is no fixed way as other plugins do.
|
39 |
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
* 3 Kinds of retweet buttons.
|
47 |
-
* ... and all kinds of Digg, LinkedIn, Reddit & StumbleUpon buttons
|
48 |
-
* Comments button for floating share bar.
|
49 |
|
50 |
-
|
|
|
51 |
|
52 |
-
|
53 |
|
54 |
-
|
55 |
|
56 |
-
=
|
57 |
|
58 |
-
|
59 |
|
60 |
-
|
61 |
|
62 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
|
64 |
= Reference links =
|
65 |
For more information on the plugin, you can use the below links.
|
66 |
|
67 |
-
[**Homepage**](http://www.aakashweb.com/wordpress-plugins/wp-socializer/)
|
|
|
|
|
|
|
68 |
|
69 |
* [Template function reference](http://www.aakashweb.com/docs/wp-socializer-docs/function-reference/).
|
70 |
* [Manual placement](http://www.aakashweb.com/docs/wp-socializer-docs/manual-placement/).
|
@@ -107,6 +120,24 @@ For custom placement in theme files and posts, check out the following documenta
|
|
107 |
|
108 |
== Changelog ==
|
109 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
= 2.4.5 =
|
111 |
* New "Smart Load" feature to load buttons faster using async method.
|
112 |
* Can load button scripts after a specific time (Smart Load).
|
5 |
Tags: social, social bookmarking, bookmarks, bookmarking, bookmarks menu, share, sharing, search, rss, post, posts, plugin, seo, page, pages, google, widget, excerpt, content, bookmark, button, technorati, email, gmail, facebook, twitter, retweet, myspace, diigo, delicious, digg, buzz, linkedin, google buzz, yahoo, reddit, dzone, sphinn, addthis, template, socializer, sociable, wp, wordpress, sexy bookmarks
|
6 |
License: GPLv2 or later
|
7 |
Donate Link: http://bit.ly/wpsrDonate
|
8 |
+
Requires at least: 3.1
|
9 |
+
Tested up to: 3.5.x
|
10 |
+
Stable tag: 2.4.6
|
11 |
|
12 |
Super Cool Plugin for inserting all kinds of Social Bookmarking & Sharing buttons. Has customizable Floating Share Bar, Widgets, Shortcodes also.
|
13 |
|
15 |
|
16 |
WP Socializer is an advanced plugin for inserting all kinds of Social bookmarking & sharing buttons. It has super cool features to insert the buttons into posts, sidebar. It also has Floating sharebar.
|
17 |
|
18 |
+
[Check out the **LIVE DEMO** of the plugin](http://www.aakashweb.com/demos/wp-socializer/)
|
19 |
+
|
20 |
= Notable features =
|
21 |
|
22 |
* Insert all kinds of social buttons in posts & pages.
|
26 |
* Widgets for inserting FB like box & G+ badges in sidebar.
|
27 |
* Template functions are available for advanced placements.
|
28 |
|
29 |
+
= New in v2.4.6 =
|
30 |
+
* Smarter tracing of images in a post for pinterest.
|
31 |
+
* Bug fixed in the "title" tag for twitter in the urlencoding of hyphen.
|
32 |
+
* Bug fixed in the mailto link for the "email" button
|
33 |
+
* Admin interface tweaked and now more helpful and easy
|
34 |
+
* Fixed several "W3 Validator" errors
|
35 |
|
36 |
+
[More changes listed in Changelog](changelog)
|
37 |
|
38 |
= Buttons available =
|
39 |
|
40 |
Using WP Socializer, you can insert all these buttons into your site. These buttons can be inserted easily in any desired way. There is no fixed way as other plugins do.
|
41 |
|
42 |
+
**107** Social bookmarking buttons (in both 16px and 32px) - [Demo](http://www.aakashweb.com/demos/wp-socializer/social-buttons/), Addthis, Sharethis, Facebook like, Google +1, Pinterest, 3 Kinds of Retweet and all kinds of Digg, LinkedIn, Reddit & StumbleUpon buttons
|
43 |
+
|
44 |
+
[youtube="http://www.youtube.com/v/1uimAE8rFYE"]
|
45 |
+
|
46 |
+
= Social Share bar =
|
47 |
+
Sharebar is one of the coolest feature of the plugin. There are two modes. [Demo](http://www.aakashweb.com/demos/wp-socializer/)
|
|
|
|
|
|
|
48 |
|
49 |
+
* Vertical mode
|
50 |
+
* Horizontal mode
|
51 |
|
52 |
+
= Smart Load =
|
53 |
|
54 |
+
The button scripts can be loaded in a Smart manner increasing page speed and performance. The below video describes it.
|
55 |
|
56 |
+
[youtube="http://www.youtube.com/v/OY7XdJnUqmo"]
|
57 |
|
58 |
+
= Shortcodes =
|
59 |
|
60 |
+
WP Socializer uses the shortcodes feature in a full fledged manner to produce Social buttons whenever needed in posts and pages. Check out the complete [working of the Shortcodes feature in this page](http://www.aakashweb.com/demos/wp-socializer/shortcodes/)
|
61 |
|
62 |
+
= Widgets =
|
63 |
+
|
64 |
+
Social widgets can also be added easily without any external individual plugins, thus making the plugin all-in-one.
|
65 |
+
|
66 |
+
= Social Bookmarking buttons =
|
67 |
+
|
68 |
+
There are whole lot of Social bookmarking buttons avaialble in WP Socializer, which can be used in many possible ways. They can be rearranged and used as required by the theme. [This page](http://www.aakashweb.com/demos/wp-socializer/social-buttons) demonstrates the complete working.
|
69 |
+
|
70 |
+
= and more ... =
|
71 |
+
|
72 |
+
> **Donate:** If you find this plugin useful, [consider making a donation](http://bit.ly/wpsrDonate), it will make me happy for this plugin!!
|
73 |
|
74 |
= Reference links =
|
75 |
For more information on the plugin, you can use the below links.
|
76 |
|
77 |
+
* [**Homepage**](http://www.aakashweb.com/wordpress-plugins/wp-socializer/)
|
78 |
+
* [**Support Forum**](http://www.aakashweb.com/forum/)
|
79 |
+
|
80 |
+
Documentation:
|
81 |
|
82 |
* [Template function reference](http://www.aakashweb.com/docs/wp-socializer-docs/function-reference/).
|
83 |
* [Manual placement](http://www.aakashweb.com/docs/wp-socializer-docs/manual-placement/).
|
120 |
|
121 |
== Changelog ==
|
122 |
|
123 |
+
= 2.4.6 =
|
124 |
+
* Retweet floating share bar "username" bug fixed
|
125 |
+
* Smarter tracing of images in a post for pinterest
|
126 |
+
* Revised code for getting post details
|
127 |
+
* Bug fixed in the "title" tag for twitter in the urlencoding of hyphen.
|
128 |
+
* Bug fixed in the mailto link for the "email" button
|
129 |
+
* Changed hover title of "add to favorites"
|
130 |
+
* Cleared various "error notices" in the front end
|
131 |
+
* Fixed several "&" to "&" conversion for the social buttons
|
132 |
+
* Fixed no "alt" attribute to retweet and pinterest buttons
|
133 |
+
* Fixed several "W3 Validator" errors
|
134 |
+
* Admin interface tweaked and now more helpful and easy
|
135 |
+
* Admin page tabs are renamed
|
136 |
+
* Admin page "In posts and pages" is renamed to "Shortcodes"
|
137 |
+
* Bug fixed in the publisher key field in the admin page
|
138 |
+
* Removed url encoding for Sharethis buttons
|
139 |
+
* Fixed Facebook send form "Clipping"
|
140 |
+
|
141 |
= 2.4.5 =
|
142 |
* New "Smart Load" feature to load buttons faster using async method.
|
143 |
* Can load button scripts after a specific time (Smart Load).
|
wp-socializer.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: WP Socializer
|
4 |
-
Version: 2.4.
|
5 |
Plugin URI: http://www.aakashweb.com/
|
6 |
Description: WP Socializer is an advanced plugin for inserting all kinds of Social bookmarking & sharing buttons. It has super cool features to insert the buttons into posts, sidebar. It also has Floating sharebar and Smart load feature. <a href="http://youtu.be/1uimAE8rFYE" target="_blank">Check out the demo video</a>.
|
7 |
Author: Aakash Chakravarthy
|
@@ -14,7 +14,7 @@ if(!defined('WP_CONTENT_URL')) {
|
|
14 |
$wpsr_url = WP_CONTENT_URL . '/plugins/' . plugin_basename(dirname(__FILE__)) . '/';
|
15 |
}
|
16 |
|
17 |
-
define('WPSR_VERSION', '2.4.
|
18 |
define('WPSR_AUTHOR', 'Aakash Chakravarthy');
|
19 |
define('WPSR_URL', $wpsr_url);
|
20 |
define('WPSR_PUBLIC_URL', WPSR_URL . 'public/');
|
@@ -25,7 +25,7 @@ $wpsr_socialsites_list = array(
|
|
25 |
|
26 |
'addtofavorites' => array(
|
27 |
'name' => 'Add to favorites',
|
28 |
-
'titleText' => '{de-title}
|
29 |
'icon' => 'addtofavorites.png',
|
30 |
'url' => '{de-url}" onclick="addBookmark(event);',
|
31 |
'support32px' => 1,
|
@@ -198,7 +198,7 @@ $wpsr_socialsites_list = array(
|
|
198 |
'name' => 'Email',
|
199 |
'titleText' => __('Email this ', 'wpsr') . '',
|
200 |
'icon' => 'email.png',
|
201 |
-
'url' => 'mailto:?subject={
|
202 |
'support32px' => 1,
|
203 |
),
|
204 |
|
@@ -621,7 +621,7 @@ $wpsr_socialsites_list = array(
|
|
621 |
'name' => 'Pinterest',
|
622 |
'titleText' => __('Submit this to ', 'wpsr') . 'Pinterest',
|
623 |
'icon' => 'pinterest.png',
|
624 |
-
'url' => 'http://www.pinterest.com/pin/create/button/?url={url}&media={image}&description={excerpt}',
|
625 |
'support32px' => 1,
|
626 |
),// Added version 2.4 - 13-2-2012
|
627 |
|
@@ -783,7 +783,7 @@ $wpsr_socialsites_list = array(
|
|
783 |
'name' => 'Twitter',
|
784 |
'titleText' => __('Tweet this !', 'wpsr') . '',
|
785 |
'icon' => 'twitter.png',
|
786 |
-
'url' => 'http://twitter.com/home?status={
|
787 |
'support32px' => 1,
|
788 |
),
|
789 |
|
@@ -995,6 +995,15 @@ function wpsr_init(){
|
|
995 |
}
|
996 |
add_action('admin_init','wpsr_init');
|
997 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
998 |
## Include WP Socializer Processer files
|
999 |
require_once('admin/wpsr-admin.php');
|
1000 |
require_once('admin/wpsr-admin-other.php');
|
@@ -1012,15 +1021,6 @@ require_once('includes/wpsr-shortcodes.php');
|
|
1012 |
require_once('includes/wpsr-widgets.php'); // Since v2.3
|
1013 |
require_once('includes/wpsr-floatingbar.php'); // Since v2.4
|
1014 |
|
1015 |
-
## General function
|
1016 |
-
function strpos_arr($haystack, $needle) {
|
1017 |
-
if(!is_array($needle)) $needle = array($needle);
|
1018 |
-
foreach($needle as $what) {
|
1019 |
-
if(($pos = strpos($haystack, $what))!==false) return $pos;
|
1020 |
-
}
|
1021 |
-
return false;
|
1022 |
-
}
|
1023 |
-
|
1024 |
## wpsr Is active check
|
1025 |
function wpsr_is_active(){
|
1026 |
if (get_option("wpsr_active") == 1) {
|
@@ -1160,56 +1160,62 @@ function wp_socializer($to_display, $params=""){
|
|
1160 |
*
|
1161 |
* Uses super variables to get the page url outside loop and wp_title()
|
1162 |
* to get the page title.
|
|
|
|
|
1163 |
**/
|
1164 |
|
1165 |
function wpsr_get_post_details(){
|
1166 |
// Get the global variables
|
1167 |
-
global $post;
|
1168 |
-
|
1169 |
-
// Inside loop
|
1170 |
-
$permalink_inside_loop = get_permalink($post->ID);
|
1171 |
-
$title_inside_loop = str_replace('+', '%20', get_the_title($post->ID));
|
1172 |
-
$excerpt_inside_loop = strip_tags(strip_shortcodes($post->post_excerpt));
|
1173 |
-
$image_inside_loop = wpsr_get_first_image($post->ID);
|
1174 |
-
|
1175 |
-
// If excerpt is null
|
1176 |
-
if($excerpt_inside_loop == ''){
|
1177 |
-
$excerpt_inside_loop = substr(strip_tags(strip_shortcodes($post->post_content)), 0, 250);
|
1178 |
-
}
|
1179 |
-
|
1180 |
-
// Outside loop
|
1181 |
-
$permalink_outside_loop = (!empty($_SERVER['HTTPS'])) ? "https://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'] : "http://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
|
1182 |
-
$title_outside_loop = str_replace('+', '%20', wp_title('', 0));
|
1183 |
-
$excerpt_outside_loop = $title_outside_loop;
|
1184 |
-
|
1185 |
-
// If title is null
|
1186 |
-
if($title_outside_loop == ''){
|
1187 |
-
$title_outside_loop = str_replace('+', '%20', get_bloginfo('name'));
|
1188 |
-
}
|
1189 |
|
|
|
1190 |
if(in_the_loop()){
|
1191 |
-
|
1192 |
-
|
1193 |
-
|
1194 |
-
|
1195 |
-
|
1196 |
-
);
|
1197 |
-
|
1198 |
}else{
|
1199 |
-
|
1200 |
-
|
1201 |
-
|
1202 |
-
|
1203 |
-
|
1204 |
-
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1205 |
}
|
1206 |
-
|
1207 |
-
return $details
|
|
|
|
|
|
|
|
|
|
|
1208 |
|
1209 |
}
|
1210 |
|
1211 |
// Get the first image of the post
|
1212 |
-
function wpsr_get_first_image($postID){
|
1213 |
$args = array(
|
1214 |
'numberposts' => 1,
|
1215 |
'order'=> 'ASC',
|
@@ -1220,12 +1226,30 @@ function wpsr_get_first_image($postID){
|
|
1220 |
);
|
1221 |
|
1222 |
$attachments = get_children( $args );
|
1223 |
-
|
|
|
1224 |
if ($attachments){
|
1225 |
foreach($attachments as $attachment){
|
1226 |
return $attachment->guid;
|
1227 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1228 |
}
|
|
|
1229 |
}
|
1230 |
|
1231 |
function wpsr_process_template($no, $rss = 0){
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: WP Socializer
|
4 |
+
Version: 2.4.6
|
5 |
Plugin URI: http://www.aakashweb.com/
|
6 |
Description: WP Socializer is an advanced plugin for inserting all kinds of Social bookmarking & sharing buttons. It has super cool features to insert the buttons into posts, sidebar. It also has Floating sharebar and Smart load feature. <a href="http://youtu.be/1uimAE8rFYE" target="_blank">Check out the demo video</a>.
|
7 |
Author: Aakash Chakravarthy
|
14 |
$wpsr_url = WP_CONTENT_URL . '/plugins/' . plugin_basename(dirname(__FILE__)) . '/';
|
15 |
}
|
16 |
|
17 |
+
define('WPSR_VERSION', '2.4.6');
|
18 |
define('WPSR_AUTHOR', 'Aakash Chakravarthy');
|
19 |
define('WPSR_URL', $wpsr_url);
|
20 |
define('WPSR_PUBLIC_URL', WPSR_URL . 'public/');
|
25 |
|
26 |
'addtofavorites' => array(
|
27 |
'name' => 'Add to favorites',
|
28 |
+
'titleText' => 'Add to favorites', // Changed from {de-title} @v2.4.6
|
29 |
'icon' => 'addtofavorites.png',
|
30 |
'url' => '{de-url}" onclick="addBookmark(event);',
|
31 |
'support32px' => 1,
|
198 |
'name' => 'Email',
|
199 |
'titleText' => __('Email this ', 'wpsr') . '',
|
200 |
'icon' => 'email.png',
|
201 |
+
'url' => 'mailto:?to=&subject={title}&body={excerpt}%20-%20{de-url}', // Fixed the bugs in v2.4.1, v2.4.3 & v2.4.6
|
202 |
'support32px' => 1,
|
203 |
),
|
204 |
|
621 |
'name' => 'Pinterest',
|
622 |
'titleText' => __('Submit this to ', 'wpsr') . 'Pinterest',
|
623 |
'icon' => 'pinterest.png',
|
624 |
+
'url' => 'http://www.pinterest.com/pin/create/button/?url={url}&media={image}&description={excerpt}', // Changed & to & in v2.4.6
|
625 |
'support32px' => 1,
|
626 |
),// Added version 2.4 - 13-2-2012
|
627 |
|
783 |
'name' => 'Twitter',
|
784 |
'titleText' => __('Tweet this !', 'wpsr') . '',
|
785 |
'icon' => 'twitter.png',
|
786 |
+
'url' => 'http://twitter.com/home?status={title}%20-%20{s-url}%20{twitter-username}',
|
787 |
'support32px' => 1,
|
788 |
),
|
789 |
|
995 |
}
|
996 |
add_action('admin_init','wpsr_init');
|
997 |
|
998 |
+
## General function
|
999 |
+
function strpos_arr($haystack, $needle) {
|
1000 |
+
if(!is_array($needle)) $needle = array($needle);
|
1001 |
+
foreach($needle as $what) {
|
1002 |
+
if(($pos = strpos($haystack, $what))!==false) return $pos;
|
1003 |
+
}
|
1004 |
+
return false;
|
1005 |
+
}
|
1006 |
+
|
1007 |
## Include WP Socializer Processer files
|
1008 |
require_once('admin/wpsr-admin.php');
|
1009 |
require_once('admin/wpsr-admin-other.php');
|
1021 |
require_once('includes/wpsr-widgets.php'); // Since v2.3
|
1022 |
require_once('includes/wpsr-floatingbar.php'); // Since v2.4
|
1023 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1024 |
## wpsr Is active check
|
1025 |
function wpsr_is_active(){
|
1026 |
if (get_option("wpsr_active") == 1) {
|
1160 |
*
|
1161 |
* Uses super variables to get the page url outside loop and wp_title()
|
1162 |
* to get the page title.
|
1163 |
+
*
|
1164 |
+
* Modified since: v2.4.6
|
1165 |
**/
|
1166 |
|
1167 |
function wpsr_get_post_details(){
|
1168 |
// Get the global variables
|
1169 |
+
global $post, $wp_query;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1170 |
|
1171 |
+
// Post details within the loop
|
1172 |
if(in_the_loop()){
|
1173 |
+
|
1174 |
+
$url = get_permalink($post->ID);
|
1175 |
+
$title = get_the_title($post->ID);
|
1176 |
+
$excerpt = strip_tags(strip_shortcodes($post->post_excerpt));
|
1177 |
+
$excerpt = (empty($excerpt)) ? substr(strip_tags(strip_shortcodes($post->post_content)), 0, 250) : $excerpt;
|
1178 |
+
$image = wpsr_get_first_image($post->ID, $post->post_content);
|
1179 |
+
|
1180 |
}else{
|
1181 |
+
|
1182 |
+
// Post details outside the loop
|
1183 |
+
$url = (!empty($_SERVER['HTTPS'])) ? "https://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'] : "http://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
|
1184 |
+
$title = wp_title('', 0);
|
1185 |
+
$title = (empty($title)) ? get_bloginfo('name') : $title;
|
1186 |
+
$title = str_replace(array('<title>', '</title>'), '', $title);
|
1187 |
+
|
1188 |
+
// If the page is singular, then get the excerpt & image outside loop
|
1189 |
+
if(is_singular()){
|
1190 |
+
|
1191 |
+
$pObj = $wp_query->get_queried_object();
|
1192 |
+
$pId = $wp_query->get_queried_object_id();
|
1193 |
+
|
1194 |
+
$excerpt = strip_tags(strip_shortcodes($pObj->post_excerpt));
|
1195 |
+
$excerpt = (empty($excerpt)) ? substr(strip_tags(strip_shortcodes($pObj->post_content)), 0, 250) : $excerpt;
|
1196 |
+
$image = wpsr_get_first_image($pId, $pObj->post_content);
|
1197 |
+
|
1198 |
+
}else{
|
1199 |
+
|
1200 |
+
// If the page is other than singular default the excerpt to the page title
|
1201 |
+
$excerpt = $title;
|
1202 |
+
$image = '';
|
1203 |
+
|
1204 |
+
}
|
1205 |
+
|
1206 |
}
|
1207 |
+
|
1208 |
+
return $details = array(
|
1209 |
+
'permalink' => $url,
|
1210 |
+
'title' => trim($title),
|
1211 |
+
'excerpt' => trim($excerpt),
|
1212 |
+
'image' => $image
|
1213 |
+
);
|
1214 |
|
1215 |
}
|
1216 |
|
1217 |
// Get the first image of the post
|
1218 |
+
function wpsr_get_first_image($postID, $postCnt = ''){
|
1219 |
$args = array(
|
1220 |
'numberposts' => 1,
|
1221 |
'order'=> 'ASC',
|
1226 |
);
|
1227 |
|
1228 |
$attachments = get_children( $args );
|
1229 |
+
|
1230 |
+
// Check for image attachments in posts
|
1231 |
if ($attachments){
|
1232 |
foreach($attachments as $attachment){
|
1233 |
return $attachment->guid;
|
1234 |
}
|
1235 |
+
}else{
|
1236 |
+
// If no image attachements, then get the full post thumbnail
|
1237 |
+
if(function_exists('has_post_thumbnail') && has_post_thumbnail($postID)){
|
1238 |
+
$imageId = get_post_thumbnail_id($postID);
|
1239 |
+
$imageUrl = wp_get_attachment_image_src($imageId, 'large');
|
1240 |
+
return $imageUrl[0];
|
1241 |
+
}else{
|
1242 |
+
// Or else get the first image present in the post content
|
1243 |
+
$output = preg_match_all( '/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $postCnt, $matches );
|
1244 |
+
|
1245 |
+
if(!empty($matches[1])){
|
1246 |
+
$firstImg = $matches [1] [0];
|
1247 |
+
return $firstImg;
|
1248 |
+
}
|
1249 |
+
|
1250 |
+
}
|
1251 |
}
|
1252 |
+
|
1253 |
}
|
1254 |
|
1255 |
function wpsr_process_template($no, $rss = 0){
|