Version Description
- FIXED: Google plus problem
Download this release
Release Info
Developer | sociable |
Plugin | Sociable |
Version | 4.1.2 |
Comparing to | |
See all releases |
Code changes from version 4.1.1 to 4.1.2
- readme.txt +7 -3
- sociable.php +1193 -201
readme.txt
CHANGED
@@ -6,7 +6,7 @@ Tested up to version: 3.2.1
|
|
6 |
Requires at least: 2.6
|
7 |
|
8 |
Tested up to: 3.2.1
|
9 |
-
Stable tag: 4.1.
|
10 |
== Description ==
|
11 |
Sociable continues being the leader in the sharing space of WordPress plugins. Started more than 2 years ago, and with over 1,2mm downloads now, here comes the version 4.1, with everything you expect to get, and then some.
|
12 |
|
@@ -25,7 +25,7 @@ What happened to the old icons? You can still use them in the new version, but t
|
|
25 |
|
26 |
Sociable finds its home outside of the WordPress environment on Blogplay.com-
|
27 |
|
28 |
-
*** Sociable 4.1.
|
29 |
|
30 |
= Recent Updates =
|
31 |
* Changed the old motto "share and enjoy" for "Be Sociable, Share" much more attractive. Of cours you can customize it to whatever you want.
|
@@ -73,8 +73,12 @@ Please send us an email to sociableblogplay [ at ] gmail.com
|
|
73 |
|
74 |
== Changelog ==
|
75 |
|
|
|
|
|
|
|
76 |
= 4.1.1 =
|
77 |
-
* ADDED: Facebook Like Counter, Twitter Counter, Google Plus Counter, Linkedin Counter,StumbleUpon Counter and Digg Counter
|
|
|
78 |
|
79 |
= 4.0.6 =
|
80 |
* FIXED: Allow Sub Directory Blogs (http://domain.com/blog)
|
6 |
Requires at least: 2.6
|
7 |
|
8 |
Tested up to: 3.2.1
|
9 |
+
Stable tag: 4.1.2
|
10 |
== Description ==
|
11 |
Sociable continues being the leader in the sharing space of WordPress plugins. Started more than 2 years ago, and with over 1,2mm downloads now, here comes the version 4.1, with everything you expect to get, and then some.
|
12 |
|
25 |
|
26 |
Sociable finds its home outside of the WordPress environment on Blogplay.com-
|
27 |
|
28 |
+
*** Sociable 4.1.2 ***
|
29 |
|
30 |
= Recent Updates =
|
31 |
* Changed the old motto "share and enjoy" for "Be Sociable, Share" much more attractive. Of cours you can customize it to whatever you want.
|
73 |
|
74 |
== Changelog ==
|
75 |
|
76 |
+
= 4.1.2 =
|
77 |
+
* FIXED: Google plus problem
|
78 |
+
|
79 |
= 4.1.1 =
|
80 |
+
* ADDED: Facebook Like Counter, Twitter Counter, Google Plus Counter, Linkedin Counter,StumbleUpon Counter and Digg Counter
|
81 |
+
* ADDED: Add Sociable at Top and Bottom of the post
|
82 |
|
83 |
= 4.0.6 =
|
84 |
* FIXED: Allow Sub Directory Blogs (http://domain.com/blog)
|
sociable.php
CHANGED
@@ -1,201 +1,1193 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Plugin Name: Sociable
|
4 |
-
Plugin URI: http://blogplay.com/plugin
|
5 |
-
Description: Automatically add links on your posts, pages and RSS feed to your favorite social bookmarking sites.
|
6 |
-
Version: 4.1.1
|
7 |
-
Author: Blogplay
|
8 |
-
Author URI: http://blogplay.com/
|
9 |
-
|
10 |
-
Copyright 2006 Peter Harkins (ph@malaprop.org)
|
11 |
-
Copyright 2008-2009 Joost de Valk (joost@yoast.com)
|
12 |
-
Copyright 2009-Present Blogplay.com (info@blogplay.com)
|
13 |
-
|
14 |
-
This program is free software; you can redistribute it and/or modify
|
15 |
-
it under the terms of the GNU General Public License as published by
|
16 |
-
the Free Software Foundation; either version 2 of the License, or
|
17 |
-
(at your option) any later version.
|
18 |
-
|
19 |
-
This program is distributed in the hope that it will be useful,
|
20 |
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
21 |
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
22 |
-
GNU General Public License for more details.
|
23 |
-
|
24 |
-
You should have received a copy of the GNU General Public License
|
25 |
-
along with this program; if not, write to the Free Software
|
26 |
-
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
27 |
-
|
28 |
-
|
29 |
-
*/
|
30 |
-
|
31 |
-
/*
|
32 |
-
* Define Some Paths
|
33 |
-
*/
|
34 |
-
define( 'SOCIABLE_HTTP_PATH' , WP_PLUGIN_URL . '/' . str_replace(basename( __FILE__) , "" , plugin_basename(__FILE__) ) );
|
35 |
-
define( 'SOCIABLE_ABSPATH' , WP_PLUGIN_DIR . '/' . str_replace(basename( __FILE__) , "" , plugin_basename(__FILE__) ) );
|
36 |
-
|
37 |
-
/*
|
38 |
-
* Includes
|
39 |
-
*/
|
40 |
-
include 'includes/class-sociable_Admin_Options.php';
|
41 |
-
include 'includes/class-Sociable_Globals.php';
|
42 |
-
include 'includes/sociable_output.php';
|
43 |
-
|
44 |
-
/*
|
45 |
-
* Global Variables
|
46 |
-
*/
|
47 |
-
//$sociable_known_sites = Sociable_Globals::default_sites();
|
48 |
-
$sociable_options = get_option( 'sociable_options' );
|
49 |
-
//print_r($sociable_options);
|
50 |
-
//$sociable_post_types = array(); //Set This blank here, won't work before init
|
51 |
-
//$sociable_taxonomies = array(); //Same Here
|
52 |
-
|
53 |
-
/*
|
54 |
-
* General Init Function
|
55 |
-
*/
|
56 |
-
function sociable_init(){
|
57 |
-
global $sociable_post_types, $sociable_taxonomies, $sociable_options;
|
58 |
-
load_plugin_textdomain( 'sociable', false, dirname( plugin_basename( __FILE__ ) )."/languages" );
|
59 |
-
$active_sites = ( isset( $sociable_options['active_sites'] ) ) ? $sociable_options['active_sites'] : array() ;
|
60 |
-
//Set The Post Types
|
61 |
-
$sociable_post_types = Sociable_Globals::sociable_get_post_types();
|
62 |
-
|
63 |
-
//Set The Custom Taxonomies
|
64 |
-
$sociable_taxonomies = Sociable_Globals::sociable_get_taxonomies();
|
65 |
-
if( array_key_exists( 'More' , $active_sites ) ){
|
66 |
wp_enqueue_script( 'sociable' , SOCIABLE_HTTP_PATH . 'js/sociable.js' );
|
67 |
}
|
68 |
-
if( ! is_admin() ){
|
69 |
-
//Load Up The Front Of Site CSS And JS
|
70 |
-
|
71 |
-
if( array_key_exists( 'Add to favorites' , $active_sites ) ){
|
72 |
-
// wp_enqueue_script( 'addtofavourites' , SOCIABLE_HTTP_PATH . 'js/addtofavorites.js' );
|
73 |
-
}
|
74 |
|
75 |
-
|
76 |
-
if( isset( $sociable_options['use_stylesheet'] ) ){
|
77 |
-
wp_enqueue_style( 'sociablecss' , SOCIABLE_HTTP_PATH . 'css/sociable.css' );
|
78 |
-
}
|
79 |
-
|
80 |
-
}
|
81 |
-
|
82 |
-
|
83 |
-
}
|
84 |
-
|
85 |
-
/*
|
86 |
-
* Hooks And Filters
|
87 |
-
*/
|
88 |
-
add_action( 'admin_init' , array( 'sociable_Admin_Options' , 'init' ) );
|
89 |
-
add_action( 'admin_menu' , array( 'sociable_Admin_Options' , 'add_menu_pages' ) );
|
90 |
-
add_action( 'save_post' , array( 'sociable_Admin_Options' , 'save_post' ) );
|
91 |
-
add_action( 'init' , 'sociable_init' );
|
92 |
-
|
93 |
-
add_filter( 'the_content', 'auto_sociable' );
|
94 |
-
add_filter( 'the_excerpt', 'auto_sociable' );
|
95 |
-
|
96 |
-
register_activation_hook(__FILE__, 'sociable_activate' );
|
97 |
-
register_deactivation_hook( __FILE__, 'sociable_deactivate' );
|
98 |
-
|
99 |
-
/*
|
100 |
-
* Activation Function
|
101 |
-
*/
|
102 |
-
function sociable_activate(){
|
103 |
-
|
104 |
-
if( ! get_option( 'sociable_options' ) ){
|
105 |
-
return sociable_reset();
|
106 |
-
}
|
107 |
-
|
108 |
-
}
|
109 |
-
|
110 |
-
/*
|
111 |
-
* Reset Function
|
112 |
-
*/
|
113 |
-
function sociable_reset(){
|
114 |
-
global $wpdb;
|
115 |
-
//reset all data to factory defaults, install if is there.
|
116 |
-
//Delete All Metadata From The Database ?
|
117 |
-
$wpdb->query("DELETE FROM $wpdb->postmeta WHERE meta_key = '_sociableoff'");
|
118 |
-
|
119 |
-
$sociable_options = array(
|
120 |
'automatic_mode' => 'on',
|
121 |
'tagline' => 'Be Sociable, Share!',
|
122 |
'custom_image_directory' => '',
|
123 |
'use_stylesheet' => 'on',
|
124 |
'use_images' => 'on',
|
125 |
|
126 |
'use_alphamask' => 'on',
|
127 |
'new_window' => 'on',
|
128 |
'locations' => array(
|
129 |
'is_single' => 'on',
|
130 |
'is_page' => 'on'
|
131 |
),
|
132 |
'active_sites' => array(
|
133 |
'Facebook' => 'on',
|
134 |
'StumbleUpon' =>'on',
|
135 |
),
|
136 |
'icon_size' => '32',
|
137 |
);
|
138 |
-
|
139 |
-
$sociable_known_sites = array(
|
140 |
'Facebook' => array(
|
141 |
'favicon' => 'facebook.png',
|
142 |
'url' => 'http://www.facebook.com/share.php?u=PERMALINK&t=TITLE',
|
143 |
'16' => array("-48px","0px"),
|
144 |
'32' => array("-96px","0px"),
|
145 |
'48' => array("-144px","0px"),
|
146 |
'64' => array("-192px","0px")
|
147 |
)
|
148 |
),
|
149 |
'favicon' => 'likecounter.png',
|
150 |
'url' => '<iframe src="//www.facebook.com/plugins/like.php?href=PERMALINK&send=false&layout=button_count&show_faces=false&action=like&colorscheme=light&font" scrolling="no" frameborder="0" style="border:none; overflow:hidden;height:32px;width:100px" allowTransparency="true"></iframe>',
|
151 |
|
152 |
'16' => array("-48px","0px"),
|
153 |
'32' => array("-96px","0px"),
|
154 |
'48' => array("-144px","0px"),
|
155 |
'64' => array("-192px","0px")
|
156 |
)
|
157 |
),
|
158 |
'Myspace' => array(
|
159 |
'favicon' => 'myspace.png',
|
160 |
'url' => 'http://www.myspace.com/Modules/PostTo/Pages/?u=PERMALINK&t=TITLE',
|
161 |
'spriteCoordinates' => Array(
|
162 |
'16' => array("0px","-16px"),
|
163 |
'32' => array("0px","-32px"),
|
164 |
'48' => array("0px","-48px"),
|
165 |
'64' => array("0px","-64px")
|
166 |
)
|
167 |
),
|
168 |
'Twitter' => array(
|
169 |
'favicon' => 'twitter.png',
|
170 |
'url' => 'http://twitter.com/intent/tweet?text=TITLE%20-%20PERMALINK%20(via%20@sociablesite)',
|
171 |
'spriteCoordinates' => Array(
|
172 |
'16' => array("-144px","-16px"),
|
173 |
'32' => array("-288px","-32px"),
|
174 |
'48' => array("-432px","-48px"),
|
175 |
'64' => array("-576px","-64px")
|
176 |
)
|
177 |
),
|
178 |
'favicon' => 'twitter.png',
|
179 |
'url' => '<a href="https://twitter.com/share" class="twitter-share-button" data-count="horizontal">Tweet</a><script type="text/javascript" src="//platform.twitter.com/widgets.js"></script>',
|
180 |
'spriteCoordinates' => Array(
|
181 |
'16' => array("-144px","-16px"),
|
182 |
'32' => array("-288px","-32px"),
|
183 |
'48' => array("-432px","-48px"),
|
184 |
'64' => array("-576px","-64px")
|
185 |
)
|
186 |
),
|
187 |
'LinkedIn' => array(
|
188 |
'favicon' => 'linkedin.png',
|
189 |
'url' => 'http://www.linkedin.com/shareArticle?mini=true&url=PERMALINK&title=TITLE&source=BLOGNAME&summary=EXCERPT',
|
190 |
'spriteCoordinates' => Array(
|
191 |
'16' => array("-144px","0px"),
|
192 |
'32' => array("-288px","0px"),
|
193 |
'48' => array("-432px","0px"),
|
194 |
'64' => array("-576px","0px")
|
195 |
)
|
196 |
|
197 |
),
|
198 |
'favicon' => 'linkedin.png',
|
199 |
'url' => '<script src="http://platform.linkedin.com/in.js" type="text/javascript"></script><script type="IN/Share" data-counter="right"></script>',
|
200 |
'spriteCoordinates' => Array(
|
201 |
'16' => array("-144px","0px"),
|
202 |
'32' => array("-288px","0px"),
|
203 |
'48' => array("-432px","0px"),
|
204 |
'64' => array("-576px","0px")
|
205 |
)
|
206 |
|
207 |
),
|
208 |
'Delicious' => array(
|
209 |
'favicon' => 'delicious.png',
|
210 |
'url' => 'http://delicious.com/post?url=PERMALINK&title=TITLE&notes=EXCERPT',
|
211 |
'spriteCoordinates' => Array(
|
212 |
'16' => array("-16px","0px"),
|
213 |
'32' => array("-32px","0px"),
|
214 |
'48' => array("-48px","0px"),
|
215 |
'64' => array("-64px","0px")
|
216 |
)
|
217 |
),
|
218 |
'Digg' => array(
|
219 |
'favicon' => 'digg.png',
|
220 |
'url' => 'http://digg.com/submit?phase=2&url=PERMALINK&title=TITLE&bodytext=EXCERPT',
|
221 |
'spriteCoordinates' => Array(
|
222 |
'16' => array("-32px","0px"),
|
223 |
'32' => array("-64px","0px"),
|
224 |
'48' => array("-96px","0px"),
|
225 |
'64' => array("-128px","0px")
|
226 |
)
|
227 |
),
|
228 |
'favicon' => 'digg.png',
|
229 |
'url' => "<script type='text/javascript'>(function() {var s = document.createElement('SCRIPT'), s1 = document.getElementsByTagName('SCRIPT')[0];s.type = 'text/javascript';s.async = true;s.src = 'http://widgets.digg.com/buttons.js';s1.parentNode.insertBefore(s, s1);})();</script><a class='DiggThisButton DiggCompact'></a>",
|
230 |
'spriteCoordinates' => Array(
|
231 |
'16' => array("-32px","0px"),
|
232 |
'32' => array("-64px","0px"),
|
233 |
'48' => array("-96px","0px"),
|
234 |
'64' => array("-128px","0px")
|
235 |
)
|
236 |
),
|
237 |
'Reddit' => array(
|
238 |
'favicon' => 'reddit.png',
|
239 |
'url' => 'http://reddit.com/submit?url=PERMALINK&title=TITLE',
|
240 |
'spriteCoordinates' => Array(
|
241 |
'16' => array("-64px","-16px"),
|
242 |
'32' => array("-128px","-32px"),
|
243 |
'48' => array("-192px","-48px"),
|
244 |
'64' => array("-256px","-64px")
|
245 |
)
|
246 |
),
|
247 |
|
248 |
'StumbleUpon' => array(
|
249 |
'favicon' => 'stumbleupon.png',
|
250 |
'url' => 'http://www.stumbleupon.com/submit?url=PERMALINK&title=TITLE',
|
251 |
'spriteCoordinates' => Array(
|
252 |
'16' => array("-112px","-16px"),
|
253 |
'32' => array("-224px","-32px"),
|
254 |
'48' => array("-336px","-48px"),
|
255 |
'64' => array("-448px","-64px")
|
256 |
)),
|
257 |
'favicon' => 'stumbleupon.png',
|
258 |
'url' => '<script src="http://www.stumbleupon.com/hostedbadge.php?s=2"></script>',
|
259 |
'spriteCoordinates' => Array(
|
260 |
'16' => array("-112px","-16px"),
|
261 |
'32' => array("-224px","-32px"),
|
262 |
'48' => array("-336px","-48px"),
|
263 |
'64' => array("-448px","-64px")
|
264 |
)
|
265 |
),
|
266 |
'favicon' => 'google.png',
|
267 |
'url' => 'http://www.google.com/bookmarks/mark?op=edit&bkmk=PERMALINK&title=TITLE&annotation=EXCERPT',
|
268 |
'description' => 'Google Bookmarks',
|
269 |
'spriteCoordinates' => Array(
|
270 |
'16' => array("-96px","0px"),
|
271 |
'32' => array("-192px","0px"),
|
272 |
'48' => array("-288px","0px"),
|
273 |
'64' => array("-384px","0px")
|
274 |
)
|
275 |
),
|
276 |
'favicon' => 'google.png',
|
277 |
/* 'url' => '<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
|
278 |
<script type="text/javascript">
|
279 |
window.___gcfg = {
|
280 |
lang: \'en-US\'
|
281 |
};
|
282 |
(function() {
|
283 |
var po = document.createElement(\'script\'); po.type = \'text/javascript\'; po.async = true;
|
284 |
po.src = \'https://apis.google.com/js/plusone.js\';
|
285 |
var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(po, s);
|
286 |
})();
|
287 |
</script>
|
288 |
'description' => 'Google Bookmarks',
|
289 |
'spriteCoordinates' => Array(
|
290 |
'16' => array("-96px","0px"),
|
291 |
'32' => array("-192px","0px"),
|
292 |
'48' => array("-288px","0px"),
|
293 |
'64' => array("-384px","0px")
|
294 |
)
|
295 |
),
|
296 |
'favicon' => 'hacker_news.png',
|
297 |
'url' => 'http://news.ycombinator.com/submitlink?u=PERMALINK&t=TITLE',
|
298 |
'spriteCoordinates' => Array(
|
299 |
'16' => array("-128px","0px"),
|
300 |
'32' => array("-256px","0px"),
|
301 |
'48' => array("-384px","0px"),
|
302 |
'64' => array("-512px","0px")
|
303 |
)
|
304 |
),
|
305 |
'favicon' => 'msn.png',
|
306 |
'url' => 'http://reporter.es.msn.com/?fn=contribute&Title=TITLE&URL=PERMALINK&cat_id=6&tag_id=31&Remark=EXCERPT',
|
307 |
'description' => 'MSN Reporter',
|
308 |
'spriteCoordinates' => Array(
|
309 |
'16' => array("-176px","0px"),
|
310 |
'32' => array("-352px","0px"),
|
311 |
'48' => array("-528px","0px"),
|
312 |
'64' => array("-704px","0px")
|
313 |
)
|
314 |
),
|
315 |
'favicon' => 'blinklist.png',
|
316 |
'url' => 'http://www.blinklist.com/index.php?Action=Blink/addblink.php&Url=PERMALINK&Title=TITLE',
|
317 |
'spriteCoordinates' => Array(
|
318 |
'16' => array("0px","0px"),
|
319 |
'32' => array("0px","0px"),
|
320 |
'48' => array("0px","0px"),
|
321 |
'64' => array("0px","0px")
|
322 |
),
|
323 |
'supportsIframe' => false,
|
324 |
),
|
325 |
'favicon' => 'sphinn.png',
|
326 |
'url' => 'http://sphinn.com/index.php?c=post&m=submit&link=PERMALINK',
|
327 |
'spriteCoordinates' => Array(
|
328 |
'16' => array("-96px","-16px"),
|
329 |
'32' => array("-192px","-32px"),
|
330 |
'48' => array("-288px","-48px"),
|
331 |
'64' => array("-384px","-64px")
|
332 |
)
|
333 |
),
|
334 |
'favicon' => 'posterous.png',
|
335 |
'url' => 'http://posterous.com/share?linkto=PERMALINK&title=TITLE&selection=EXCERPT',
|
336 |
'spriteCoordinates' => Array(
|
337 |
'16' => array("-32px","-16px"),
|
338 |
'32' => array("-64px","-32px"),
|
339 |
'48' => array("-96px","-48px"),
|
340 |
'64' => array("-128px","-64px")
|
341 |
)
|
342 |
),
|
343 |
'favicon' => 'tumblr.png',
|
344 |
'url' => 'http://www.tumblr.com/share?v=3&u=PERMALINK&t=TITLE&s=EXCERPT',
|
345 |
'spriteCoordinates' => Array(
|
346 |
'16' => array("-128px","-16px"),
|
347 |
'32' => array("-256px","-32px"),
|
348 |
'48' => array("-384px","-48px"),
|
349 |
'64' => array("-512px","-64px")
|
350 |
'supportsIframe' => false
|
351 |
),
|
352 |
'favicon' => 'gmail.png',
|
353 |
'spriteCoordinates' => Array(
|
354 |
'16' => array("-80px","0px"),
|
355 |
'32' => array("-160px","0px"),
|
356 |
'48' => array("-240px","0px"),
|
357 |
'64' => array("-320px","0px")
|
358 |
),
|
359 |
'supportsIframe' => false
|
360 |
),
|
361 |
'16' => array("-112px","0px"),
|
362 |
'32' => array("-224px","0px"),
|
363 |
'48' => array("-336px","0px"),
|
364 |
'64' => array("-448px","0px")
|
365 |
)
|
366 |
'16' => array("-64px","0px"),
|
367 |
'32' => array("-128px","0px"),
|
368 |
'48' => array("-192px","0px"),
|
369 |
'64' => array("-256px","0px")
|
370 |
)
|
371 |
'16' => array("0px","0px"),
|
372 |
'32' => array("0px","0px"),
|
373 |
'48' => array("0px","0px"),
|
374 |
'64' => array("0px","0px")
|
375 |
)
|
376 |
);
|
377 |
-
|
378 |
-
//Update will create if it doesn't exist.
|
379 |
-
update_option( 'sociable_known_sites' , $sociable_known_sites );
|
380 |
-
update_option( 'sociable_options' , $sociable_options );
|
381 |
-
update_option( 'sociable_helpus',1);
|
382 |
-
}
|
383 |
-
|
384 |
-
/*
|
385 |
-
* De-Activate Function
|
386 |
-
*/
|
387 |
-
function sociable_deactivate(){
|
388 |
-
// global $wpdb;
|
389 |
-
// //Delete The Metadata
|
390 |
-
// $wpdb->query("DELETE FROM $wpdb->postmeta WHERE meta_key = '_sociableoff'");
|
391 |
-
// //delete The Options
|
392 |
-
// return delete_option( 'sociable_options' );
|
393 |
-
}
|
394 |
-
|
395 |
-
/*
|
396 |
-
* Function To Completely Remove The Options
|
397 |
-
*/
|
398 |
-
function sociable_2_remove(){
|
399 |
-
require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
|
400 |
-
|
401 |
-
global $wpdb;
|
402 |
-
//Delete The Metadata
|
403 |
-
$wpdb->query("DELETE FROM $wpdb->postmeta WHERE meta_key = '_sociableoff'");
|
404 |
-
//delete The Options
|
405 |
-
delete_option( 'sociable_options' );
|
406 |
-
|
407 |
-
deactivate_plugins( array( 'sociable-2/sociable-2.php' ) );
|
408 |
-
wp_redirect( '/wp-admin/plugins.php?deactivate=true' );
|
409 |
-
}
|
410 |
-
|
411 |
-
/*
|
412 |
-
* Generic Plugin Wide Functions
|
413 |
-
*/
|
414 |
-
|
415 |
global $sociable_options;
|
416 |
|
417 |
if( empty( $sociable_options['custom_icons'] )){
|
418 |
$path = trailingslashit( SOCIABLE_HTTP_PATH . 'images/'.$sociable_options['icon_option']."/" . $sociable_options['icon_size'] );
|
419 |
} else {
|
420 |
$path = trailingslashit( SOCIABLE_HTTP_PATH . 'images/customIcons/');
|
421 |
}
|
422 |
|
423 |
|
424 |
return $path;
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
wp_enqueue_script( 'sociable' , SOCIABLE_HTTP_PATH . 'js/sociable.js' );
|
2 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
'automatic_mode' => 'on',
|
5 |
'tagline' => 'Be Sociable, Share!',
|
6 |
'custom_image_directory' => '',
|
7 |
'use_stylesheet' => 'on',
|
8 |
'use_images' => 'on',
|
9 |
|
10 |
'use_alphamask' => 'on',
|
11 |
'new_window' => 'on',
|
12 |
'locations' => array(
|
13 |
'is_single' => 'on',
|
14 |
'is_page' => 'on'
|
15 |
),
|
16 |
'active_sites' => array(
|
17 |
'Facebook' => 'on',
|
18 |
'StumbleUpon' =>'on',
|
19 |
),
|
20 |
'icon_size' => '32',
|
21 |
);
|
|
|
|
|
22 |
'Facebook' => array(
|
23 |
'favicon' => 'facebook.png',
|
24 |
'url' => 'http://www.facebook.com/share.php?u=PERMALINK&t=TITLE',
|
25 |
'16' => array("-48px","0px"),
|
26 |
'32' => array("-96px","0px"),
|
27 |
'48' => array("-144px","0px"),
|
28 |
'64' => array("-192px","0px")
|
29 |
)
|
30 |
),
|
31 |
'favicon' => 'likecounter.png',
|
32 |
'url' => '<iframe src="//www.facebook.com/plugins/like.php?href=PERMALINK&send=false&layout=button_count&show_faces=false&action=like&colorscheme=light&font" scrolling="no" frameborder="0" style="border:none; overflow:hidden;height:32px;width:100px" allowTransparency="true"></iframe>',
|
33 |
|
34 |
'16' => array("-48px","0px"),
|
35 |
'32' => array("-96px","0px"),
|
36 |
'48' => array("-144px","0px"),
|
37 |
'64' => array("-192px","0px")
|
38 |
)
|
39 |
),
|
40 |
'Myspace' => array(
|
41 |
'favicon' => 'myspace.png',
|
42 |
'url' => 'http://www.myspace.com/Modules/PostTo/Pages/?u=PERMALINK&t=TITLE',
|
43 |
'spriteCoordinates' => Array(
|
44 |
'16' => array("0px","-16px"),
|
45 |
'32' => array("0px","-32px"),
|
46 |
'48' => array("0px","-48px"),
|
47 |
'64' => array("0px","-64px")
|
48 |
)
|
49 |
),
|
50 |
'Twitter' => array(
|
51 |
'favicon' => 'twitter.png',
|
52 |
'url' => 'http://twitter.com/intent/tweet?text=TITLE%20-%20PERMALINK%20(via%20@sociablesite)',
|
53 |
'spriteCoordinates' => Array(
|
54 |
'16' => array("-144px","-16px"),
|
55 |
'32' => array("-288px","-32px"),
|
56 |
'48' => array("-432px","-48px"),
|
57 |
'64' => array("-576px","-64px")
|
58 |
)
|
59 |
),
|
60 |
'favicon' => 'twitter.png',
|
61 |
'url' => '<a href="https://twitter.com/share" class="twitter-share-button" data-count="horizontal">Tweet</a><script type="text/javascript" src="//platform.twitter.com/widgets.js"></script>',
|
62 |
'spriteCoordinates' => Array(
|
63 |
'16' => array("-144px","-16px"),
|
64 |
'32' => array("-288px","-32px"),
|
65 |
'48' => array("-432px","-48px"),
|
66 |
'64' => array("-576px","-64px")
|
67 |
)
|
68 |
),
|
69 |
'LinkedIn' => array(
|
70 |
'favicon' => 'linkedin.png',
|
71 |
'url' => 'http://www.linkedin.com/shareArticle?mini=true&url=PERMALINK&title=TITLE&source=BLOGNAME&summary=EXCERPT',
|
72 |
'spriteCoordinates' => Array(
|
73 |
'16' => array("-144px","0px"),
|
74 |
'32' => array("-288px","0px"),
|
75 |
'48' => array("-432px","0px"),
|
76 |
'64' => array("-576px","0px")
|
77 |
)
|
78 |
|
79 |
),
|
80 |
'favicon' => 'linkedin.png',
|
81 |
'url' => '<script src="http://platform.linkedin.com/in.js" type="text/javascript"></script><script type="IN/Share" data-counter="right"></script>',
|
82 |
'spriteCoordinates' => Array(
|
83 |
'16' => array("-144px","0px"),
|
84 |
'32' => array("-288px","0px"),
|
85 |
'48' => array("-432px","0px"),
|
86 |
'64' => array("-576px","0px")
|
87 |
)
|
88 |
|
89 |
),
|
90 |
'Delicious' => array(
|
91 |
'favicon' => 'delicious.png',
|
92 |
'url' => 'http://delicious.com/post?url=PERMALINK&title=TITLE&notes=EXCERPT',
|
93 |
'spriteCoordinates' => Array(
|
94 |
'16' => array("-16px","0px"),
|
95 |
'32' => array("-32px","0px"),
|
96 |
'48' => array("-48px","0px"),
|
97 |
'64' => array("-64px","0px")
|
98 |
)
|
99 |
),
|
100 |
'Digg' => array(
|
101 |
'favicon' => 'digg.png',
|
102 |
'url' => 'http://digg.com/submit?phase=2&url=PERMALINK&title=TITLE&bodytext=EXCERPT',
|
103 |
'spriteCoordinates' => Array(
|
104 |
'16' => array("-32px","0px"),
|
105 |
'32' => array("-64px","0px"),
|
106 |
'48' => array("-96px","0px"),
|
107 |
'64' => array("-128px","0px")
|
108 |
)
|
109 |
),
|
110 |
'favicon' => 'digg.png',
|
111 |
'url' => "<script type='text/javascript'>(function() {var s = document.createElement('SCRIPT'), s1 = document.getElementsByTagName('SCRIPT')[0];s.type = 'text/javascript';s.async = true;s.src = 'http://widgets.digg.com/buttons.js';s1.parentNode.insertBefore(s, s1);})();</script><a class='DiggThisButton DiggCompact'></a>",
|
112 |
'spriteCoordinates' => Array(
|
113 |
'16' => array("-32px","0px"),
|
114 |
'32' => array("-64px","0px"),
|
115 |
'48' => array("-96px","0px"),
|
116 |
'64' => array("-128px","0px")
|
117 |
)
|
118 |
),
|
119 |
'Reddit' => array(
|
120 |
'favicon' => 'reddit.png',
|
121 |
'url' => 'http://reddit.com/submit?url=PERMALINK&title=TITLE',
|
122 |
'spriteCoordinates' => Array(
|
123 |
'16' => array("-64px","-16px"),
|
124 |
'32' => array("-128px","-32px"),
|
125 |
'48' => array("-192px","-48px"),
|
126 |
'64' => array("-256px","-64px")
|
127 |
)
|
128 |
),
|
129 |
|
130 |
'StumbleUpon' => array(
|
131 |
'favicon' => 'stumbleupon.png',
|
132 |
'url' => 'http://www.stumbleupon.com/submit?url=PERMALINK&title=TITLE',
|
133 |
'spriteCoordinates' => Array(
|
134 |
'16' => array("-112px","-16px"),
|
135 |
'32' => array("-224px","-32px"),
|
136 |
'48' => array("-336px","-48px"),
|
137 |
'64' => array("-448px","-64px")
|
138 |
)),
|
139 |
'favicon' => 'stumbleupon.png',
|
140 |
'url' => '<script src="http://www.stumbleupon.com/hostedbadge.php?s=2"></script>',
|
141 |
'spriteCoordinates' => Array(
|
142 |
'16' => array("-112px","-16px"),
|
143 |
'32' => array("-224px","-32px"),
|
144 |
'48' => array("-336px","-48px"),
|
145 |
'64' => array("-448px","-64px")
|
146 |
)
|
147 |
),
|
148 |
'favicon' => 'google.png',
|
149 |
'url' => 'http://www.google.com/bookmarks/mark?op=edit&bkmk=PERMALINK&title=TITLE&annotation=EXCERPT',
|
150 |
'description' => 'Google Bookmarks',
|
151 |
'spriteCoordinates' => Array(
|
152 |
'16' => array("-96px","0px"),
|
153 |
'32' => array("-192px","0px"),
|
154 |
'48' => array("-288px","0px"),
|
155 |
'64' => array("-384px","0px")
|
156 |
)
|
157 |
),
|
158 |
'favicon' => 'google.png',
|
159 |
/* 'url' => '<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
|
160 |
<script type="text/javascript">
|
161 |
window.___gcfg = {
|
162 |
lang: \'en-US\'
|
163 |
};
|
164 |
(function() {
|
165 |
var po = document.createElement(\'script\'); po.type = \'text/javascript\'; po.async = true;
|
166 |
po.src = \'https://apis.google.com/js/plusone.js\';
|
167 |
var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(po, s);
|
168 |
})();
|
169 |
</script>
|
170 |
'description' => 'Google Bookmarks',
|
171 |
'spriteCoordinates' => Array(
|
172 |
'16' => array("-96px","0px"),
|
173 |
'32' => array("-192px","0px"),
|
174 |
'48' => array("-288px","0px"),
|
175 |
'64' => array("-384px","0px")
|
176 |
)
|
177 |
),
|
178 |
'favicon' => 'hacker_news.png',
|
179 |
'url' => 'http://news.ycombinator.com/submitlink?u=PERMALINK&t=TITLE',
|
180 |
'spriteCoordinates' => Array(
|
181 |
'16' => array("-128px","0px"),
|
182 |
'32' => array("-256px","0px"),
|
183 |
'48' => array("-384px","0px"),
|
184 |
'64' => array("-512px","0px")
|
185 |
)
|
186 |
),
|
187 |
'favicon' => 'msn.png',
|
188 |
'url' => 'http://reporter.es.msn.com/?fn=contribute&Title=TITLE&URL=PERMALINK&cat_id=6&tag_id=31&Remark=EXCERPT',
|
189 |
'description' => 'MSN Reporter',
|
190 |
'spriteCoordinates' => Array(
|
191 |
'16' => array("-176px","0px"),
|
192 |
'32' => array("-352px","0px"),
|
193 |
'48' => array("-528px","0px"),
|
194 |
'64' => array("-704px","0px")
|
195 |
)
|
196 |
),
|
197 |
'favicon' => 'blinklist.png',
|
198 |
'url' => 'http://www.blinklist.com/index.php?Action=Blink/addblink.php&Url=PERMALINK&Title=TITLE',
|
199 |
'spriteCoordinates' => Array(
|
200 |
'16' => array("0px","0px"),
|
201 |
'32' => array("0px","0px"),
|
202 |
'48' => array("0px","0px"),
|
203 |
'64' => array("0px","0px")
|
204 |
),
|
205 |
'supportsIframe' => false,
|
206 |
),
|
207 |
'favicon' => 'sphinn.png',
|
208 |
'url' => 'http://sphinn.com/index.php?c=post&m=submit&link=PERMALINK',
|
209 |
'spriteCoordinates' => Array(
|
210 |
'16' => array("-96px","-16px"),
|
211 |
'32' => array("-192px","-32px"),
|
212 |
'48' => array("-288px","-48px"),
|
213 |
'64' => array("-384px","-64px")
|
214 |
)
|
215 |
),
|
216 |
'favicon' => 'posterous.png',
|
217 |
'url' => 'http://posterous.com/share?linkto=PERMALINK&title=TITLE&selection=EXCERPT',
|
218 |
'spriteCoordinates' => Array(
|
219 |
'16' => array("-32px","-16px"),
|
220 |
'32' => array("-64px","-32px"),
|
221 |
'48' => array("-96px","-48px"),
|
222 |
'64' => array("-128px","-64px")
|
223 |
)
|
224 |
),
|
225 |
'favicon' => 'tumblr.png',
|
226 |
'url' => 'http://www.tumblr.com/share?v=3&u=PERMALINK&t=TITLE&s=EXCERPT',
|
227 |
'spriteCoordinates' => Array(
|
228 |
'16' => array("-128px","-16px"),
|
229 |
'32' => array("-256px","-32px"),
|
230 |
'48' => array("-384px","-48px"),
|
231 |
'64' => array("-512px","-64px")
|
232 |
'supportsIframe' => false
|
233 |
),
|
234 |
'favicon' => 'gmail.png',
|
235 |
'spriteCoordinates' => Array(
|
236 |
'16' => array("-80px","0px"),
|
237 |
'32' => array("-160px","0px"),
|
238 |
'48' => array("-240px","0px"),
|
239 |
'64' => array("-320px","0px")
|
240 |
),
|
241 |
'supportsIframe' => false
|
242 |
),
|
243 |
'16' => array("-112px","0px"),
|
244 |
'32' => array("-224px","0px"),
|
245 |
'48' => array("-336px","0px"),
|
246 |
'64' => array("-448px","0px")
|
247 |
)
|
248 |
'16' => array("-64px","0px"),
|
249 |
'32' => array("-128px","0px"),
|
250 |
'48' => array("-192px","0px"),
|
251 |
'64' => array("-256px","0px")
|
252 |
)
|
253 |
'16' => array("0px","0px"),
|
254 |
'32' => array("0px","0px"),
|
255 |
'48' => array("0px","0px"),
|
256 |
'64' => array("0px","0px")
|
257 |
)
|
258 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
259 |
global $sociable_options;
|
260 |
|
261 |
if( empty( $sociable_options['custom_icons'] )){
|
262 |
$path = trailingslashit( SOCIABLE_HTTP_PATH . 'images/'.$sociable_options['icon_option']."/" . $sociable_options['icon_size'] );
|
263 |
} else {
|
264 |
$path = trailingslashit( SOCIABLE_HTTP_PATH . 'images/customIcons/');
|
265 |
}
|
266 |
|
267 |
|
268 |
return $path;
|
269 |
+
<?php
|
270 |
+
|
271 |
+
|
272 |
+
/*
|
273 |
+
|
274 |
+
|
275 |
+
Plugin Name: Sociable
|
276 |
+
|
277 |
+
|
278 |
+
Plugin URI: http://blogplay.com/plugin
|
279 |
+
|
280 |
+
|
281 |
+
Description: Automatically add links on your posts, pages and RSS feed to your favorite social bookmarking sites.
|
282 |
+
|
283 |
+
|
284 |
+
Version: 4.1.2
|
285 |
+
|
286 |
+
|
287 |
+
Author: Blogplay
|
288 |
+
|
289 |
+
|
290 |
+
Author URI: http://blogplay.com/
|
291 |
+
|
292 |
+
|
293 |
+
|
294 |
+
|
295 |
+
|
296 |
+
Copyright 2006 Peter Harkins (ph@malaprop.org)
|
297 |
+
|
298 |
+
|
299 |
+
Copyright 2008-2009 Joost de Valk (joost@yoast.com)
|
300 |
+
|
301 |
+
|
302 |
+
Copyright 2009-Present Blogplay.com (info@blogplay.com)
|
303 |
+
|
304 |
+
|
305 |
+
|
306 |
+
|
307 |
+
|
308 |
+
|
309 |
+
This program is free software; you can redistribute it and/or modify
|
310 |
+
|
311 |
+
|
312 |
+
it under the terms of the GNU General Public License as published by
|
313 |
+
|
314 |
+
|
315 |
+
the Free Software Foundation; either version 2 of the License, or
|
316 |
+
|
317 |
+
|
318 |
+
(at your option) any later version.
|
319 |
+
|
320 |
+
|
321 |
+
|
322 |
+
|
323 |
+
|
324 |
+
This program is distributed in the hope that it will be useful,
|
325 |
+
|
326 |
+
|
327 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
328 |
+
|
329 |
+
|
330 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
331 |
+
|
332 |
+
|
333 |
+
GNU General Public License for more details.
|
334 |
+
|
335 |
+
|
336 |
+
|
337 |
+
|
338 |
+
|
339 |
+
You should have received a copy of the GNU General Public License
|
340 |
+
|
341 |
+
|
342 |
+
along with this program; if not, write to the Free Software
|
343 |
+
|
344 |
+
|
345 |
+
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
346 |
+
|
347 |
+
|
348 |
+
|
349 |
+
|
350 |
+
|
351 |
+
|
352 |
+
|
353 |
+
|
354 |
+
*/
|
355 |
+
|
356 |
+
|
357 |
+
|
358 |
+
|
359 |
+
|
360 |
+
/*
|
361 |
+
|
362 |
+
|
363 |
+
* Define Some Paths
|
364 |
+
|
365 |
+
|
366 |
+
*/
|
367 |
+
|
368 |
+
|
369 |
+
define( 'SOCIABLE_HTTP_PATH' , WP_PLUGIN_URL . '/' . str_replace(basename( __FILE__) , "" , plugin_basename(__FILE__) ) );
|
370 |
+
|
371 |
+
|
372 |
+
define( 'SOCIABLE_ABSPATH' , WP_PLUGIN_DIR . '/' . str_replace(basename( __FILE__) , "" , plugin_basename(__FILE__) ) );
|
373 |
+
|
374 |
+
|
375 |
+
|
376 |
+
|
377 |
+
|
378 |
+
/*
|
379 |
+
|
380 |
+
|
381 |
+
* Includes
|
382 |
+
|
383 |
+
|
384 |
+
*/
|
385 |
+
|
386 |
+
|
387 |
+
include 'includes/class-sociable_Admin_Options.php';
|
388 |
+
|
389 |
+
|
390 |
+
include 'includes/class-Sociable_Globals.php';
|
391 |
+
|
392 |
+
|
393 |
+
include 'includes/sociable_output.php';
|
394 |
+
|
395 |
+
|
396 |
+
|
397 |
+
|
398 |
+
|
399 |
+
/*
|
400 |
+
|
401 |
+
|
402 |
+
* Global Variables
|
403 |
+
|
404 |
+
|
405 |
+
*/
|
406 |
+
|
407 |
+
|
408 |
+
//$sociable_known_sites = Sociable_Globals::default_sites();
|
409 |
+
|
410 |
+
|
411 |
+
$sociable_options = get_option( 'sociable_options' );
|
412 |
+
|
413 |
+
|
414 |
+
//print_r($sociable_options);
|
415 |
+
|
416 |
+
|
417 |
+
//$sociable_post_types = array(); //Set This blank here, won't work before init
|
418 |
+
|
419 |
+
|
420 |
+
//$sociable_taxonomies = array(); //Same Here
|
421 |
+
|
422 |
+
|
423 |
+
|
424 |
+
|
425 |
+
|
426 |
+
/*
|
427 |
+
|
428 |
+
|
429 |
+
* General Init Function
|
430 |
+
|
431 |
+
|
432 |
+
*/
|
433 |
+
|
434 |
+
|
435 |
+
function sociable_init(){
|
436 |
+
|
437 |
+
|
438 |
+
global $sociable_post_types, $sociable_taxonomies, $sociable_options;
|
439 |
+
|
440 |
+
if (!isset($sociable_options['icon_size']) || $sociable_options['icon_size'] == "" || !isset($sociable_options['version']) || $sociable_options['version'] != "4.1.2" ) sociable_reset();
|
441 |
+
//echo dirname( plugin_basename( __FILE__ ) )."/includes"
|
442 |
+
|
443 |
+
load_plugin_textdomain( 'sociable', false, dirname( plugin_basename( __FILE__ ) )."/languages" );
|
444 |
+
|
445 |
+
|
446 |
+
$active_sites = ( isset( $sociable_options['active_sites'] ) ) ? $sociable_options['active_sites'] : array() ;
|
447 |
+
|
448 |
+
|
449 |
+
//Set The Post Types
|
450 |
+
|
451 |
+
|
452 |
+
$sociable_post_types = Sociable_Globals::sociable_get_post_types();
|
453 |
+
|
454 |
+
|
455 |
+
|
456 |
+
|
457 |
+
|
458 |
+
//Set The Custom Taxonomies
|
459 |
+
|
460 |
+
|
461 |
+
$sociable_taxonomies = Sociable_Globals::sociable_get_taxonomies();
|
462 |
+
|
463 |
+
|
464 |
+
|
465 |
+
|
466 |
+
wp_enqueue_script( 'sociable' , SOCIABLE_HTTP_PATH . 'js/sociable.js' );
|
467 |
+
|
468 |
+
|
469 |
+
|
470 |
+
wp_enqueue_script( 'addtofavourites' , SOCIABLE_HTTP_PATH . 'js/addtofavorites.js' );
|
471 |
+
|
472 |
+
|
473 |
+
if( ! is_admin() ){
|
474 |
+
|
475 |
+
|
476 |
+
//Load Up The Front Of Site CSS And JS
|
477 |
+
|
478 |
+
|
479 |
+
|
480 |
+
|
481 |
+
|
482 |
+
if( array_key_exists( 'Add to favorites' , $active_sites ) ){
|
483 |
+
|
484 |
+
|
485 |
+
// wp_enqueue_script( 'addtofavourites' , SOCIABLE_HTTP_PATH . 'js/addtofavorites.js' );
|
486 |
+
|
487 |
+
|
488 |
+
}
|
489 |
+
|
490 |
+
|
491 |
+
|
492 |
+
|
493 |
+
|
494 |
+
|
495 |
+
if( isset( $sociable_options['use_stylesheet'] ) ){
|
496 |
+
|
497 |
+
|
498 |
+
wp_enqueue_style( 'sociablecss' , SOCIABLE_HTTP_PATH . 'css/sociable.css' );
|
499 |
+
|
500 |
+
|
501 |
+
}
|
502 |
+
|
503 |
+
|
504 |
+
|
505 |
+
|
506 |
+
|
507 |
+
}
|
508 |
+
|
509 |
+
|
510 |
+
|
511 |
+
|
512 |
+
|
513 |
+
|
514 |
+
|
515 |
+
|
516 |
+
}
|
517 |
+
|
518 |
+
|
519 |
+
|
520 |
+
|
521 |
+
|
522 |
+
/*
|
523 |
+
|
524 |
+
|
525 |
+
* Hooks And Filters
|
526 |
+
|
527 |
+
|
528 |
+
*/
|
529 |
+
|
530 |
+
|
531 |
+
add_action( 'admin_init' , array( 'sociable_Admin_Options' , 'init' ) );
|
532 |
+
|
533 |
+
|
534 |
+
add_action( 'admin_menu' , array( 'sociable_Admin_Options' , 'add_menu_pages' ) );
|
535 |
+
|
536 |
+
|
537 |
+
add_action( 'save_post' , array( 'sociable_Admin_Options' , 'save_post' ) );
|
538 |
+
|
539 |
+
|
540 |
+
add_action( 'init' , 'sociable_init' );
|
541 |
+
|
542 |
+
|
543 |
+
|
544 |
+
|
545 |
+
|
546 |
+
add_filter( 'the_content', 'auto_sociable' );
|
547 |
+
|
548 |
+
|
549 |
+
add_filter( 'the_excerpt', 'auto_sociable' );
|
550 |
+
|
551 |
+
|
552 |
+
|
553 |
+
|
554 |
+
|
555 |
+
register_activation_hook(__FILE__, 'sociable_activate' );
|
556 |
+
|
557 |
+
|
558 |
+
register_deactivation_hook( __FILE__, 'sociable_deactivate' );
|
559 |
+
|
560 |
+
|
561 |
+
|
562 |
+
|
563 |
+
|
564 |
+
/*
|
565 |
+
|
566 |
+
|
567 |
+
* Activation Function
|
568 |
+
|
569 |
+
|
570 |
+
*/
|
571 |
+
|
572 |
+
|
573 |
+
function sociable_activate(){
|
574 |
+
|
575 |
+
|
576 |
+
|
577 |
+
|
578 |
+
|
579 |
+
if( ! get_option( 'sociable_options' ) ){
|
580 |
+
|
581 |
+
|
582 |
+
return sociable_reset();
|
583 |
+
|
584 |
+
|
585 |
+
}
|
586 |
+
|
587 |
+
|
588 |
+
|
589 |
+
|
590 |
+
|
591 |
+
}
|
592 |
+
|
593 |
+
|
594 |
+
|
595 |
+
|
596 |
+
/*
|
597 |
+
|
598 |
+
|
599 |
+
* Reset Function
|
600 |
+
|
601 |
+
|
602 |
+
*/
|
603 |
+
|
604 |
+
|
605 |
+
function sociable_reset(){
|
606 |
+
|
607 |
+
|
608 |
+
global $wpdb;
|
609 |
+
|
610 |
+
|
611 |
+
//reset all data to factory defaults, install if is there.
|
612 |
+
|
613 |
+
|
614 |
+
//Delete All Metadata From The Database ?
|
615 |
+
|
616 |
+
|
617 |
+
$wpdb->query("DELETE FROM $wpdb->postmeta WHERE meta_key = '_sociableoff'");
|
618 |
+
|
619 |
+
|
620 |
+
|
621 |
+
|
622 |
+
|
623 |
+
$sociable_options = array(
|
624 |
+
'version' =>'4.1.2',
|
625 |
+
|
626 |
+
'automatic_mode' => 'on',
|
627 |
+
|
628 |
+
'tagline' => 'Be Sociable, Share!',
|
629 |
+
|
630 |
+
'custom_image_directory' => '',
|
631 |
+
|
632 |
+
'use_stylesheet' => 'on',
|
633 |
+
|
634 |
+
'use_images' => 'on',
|
635 |
+
|
636 |
+
|
637 |
+
|
638 |
+
'use_alphamask' => 'on',
|
639 |
+
|
640 |
+
'new_window' => 'on',
|
641 |
+
|
642 |
+
'help_grow' => 'on',
|
643 |
+
|
644 |
+
'locations' => array(
|
645 |
+
|
646 |
+
'is_single' => 'on',
|
647 |
+
|
648 |
+
'is_page' => 'on'
|
649 |
+
|
650 |
+
),
|
651 |
+
|
652 |
+
'active_sites' => array(
|
653 |
+
'Twitter' => 'on',
|
654 |
+
'Facebook' => 'on',
|
655 |
+
'email'=>'on',
|
656 |
+
'Add to favorites'=>'on',
|
657 |
+
'StumbleUpon' =>'on',
|
658 |
+
'Delicious' =>'on',
|
659 |
+
'Google Reader' =>'on',
|
660 |
+
'LinkedIn' => 'on',
|
661 |
+
'BlinkList' =>'on',
|
662 |
+
'More' => 'on',
|
663 |
+
'Twitter Counter' =>'on',
|
664 |
+
'Facebook Counter' =>'on',
|
665 |
+
'Google +' =>'on',
|
666 |
+
'LinkedIn Counter' =>'on',
|
667 |
+
'StumbleUpon Counter' =>'on'
|
668 |
+
|
669 |
+
|
670 |
+
),
|
671 |
+
|
672 |
+
'icon_size' => '32',
|
673 |
+
'icon_option' => 'option1',
|
674 |
+
|
675 |
+
|
676 |
+
);
|
677 |
+
|
678 |
+
|
679 |
+
|
680 |
+
|
681 |
+
|
682 |
+
$sociable_known_sites = array(
|
683 |
+
|
684 |
+
'Facebook' => array(
|
685 |
+
|
686 |
+
'favicon' => 'facebook.png',
|
687 |
+
|
688 |
+
'url' => 'http://www.facebook.com/share.php?u=PERMALINK&t=TITLE',
|
689 |
+
|
690 |
+
'spriteCoordinates' => Array(
|
691 |
+
|
692 |
+
'16' => array("-48px","0px"),
|
693 |
+
|
694 |
+
'32' => array("-96px","0px"),
|
695 |
+
|
696 |
+
'48' => array("-144px","0px"),
|
697 |
+
|
698 |
+
'64' => array("-192px","0px")
|
699 |
+
|
700 |
+
)
|
701 |
+
),
|
702 |
+
|
703 |
+
'Facebook Counter' => array(
|
704 |
+
'counter' =>1,
|
705 |
+
'favicon' => 'likecounter.png',
|
706 |
+
|
707 |
+
'url' => '<iframe src="//www.facebook.com/plugins/like.php?href=PERMALINK&send=false&layout=button_count&show_faces=false&action=like&colorscheme=light&font" scrolling="no" frameborder="0" style="border:none; overflow:hidden;height:32px;width:100px" allowTransparency="true"></iframe>',
|
708 |
+
|
709 |
+
'spriteCoordinates' => Array(
|
710 |
+
|
711 |
+
'16' => array("-48px","0px"),
|
712 |
+
|
713 |
+
'32' => array("-96px","0px"),
|
714 |
+
|
715 |
+
'48' => array("-144px","0px"),
|
716 |
+
|
717 |
+
'64' => array("-192px","0px")
|
718 |
+
|
719 |
+
)
|
720 |
+
),
|
721 |
+
|
722 |
+
'Myspace' => array(
|
723 |
+
|
724 |
+
'favicon' => 'myspace.png',
|
725 |
+
|
726 |
+
'url' => 'http://www.myspace.com/Modules/PostTo/Pages/?u=PERMALINK&t=TITLE',
|
727 |
+
|
728 |
+
'spriteCoordinates' => Array(
|
729 |
+
|
730 |
+
'16' => array("0px","-16px"),
|
731 |
+
|
732 |
+
'32' => array("0px","-32px"),
|
733 |
+
|
734 |
+
'48' => array("0px","-48px"),
|
735 |
+
|
736 |
+
'64' => array("0px","-64px")
|
737 |
+
|
738 |
+
)
|
739 |
+
|
740 |
+
),
|
741 |
+
|
742 |
+
'Twitter' => array(
|
743 |
+
|
744 |
+
'favicon' => 'twitter.png',
|
745 |
+
|
746 |
+
'url' => 'http://twitter.com/intent/tweet?text=TITLE%20-%20PERMALINK%20(via%20@sociablesite)',
|
747 |
+
|
748 |
+
'spriteCoordinates' => Array(
|
749 |
+
|
750 |
+
'16' => array("-144px","-16px"),
|
751 |
+
|
752 |
+
'32' => array("-288px","-32px"),
|
753 |
+
|
754 |
+
'48' => array("-432px","-48px"),
|
755 |
+
|
756 |
+
'64' => array("-576px","-64px")
|
757 |
+
|
758 |
+
)
|
759 |
+
|
760 |
+
),
|
761 |
+
|
762 |
+
'Twitter Counter' => array(
|
763 |
+
'counter' =>1,
|
764 |
+
'favicon' => 'twitter.png',
|
765 |
+
|
766 |
+
'url' => '<a href="https://twitter.com/share" class="twitter-share-button" data-count="horizontal">Tweet</a><script type="text/javascript" src="//platform.twitter.com/widgets.js"></script>',
|
767 |
+
|
768 |
+
'spriteCoordinates' => Array(
|
769 |
+
|
770 |
+
'16' => array("-144px","-16px"),
|
771 |
+
|
772 |
+
'32' => array("-288px","-32px"),
|
773 |
+
|
774 |
+
'48' => array("-432px","-48px"),
|
775 |
+
|
776 |
+
'64' => array("-576px","-64px")
|
777 |
+
|
778 |
+
)
|
779 |
+
|
780 |
+
),
|
781 |
+
|
782 |
+
|
783 |
+
|
784 |
+
'LinkedIn' => array(
|
785 |
+
|
786 |
+
'favicon' => 'linkedin.png',
|
787 |
+
|
788 |
+
'url' => 'http://www.linkedin.com/shareArticle?mini=true&url=PERMALINK&title=TITLE&source=BLOGNAME&summary=EXCERPT',
|
789 |
+
|
790 |
+
'spriteCoordinates' => Array(
|
791 |
+
|
792 |
+
'16' => array("-144px","0px"),
|
793 |
+
|
794 |
+
'32' => array("-288px","0px"),
|
795 |
+
|
796 |
+
'48' => array("-432px","0px"),
|
797 |
+
|
798 |
+
'64' => array("-576px","0px")
|
799 |
+
|
800 |
+
)
|
801 |
+
|
802 |
+
|
803 |
+
|
804 |
+
),
|
805 |
+
|
806 |
+
'LinkedIn Counter' => array(
|
807 |
+
'counter'=>1,
|
808 |
+
|
809 |
+
'favicon' => 'linkedin.png',
|
810 |
+
|
811 |
+
'url' => '<script src="http://platform.linkedin.com/in.js" type="text/javascript"></script><script type="IN/Share" data-counter="right"></script>',
|
812 |
+
|
813 |
+
'spriteCoordinates' => Array(
|
814 |
+
|
815 |
+
'16' => array("-144px","0px"),
|
816 |
+
|
817 |
+
'32' => array("-288px","0px"),
|
818 |
+
|
819 |
+
'48' => array("-432px","0px"),
|
820 |
+
|
821 |
+
'64' => array("-576px","0px")
|
822 |
+
|
823 |
+
)
|
824 |
+
|
825 |
+
|
826 |
+
|
827 |
+
),
|
828 |
+
|
829 |
+
|
830 |
+
|
831 |
+
'Delicious' => array(
|
832 |
+
|
833 |
+
'favicon' => 'delicious.png',
|
834 |
+
|
835 |
+
'url' => 'http://delicious.com/post?url=PERMALINK&title=TITLE&notes=EXCERPT',
|
836 |
+
|
837 |
+
'spriteCoordinates' => Array(
|
838 |
+
|
839 |
+
'16' => array("-16px","0px"),
|
840 |
+
|
841 |
+
'32' => array("-32px","0px"),
|
842 |
+
|
843 |
+
'48' => array("-48px","0px"),
|
844 |
+
|
845 |
+
'64' => array("-64px","0px")
|
846 |
+
|
847 |
+
)
|
848 |
+
|
849 |
+
),
|
850 |
+
|
851 |
+
'Digg' => array(
|
852 |
+
|
853 |
+
'favicon' => 'digg.png',
|
854 |
+
|
855 |
+
'url' => 'http://digg.com/submit?phase=2&url=PERMALINK&title=TITLE&bodytext=EXCERPT',
|
856 |
+
|
857 |
+
'spriteCoordinates' => Array(
|
858 |
+
|
859 |
+
'16' => array("-32px","0px"),
|
860 |
+
|
861 |
+
'32' => array("-64px","0px"),
|
862 |
+
|
863 |
+
'48' => array("-96px","0px"),
|
864 |
+
|
865 |
+
'64' => array("-128px","0px")
|
866 |
+
|
867 |
+
)
|
868 |
+
|
869 |
+
),
|
870 |
+
|
871 |
+
'Digg Counter' => array(
|
872 |
+
'counter' =>1,
|
873 |
+
'favicon' => 'digg.png',
|
874 |
+
|
875 |
+
'url' => "<script type='text/javascript'>(function() {var s = document.createElement('SCRIPT'), s1 = document.getElementsByTagName('SCRIPT')[0];s.type = 'text/javascript';s.async = true;s.src = 'http://widgets.digg.com/buttons.js';s1.parentNode.insertBefore(s, s1);})();</script><a class='DiggThisButton DiggCompact'></a>",
|
876 |
+
|
877 |
+
'spriteCoordinates' => Array(
|
878 |
+
|
879 |
+
'16' => array("-32px","0px"),
|
880 |
+
|
881 |
+
'32' => array("-64px","0px"),
|
882 |
+
|
883 |
+
'48' => array("-96px","0px"),
|
884 |
+
|
885 |
+
'64' => array("-128px","0px")
|
886 |
+
|
887 |
+
)
|
888 |
+
|
889 |
+
),
|
890 |
+
|
891 |
+
|
892 |
+
|
893 |
+
|
894 |
+
|
895 |
+
'Reddit' => array(
|
896 |
+
|
897 |
+
'favicon' => 'reddit.png',
|
898 |
+
|
899 |
+
'url' => 'http://reddit.com/submit?url=PERMALINK&title=TITLE',
|
900 |
+
|
901 |
+
'spriteCoordinates' => Array(
|
902 |
+
|
903 |
+
'16' => array("-64px","-16px"),
|
904 |
+
|
905 |
+
'32' => array("-128px","-32px"),
|
906 |
+
|
907 |
+
'48' => array("-192px","-48px"),
|
908 |
+
|
909 |
+
'64' => array("-256px","-64px")
|
910 |
+
|
911 |
+
)
|
912 |
+
|
913 |
+
),
|
914 |
+
|
915 |
+
|
916 |
+
|
917 |
+
'StumbleUpon' => array(
|
918 |
+
|
919 |
+
'favicon' => 'stumbleupon.png',
|
920 |
+
|
921 |
+
'url' => 'http://www.stumbleupon.com/submit?url=PERMALINK&title=TITLE',
|
922 |
+
|
923 |
+
'spriteCoordinates' => Array(
|
924 |
+
|
925 |
+
'16' => array("-112px","-16px"),
|
926 |
+
|
927 |
+
'32' => array("-224px","-32px"),
|
928 |
+
|
929 |
+
'48' => array("-336px","-48px"),
|
930 |
+
|
931 |
+
'64' => array("-448px","-64px")
|
932 |
+
|
933 |
+
)),
|
934 |
+
|
935 |
+
'StumbleUpon Counter' => array(
|
936 |
+
'counter' =>1,
|
937 |
+
'favicon' => 'stumbleupon.png',
|
938 |
+
|
939 |
+
'url' => '<script src="http://www.stumbleupon.com/hostedbadge.php?s=2"></script>',
|
940 |
+
|
941 |
+
'spriteCoordinates' => Array(
|
942 |
+
|
943 |
+
'16' => array("-112px","-16px"),
|
944 |
+
|
945 |
+
'32' => array("-224px","-32px"),
|
946 |
+
|
947 |
+
'48' => array("-336px","-48px"),
|
948 |
+
|
949 |
+
'64' => array("-448px","-64px")
|
950 |
+
|
951 |
+
)
|
952 |
+
|
953 |
+
),
|
954 |
+
'Google Bookmarks' => Array (
|
955 |
+
|
956 |
+
'favicon' => 'google.png',
|
957 |
+
|
958 |
+
'url' => 'http://www.google.com/bookmarks/mark?op=edit&bkmk=PERMALINK&title=TITLE&annotation=EXCERPT',
|
959 |
+
|
960 |
+
'description' => 'Google Bookmarks',
|
961 |
+
|
962 |
+
'spriteCoordinates' => Array(
|
963 |
+
|
964 |
+
'16' => array("-96px","0px"),
|
965 |
+
|
966 |
+
'32' => array("-192px","0px"),
|
967 |
+
|
968 |
+
'48' => array("-288px","0px"),
|
969 |
+
|
970 |
+
'64' => array("-384px","0px")
|
971 |
+
|
972 |
+
)
|
973 |
+
|
974 |
+
),
|
975 |
+
|
976 |
+
'Google +' => Array (
|
977 |
+
|
978 |
+
'counter' =>1,
|
979 |
+
|
980 |
+
'favicon' => 'google.png',
|
981 |
+
|
982 |
+
/* 'url' => '<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
|
983 |
+
<g:plusone annotation="bubble" size="medium"></g:plusone>',*/
|
984 |
+
'url' => '<g:plusone annotation="bubble" size="medium"></g:plusone>',
|
985 |
+
/*
|
986 |
+
<script type="text/javascript">
|
987 |
+
window.___gcfg = {
|
988 |
+
lang: \'en-US\'
|
989 |
+
};
|
990 |
+
|
991 |
+
(function() {
|
992 |
+
var po = document.createElement(\'script\'); po.type = \'text/javascript\'; po.async = true;
|
993 |
+
po.src = \'https://apis.google.com/js/plusone.js\';
|
994 |
+
var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(po, s);
|
995 |
+
})();
|
996 |
+
</script>
|
997 |
+
',*/
|
998 |
+
|
999 |
+
'description' => 'Google Bookmarks',
|
1000 |
+
|
1001 |
+
'spriteCoordinates' => Array(
|
1002 |
+
|
1003 |
+
'16' => array("-96px","0px"),
|
1004 |
+
|
1005 |
+
'32' => array("-192px","0px"),
|
1006 |
+
|
1007 |
+
'48' => array("-288px","0px"),
|
1008 |
+
|
1009 |
+
'64' => array("-384px","0px")
|
1010 |
+
|
1011 |
+
)
|
1012 |
+
|
1013 |
+
),
|
1014 |
+
|
1015 |
+
'HackerNews' => Array(
|
1016 |
+
|
1017 |
+
'favicon' => 'hacker_news.png',
|
1018 |
+
|
1019 |
+
'url' => 'http://news.ycombinator.com/submitlink?u=PERMALINK&t=TITLE',
|
1020 |
+
|
1021 |
+
'spriteCoordinates' => Array(
|
1022 |
+
|
1023 |
+
'16' => array("-128px","0px"),
|
1024 |
+
|
1025 |
+
'32' => array("-256px","0px"),
|
1026 |
+
|
1027 |
+
'48' => array("-384px","0px"),
|
1028 |
+
|
1029 |
+
'64' => array("-512px","0px")
|
1030 |
+
|
1031 |
+
)
|
1032 |
+
|
1033 |
+
),
|
1034 |
+
'MSNReporter' => Array(
|
1035 |
+
|
1036 |
+
'favicon' => 'msn.png',
|
1037 |
+
|
1038 |
+
'url' => 'http://reporter.es.msn.com/?fn=contribute&Title=TITLE&URL=PERMALINK&cat_id=6&tag_id=31&Remark=EXCERPT',
|
1039 |
+
|
1040 |
+
'description' => 'MSN Reporter',
|
1041 |
+
|
1042 |
+
'spriteCoordinates' => Array(
|
1043 |
+
|
1044 |
+
'16' => array("-176px","0px"),
|
1045 |
+
|
1046 |
+
'32' => array("-352px","0px"),
|
1047 |
+
|
1048 |
+
'48' => array("-528px","0px"),
|
1049 |
+
|
1050 |
+
'64' => array("-704px","0px")
|
1051 |
+
|
1052 |
+
)
|
1053 |
+
|
1054 |
+
),
|
1055 |
+
|
1056 |
+
|
1057 |
+
'BlinkList' => Array(
|
1058 |
+
'favicon' => 'blinklist.png',
|
1059 |
+
'url' => 'http://www.blinklist.com/index.php?Action=Blink/addblink.php&Url=PERMALINK&Title=TITLE',
|
1060 |
+
'spriteCoordinates' => Array(
|
1061 |
+
|
1062 |
+
'16' => array("0px","0px"),
|
1063 |
+
|
1064 |
+
'32' => array("0px","0px"),
|
1065 |
+
|
1066 |
+
'48' => array("0px","0px"),
|
1067 |
+
|
1068 |
+
'64' => array("0px","0px")
|
1069 |
+
|
1070 |
+
),
|
1071 |
+
'supportsIframe' => false,
|
1072 |
+
),
|
1073 |
+
'Sphinn' => Array(
|
1074 |
+
'favicon' => 'sphinn.png',
|
1075 |
+
'url' => 'http://sphinn.com/index.php?c=post&m=submit&link=PERMALINK',
|
1076 |
+
'spriteCoordinates' => Array(
|
1077 |
+
|
1078 |
+
'16' => array("-96px","-16px"),
|
1079 |
+
|
1080 |
+
'32' => array("-192px","-32px"),
|
1081 |
+
|
1082 |
+
'48' => array("-288px","-48px"),
|
1083 |
+
|
1084 |
+
'64' => array("-384px","-64px")
|
1085 |
+
|
1086 |
+
)
|
1087 |
+
),
|
1088 |
+
|
1089 |
+
'Posterous' => Array(
|
1090 |
+
'favicon' => 'posterous.png',
|
1091 |
+
'url' => 'http://posterous.com/share?linkto=PERMALINK&title=TITLE&selection=EXCERPT',
|
1092 |
+
'spriteCoordinates' => Array(
|
1093 |
+
|
1094 |
+
'16' => array("-32px","-16px"),
|
1095 |
+
|
1096 |
+
'32' => array("-64px","-32px"),
|
1097 |
+
|
1098 |
+
'48' => array("-96px","-48px"),
|
1099 |
+
|
1100 |
+
'64' => array("-128px","-64px")
|
1101 |
+
|
1102 |
+
)
|
1103 |
+
),
|
1104 |
+
'Tumblr' => Array(
|
1105 |
+
'favicon' => 'tumblr.png',
|
1106 |
+
'url' => 'http://www.tumblr.com/share?v=3&u=PERMALINK&t=TITLE&s=EXCERPT',
|
1107 |
+
'spriteCoordinates' => Array(
|
1108 |
+
|
1109 |
+
'16' => array("-128px","-16px"),
|
1110 |
+
|
1111 |
+
'32' => array("-256px","-32px"),
|
1112 |
+
|
1113 |
+
'48' => array("-384px","-48px"),
|
1114 |
+
|
1115 |
+
'64' => array("-512px","-64px")
|
1116 |
+
|
1117 |
+
),
|
1118 |
+
'supportsIframe' => false
|
1119 |
+
),
|
1120 |
+
'email' => Array(
|
1121 |
+
'favicon' => 'gmail.png',
|
1122 |
+
'url' => 'https://mail.google.com/mail/?view=cm&fs=1&to&su=TITLE&body=PERMALINK&ui=2&tf=1&shva=1',
|
1123 |
+
'spriteCoordinates' => Array(
|
1124 |
+
|
1125 |
+
'16' => array("-80px","0px"),
|
1126 |
+
|
1127 |
+
'32' => array("-160px","0px"),
|
1128 |
+
|
1129 |
+
'48' => array("-240px","0px"),
|
1130 |
+
|
1131 |
+
'64' => array("-320px","0px")
|
1132 |
+
|
1133 |
+
),
|
1134 |
+
'supportsIframe' => false
|
1135 |
+
),
|
1136 |
+
|
1137 |
+
'Google Reader' => array (
|
1138 |
+
'favicon' => 'googlebuzz.png',
|
1139 |
+
'url' => 'http://www.google.com/reader/link?url=PERMALINK&title=TITLE&srcURL=PERMALINK&srcTitle=BLOGNAME',
|
1140 |
+
'spriteCoordinates' => Array(
|
1141 |
+
|
1142 |
+
'16' => array("-112px","0px"),
|
1143 |
+
|
1144 |
+
'32' => array("-224px","0px"),
|
1145 |
+
|
1146 |
+
'48' => array("-336px","0px"),
|
1147 |
+
|
1148 |
+
'64' => array("-448px","0px")
|
1149 |
+
|
1150 |
+
)
|
1151 |
+
),
|
1152 |
+
'Add to favorites' => array(
|
1153 |
+
'favicon' => 'favorites.png',
|
1154 |
+
'url' => 'javascript:AddToFavorites();',
|
1155 |
+
'spriteCoordinates' => Array(
|
1156 |
+
|
1157 |
+
'16' => array("-64px","0px"),
|
1158 |
+
|
1159 |
+
'32' => array("-128px","0px"),
|
1160 |
+
|
1161 |
+
'48' => array("-192px","0px"),
|
1162 |
+
|
1163 |
+
'64' => array("-256px","0px")
|
1164 |
+
|
1165 |
+
)
|
1166 |
+
),
|
1167 |
+
'More' => array(
|
1168 |
+
'favicon' => 'more.png',
|
1169 |
+
'url' => 'javascript:more();',
|
1170 |
+
'spriteCoordinates' => Array(
|
1171 |
+
|
1172 |
+
'16' => array("0px","0px"),
|
1173 |
+
|
1174 |
+
'32' => array("0px","0px"),
|
1175 |
+
|
1176 |
+
'48' => array("0px","0px"),
|
1177 |
+
|
1178 |
+
'64' => array("0px","0px")
|
1179 |
+
|
1180 |
+
)
|
1181 |
+
),
|
1182 |
+
);
|
1183 |
+
|
1184 |
+
|
1185 |
+
|
1186 |
+
|
1187 |
+
|
1188 |
+
|
1189 |
+
//Update will create if it doesn't exist.
|
1190 |
+
|
1191 |
+
|
1192 |
+
update_option( 'sociable_known_sites' , $sociable_known_sites );
|
1193 |
+
|
1194 |
+
|
1195 |
+
update_option( 'sociable_options' , $sociable_options );
|
1196 |
+
|
1197 |
+
|
1198 |
+
update_option( 'sociable_helpus',1);
|
1199 |
+
|
1200 |
+
|
1201 |
+
}
|
1202 |
+
|
1203 |
+
|
1204 |
+
|
1205 |
+
|
1206 |
+
|
1207 |
+
/*
|
1208 |
+
|
1209 |
+
|
1210 |
+
* De-Activate Function
|
1211 |
+
|
1212 |
+
|
1213 |
+
*/
|
1214 |
+
|
1215 |
+
|
1216 |
+
function sociable_deactivate(){
|
1217 |
+
|
1218 |
+
|
1219 |
+
// global $wpdb;
|
1220 |
+
|
1221 |
+
|
1222 |
+
// //Delete The Metadata
|
1223 |
+
|
1224 |
+
|
1225 |
+
// $wpdb->query("DELETE FROM $wpdb->postmeta WHERE meta_key = '_sociableoff'");
|
1226 |
+
|
1227 |
+
|
1228 |
+
// //delete The Options
|
1229 |
+
|
1230 |
+
|
1231 |
+
// return delete_option( 'sociable_options' );
|
1232 |
+
|
1233 |
+
|
1234 |
+
}
|
1235 |
+
|
1236 |
+
|
1237 |
+
|
1238 |
+
|
1239 |
+
|
1240 |
+
/*
|
1241 |
+
|
1242 |
+
|
1243 |
+
* Function To Completely Remove The Options
|
1244 |
+
|
1245 |
+
|
1246 |
+
*/
|
1247 |
+
|
1248 |
+
|
1249 |
+
function sociable_2_remove(){
|
1250 |
+
|
1251 |
+
|
1252 |
+
require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
|
1253 |
+
|
1254 |
+
|
1255 |
+
|
1256 |
+
|
1257 |
+
|
1258 |
+
global $wpdb;
|
1259 |
+
|
1260 |
+
|
1261 |
+
//Delete The Metadata
|
1262 |
+
|
1263 |
+
|
1264 |
+
$wpdb->query("DELETE FROM $wpdb->postmeta WHERE meta_key = '_sociableoff'");
|
1265 |
+
|
1266 |
+
|
1267 |
+
//delete The Options
|
1268 |
+
|
1269 |
+
|
1270 |
+
delete_option( 'sociable_options' );
|
1271 |
+
|
1272 |
+
|
1273 |
+
|
1274 |
+
|
1275 |
+
|
1276 |
+
deactivate_plugins( array( 'sociable-2/sociable-2.php' ) );
|
1277 |
+
|
1278 |
+
|
1279 |
+
wp_redirect( '/wp-admin/plugins.php?deactivate=true' );
|
1280 |
+
|
1281 |
+
|
1282 |
+
}
|
1283 |
+
|
1284 |
+
|
1285 |
+
|
1286 |
+
|
1287 |
+
|
1288 |
+
/*
|
1289 |
+
|
1290 |
+
|
1291 |
+
* Generic Plugin Wide Functions
|
1292 |
+
|
1293 |
+
|
1294 |
+
*/
|
1295 |
+
|
1296 |
+
|
1297 |
+
|
1298 |
+
function _get_sociable_image_path(){
|
1299 |
+
|
1300 |
+
global $sociable_options;
|
1301 |
+
|
1302 |
+
|
1303 |
+
|
1304 |
+
if( empty( $sociable_options['custom_icons'] )){
|
1305 |
+
if ($sociable_options['icon_option'] !="option6"){
|
1306 |
+
$path = trailingslashit( SOCIABLE_HTTP_PATH . 'images/'.$sociable_options['icon_option']."/" . $sociable_options['icon_size'] );
|
1307 |
+
}else{
|
1308 |
+
|
1309 |
+
$path = trailingslashit( SOCIABLE_HTTP_PATH . 'images/original/');
|
1310 |
+
}
|
1311 |
+
|
1312 |
+
} else {
|
1313 |
+
|
1314 |
+
$path = trailingslashit( SOCIABLE_HTTP_PATH . 'images/customIcons/');
|
1315 |
+
|
1316 |
+
}
|
1317 |
+
|
1318 |
+
|
1319 |
+
|
1320 |
+
return $path;
|
1321 |
+
|
1322 |
+
}
|
1323 |
+
|
1324 |
+
|
1325 |
+
|
1326 |
+
|
1327 |
+
|
1328 |
+
|
1329 |
+
function _get_sociable_image( $site, $description ){
|
1330 |
+
global $sociable_options;
|
1331 |
+
|
1332 |
+
$imageclass = '';
|
1333 |
+
|
1334 |
+
|
1335 |
+
$imagestyle = '';
|
1336 |
+
|
1337 |
+
|
1338 |
+
$imagepath = _get_sociable_image_path();
|
1339 |
+
|
1340 |
+
|
1341 |
+
//Get The Source Of The Image
|
1342 |
+
|
1343 |
+
|
1344 |
+
if ( ! isset( $site['spriteCoordinates'] ) || ! isset( $sociable_options['use_sprites'] ) || is_feed() ) {
|
1345 |
+
|
1346 |
+
|
1347 |
+
|
1348 |
+
|
1349 |
+
|
1350 |
+
if ( strpos( $site['favicon'], 'http' ) === 0 ) {
|
1351 |
+
|
1352 |
+
|
1353 |
+
$imagesource = $site['favicon'];
|
1354 |
+
|
1355 |
+
|
1356 |
+
} else {
|
1357 |
+
|
1358 |
+
|
1359 |
+
$imagesource = $imagepath.$site['favicon'];
|
1360 |
+
|
1361 |
+
|
1362 |
+
}
|
1363 |
+
|
1364 |
+
|
1365 |
+
|
1366 |
+
|
1367 |
+
|
1368 |
+
} else {
|
1369 |
+
|
1370 |
+
|
1371 |
+
|
1372 |
+
|
1373 |
+
|
1374 |
+
$imagesource = $imagepath . "services-sprite.gif";
|
1375 |
+
|
1376 |
+
|
1377 |
+
$services_sprite_url = $imagepath . "sprite.png";
|
1378 |
+
|
1379 |
+
|
1380 |
+
|
1381 |
+
|
1382 |
+
|
1383 |
+
$spriteCoords = $site['spriteCoordinates'];
|
1384 |
+
|
1385 |
+
|
1386 |
+
|
1387 |
+
|
1388 |
+
|
1389 |
+
$size = $sociable_options['icon_size'];
|
1390 |
+
|
1391 |
+
|
1392 |
+
|
1393 |
+
|
1394 |
+
|
1395 |
+
$imagestyle = 'width: ' . $size . 'px; height: ' . $size . 'px; background: transparent url(' . $services_sprite_url . ') no-repeat; background-position:' . $spriteCoords[$size] . 'px 0';
|
1396 |
+
|
1397 |
+
|
1398 |
+
|
1399 |
+
|
1400 |
+
|
1401 |
+
}
|
1402 |
+
|
1403 |
+
|
1404 |
+
|
1405 |
+
|
1406 |
+
|
1407 |
+
if( isset( $sociable_options['use_alphamask'] ) ){
|
1408 |
+
|
1409 |
+
|
1410 |
+
$imageclass .= 'sociable-hovers';
|
1411 |
+
|
1412 |
+
|
1413 |
+
}
|
1414 |
+
|
1415 |
+
|
1416 |
+
|
1417 |
+
|
1418 |
+
|
1419 |
+
//If A Class Has Been Specified, Ensure It Is Added To The Class Attribute.
|
1420 |
+
|
1421 |
+
|
1422 |
+
if ( isset( $site['class'] ) ) {
|
1423 |
+
|
1424 |
+
|
1425 |
+
$imageclass .= 'sociable_' . $site['class'];
|
1426 |
+
|
1427 |
+
|
1428 |
+
}
|
1429 |
+
|
1430 |
+
|
1431 |
+
|
1432 |
+
|
1433 |
+
|
1434 |
+
if( $imagestyle != '' ){
|
1435 |
+
|
1436 |
+
|
1437 |
+
$imagestyle = 'style="' . $imagestyle . '"';
|
1438 |
+
|
1439 |
+
|
1440 |
+
}
|
1441 |
+
|
1442 |
+
|
1443 |
+
|
1444 |
+
if ($sociable_options['icon_option'] !="option6"){
|
1445 |
+
|
1446 |
+
$image = '<img src="' . $imagesource . '" title="' . $description . '" alt="' . $description . '"' . $imagestyle . ' />' ;
|
1447 |
+
}else{
|
1448 |
+
$image = '<img class="' . $imageclass . '" src="' . $imagesource . '" title="' . $description . '" alt="' . $description . '"' . $imagestyle . ' />' ;
|
1449 |
+
}
|
1450 |
+
|
1451 |
+
|
1452 |
+
|
1453 |
+
|
1454 |
+
|
1455 |
+
return $image;
|
1456 |
+
|
1457 |
+
|
1458 |
+
}
|
1459 |
+
|
1460 |
+
|
1461 |
+
?>
|