WP Socializer - Version 3.0

Version Description

  • Plugin completely re-written from scratch
  • New administration interface
  • Support for modern buttons, icons

=

Download this release

Release Info

Developer vaakash
Plugin Icon 128x128 WP Socializer
Version 3.0
Comparing to
See all releases

Code changes from version 2.4.9.9 to 3.0

Files changed (344) hide show
  1. README.md +5 -0
  2. admin/admin.php +707 -0
  3. admin/buttons.php +133 -0
  4. admin/css/ipopup.css +37 -0
  5. admin/css/sharebar_preview.css +49 -0
  6. admin/css/style.css +1239 -0
  7. admin/css/style_widgets.css +75 -0
  8. admin/followbar.php +422 -0
  9. admin/general_settings.php +55 -0
  10. admin/help.php +46 -0
  11. admin/images/admin-sprites.png +0 -0
  12. admin/images/anpn-thumb.png +0 -0
  13. admin/images/anpn.png +0 -0
  14. admin/images/banners/followbar.png +0 -0
  15. admin/images/banners/mobile-sharebar.png +0 -0
  16. admin/images/banners/share-buttons.png +0 -0
  17. admin/images/banners/sharebar.png +0 -0
  18. admin/images/banners/text-sharebar.png +0 -0
  19. admin/images/buttons/addthis-buttons.png +0 -0
  20. admin/images/buttons/addthis-tb-16px.png +0 -0
  21. admin/images/buttons/addthis-tb-32px.png +0 -0
  22. admin/images/buttons/admin-sprites.png +0 -0
  23. admin/images/buttons/adthis-sharecount.png +0 -0
  24. admin/images/buttons/floatbt-bg.png +0 -0
  25. admin/images/buttons/linkedin-bts.png +0 -0
  26. admin/images/buttons/pinterest-bts.png +0 -0
  27. admin/images/buttons/reddit-bts.png +0 -0
  28. admin/images/buttons/sharethis-buttons.png +0 -0
  29. admin/images/buttons/sharethis-classic.png +0 -0
  30. admin/images/buttons/sharethis-hcount.png +0 -0
  31. admin/images/buttons/sharethis-large.png +0 -0
  32. admin/images/buttons/sharethis-regular-notext.png +0 -0
  33. admin/images/buttons/sharethis-regular.png +0 -0
  34. admin/images/buttons/sharethis-vcount.png +0 -0
  35. admin/images/buttons/stumbleupon-bts.png +0 -0
  36. admin/images/demo.png +0 -0
  37. admin/images/donate.png +0 -0
  38. admin/images/five-star.png +0 -0
  39. admin/images/footer-bg.png +0 -0
  40. admin/images/grey-bg.png +0 -0
  41. admin/images/header-bg.png +0 -0
  42. admin/images/{aw.png → icons/aakash-web.png} +0 -0
  43. admin/images/icons/add.png +0 -0
  44. admin/images/icons/close.png +0 -0
  45. admin/images/icons/down-right.png +0 -0
  46. admin/images/icons/drag.png +0 -0
  47. admin/images/icons/facebook.png +0 -0
  48. admin/images/icons/google-plus.png +0 -0
  49. admin/images/icons/html.png +0 -0
  50. admin/images/icons/linkedin.png +0 -0
  51. admin/images/icons/loading.gif +0 -0
  52. admin/images/icons/pinterest.png +0 -0
  53. admin/images/icons/pocket.png +0 -0
  54. admin/images/icons/reddit.png +0 -0
  55. admin/images/icons/share_counter.png +0 -0
  56. admin/images/icons/sharethis.png +0 -0
  57. admin/images/icons/shortcode.png +0 -0
  58. admin/images/icons/social_buttons.png +0 -0
  59. admin/images/icons/stumbleupon.png +0 -0
  60. admin/images/icons/twitter.png +0 -0
  61. admin/images/{wp-socializer-20.png → icons/wp-socializer-sm.png} +0 -0
  62. admin/images/{wp-socializer.png → icons/wp-socializer.png} +0 -0
  63. admin/images/load.gif +0 -0
  64. admin/images/menu-bg.png +0 -0
  65. admin/images/menu-hover.png +0 -0
  66. admin/images/orange-bg.png +0 -0
  67. admin/images/paypal.gif +0 -0
  68. admin/images/pressthis.png +0 -0
  69. admin/images/purchase.png +0 -0
  70. admin/images/right-arrow.png +0 -0
  71. admin/images/share.png +0 -0
  72. admin/images/tips/btn-layouts.png +0 -0
  73. admin/images/tips/btn-shapes.png +0 -0
  74. admin/images/tips/btn-sizes.png +0 -0
  75. admin/images/tips/btn-text-types.png +0 -0
  76. admin/images/tips/fb-types.png +0 -0
  77. admin/images/tips/googleplus-sizes.png +0 -0
  78. admin/images/tips/reddit-types.png +0 -0
  79. admin/images/tips/sb-types.png +0 -0
  80. admin/images/tips/stumbleupon-types.png +0 -0
  81. admin/images/tips/tsb-sizes.png +0 -0
  82. admin/js/ipopup.js +10 -0
  83. admin/js/jquery.conditioner.js +192 -0
  84. admin/js/script.js +1275 -0
  85. admin/js/script_widgets.js +59 -0
  86. admin/js/share.php +0 -75
  87. admin/js/sharebar_preview.js +35 -0
  88. admin/js/tinymce/Thumbs.db +0 -0
  89. admin/js/tinymce/editor_plugin.js +0 -96
  90. admin/js/tinymce/icon.png +0 -0
  91. admin/js/trumbowyg/icons.svg +1 -0
  92. admin/js/trumbowyg/trumbowyg.min.css +2 -0
  93. admin/js/trumbowyg/trumbowyg.min.js +2 -0
  94. admin/mobile_sharebar.php +158 -0
  95. admin/sharebar.php +229 -0
  96. admin/templates/images/Thumbs.db +0 -0
  97. admin/templates/images/template_2_compact.PNG +0 -0
  98. admin/templates/images/template_2_large_inv.PNG +0 -0
  99. admin/templates/images/template_addthis_compact.png +0 -0
  100. admin/templates/images/template_addthis_large.png +0 -0
  101. admin/templates/images/template_compact.png +0 -0
  102. admin/templates/images/template_compact_inv.png +0 -0
  103. admin/templates/images/template_large.png +0 -0
  104. admin/templates/images/template_large_inv.png +0 -0
  105. admin/templates/images/template_sharethis_compact.png +0 -0
  106. admin/templates/images/template_sharethis_large.png +0 -0
  107. admin/templates/images/template_socialbts_16px_1.png +0 -0
  108. admin/templates/images/template_socialbts_32px_1.png +0 -0
  109. admin/templates/templates.xml +0 -623
  110. admin/text_sharebar.php +155 -0
  111. admin/wpsr-admin-css.css +0 -794
  112. admin/wpsr-admin-floating-bar.php +0 -205
  113. admin/wpsr-admin-js.js +0 -430
  114. admin/wpsr-admin-mini-css.css +0 -46
  115. admin/wpsr-admin-other.php +0 -92
  116. admin/wpsr-admin.php +0 -1374
  117. admin/wpsr-services-selector.php +0 -223
  118. core/buttons.php +289 -0
  119. core/includes.php +194 -0
  120. core/lists.php +915 -0
  121. core/location_rules.php +489 -0
  122. core/metadata.php +162 -0
  123. core/services.php +135 -0
  124. core/share_counter.php +259 -0
  125. core/templates.php +591 -0
  126. core/widgets.php +389 -0
  127. includes/wpsr-addthis.php +0 -254
  128. includes/wpsr-custom.php +0 -40
  129. includes/wpsr-digg.php +0 -94
  130. includes/wpsr-facebook.php +0 -91
  131. includes/wpsr-floatingbar.php +0 -124
  132. includes/wpsr-google.php +0 -75
  133. includes/wpsr-other.php +0 -329
  134. includes/wpsr-retweet.php +0 -160
  135. includes/wpsr-sharethis.php +0 -185
  136. includes/wpsr-shortcodes.php +0 -102
  137. includes/wpsr-socialbuttons.php +0 -469
  138. includes/wpsr-widgets.php +0 -222
  139. public/buttons/digg-bt.png +0 -0
  140. public/buttons/facebook-bt.png +0 -0
  141. public/buttons/linkedin-bt.png +0 -0
  142. public/buttons/min-floatbar.png +0 -0
  143. public/buttons/reddit-bt.gif +0 -0
  144. public/buttons/retweet-bt.png +0 -0
  145. public/buttons/sharethis-bt.png +0 -0
  146. public/buttons/stumbleupon-bt.gif +0 -0
  147. public/css/images/comments-bg.png +0 -0
  148. public/css/images/dark-bg.png +0 -0
  149. public/css/images/grey-bg.png +0 -0
  150. public/css/images/grey-toggle.png +0 -0
  151. public/css/wp-socializer-buttons-css.css +0 -332
  152. public/css/wp-socializer.css +416 -0
  153. public/css/wp-socializer.min.css +1 -0
  154. public/js/wp-socializer-bookmark-js.js +0 -16
  155. public/js/wp-socializer-floating-bar-js.js +0 -116
  156. public/js/wp-socializer.js +240 -0
  157. public/js/wp-socializer.min.js +19 -0
  158. public/social-icons/16/addtofavorites.png +0 -0
  159. public/social-icons/16/barrapunto.png +0 -0
  160. public/social-icons/16/bitacoras.png +0 -0
  161. public/social-icons/16/blinklist.png +0 -0
  162. public/social-icons/16/blip.png +0 -0
  163. public/social-icons/16/blogger.png +0 -0
  164. public/social-icons/16/blogmarks.png +0 -0
  165. public/social-icons/16/blogospherenews.png +0 -0
  166. public/social-icons/16/blogter.png +0 -0
  167. public/social-icons/16/bluedot.png +0 -0
  168. public/social-icons/16/box.png +0 -0
  169. public/social-icons/16/connotea.png +0 -0
  170. public/social-icons/16/current.png +0 -0
  171. public/social-icons/16/delicious.png +0 -0
  172. public/social-icons/16/designbump.png +0 -0
  173. public/social-icons/16/designfloat.png +0 -0
  174. public/social-icons/16/digg.png +0 -0
  175. public/social-icons/16/diggita.png +0 -0
  176. public/social-icons/16/diigo.png +0 -0
  177. public/social-icons/16/dotnetkicks.png +0 -0
  178. public/social-icons/16/dzone.png +0 -0
  179. public/social-icons/16/ekudos.png +0 -0
  180. public/social-icons/16/email.png +0 -0
  181. public/social-icons/16/facebook.png +0 -0
  182. public/social-icons/16/fark.png +0 -0
  183. public/social-icons/16/fleck.png +0 -0
  184. public/social-icons/16/friendfeed.png +0 -0
  185. public/social-icons/16/friendster.png +0 -0
  186. public/social-icons/16/fsdaily.png +0 -0
  187. public/social-icons/16/gadugadu.png +0 -0
  188. public/social-icons/16/globalgrind.png +0 -0
  189. public/social-icons/16/google.png +0 -0
  190. public/social-icons/16/googleplus.png +0 -0
  191. public/social-icons/16/googlereader.png +0 -0
  192. public/social-icons/16/grono.png +0 -0
  193. public/social-icons/16/gwar.png +0 -0
  194. public/social-icons/16/hackernews.png +0 -0
  195. public/social-icons/16/haohao.png +0 -0
  196. public/social-icons/16/healthranker.png +0 -0
  197. public/social-icons/16/hellotxt.png +0 -0
  198. public/social-icons/16/hemidemi.png +0 -0
  199. public/social-icons/16/hyves.png +0 -0
  200. public/social-icons/16/identica.png +0 -0
  201. public/social-icons/16/im.png +0 -0
  202. public/social-icons/16/indianpad.png +0 -0
  203. public/social-icons/16/instapaper.png +0 -0
  204. public/social-icons/16/kciuk.png +0 -0
  205. public/social-icons/16/kirtsy.png +0 -0
  206. public/social-icons/16/laaikit.png +0 -0
  207. public/social-icons/16/latafanera.png +0 -0
  208. public/social-icons/16/linkagogo.png +0 -0
  209. public/social-icons/16/linkarena.png +0 -0
  210. public/social-icons/16/linkedin.png +0 -0
  211. public/social-icons/16/linkter.png +0 -0
  212. public/social-icons/16/live.png +0 -0
  213. public/social-icons/16/meneame.png +0 -0
  214. public/social-icons/16/misterwong.png +0 -0
  215. public/social-icons/16/mixx.png +0 -0
  216. public/social-icons/16/mob.png +0 -0
  217. public/social-icons/16/msnreporter.png +0 -0
  218. public/social-icons/16/muti.png +0 -0
  219. public/social-icons/16/myshare.png +0 -0
  220. public/social-icons/16/myspace.png +0 -0
  221. public/social-icons/16/n4g.png +0 -0
  222. public/social-icons/16/netvibes.png +0 -0
  223. public/social-icons/16/netvouz.png +0 -0
  224. public/social-icons/16/newsvine.png +0 -0
  225. public/social-icons/16/nk.png +0 -0
  226. public/social-icons/16/nujij.png +0 -0
  227. public/social-icons/16/oknotizie.png +0 -0
  228. public/social-icons/16/orkut.png +0 -0
  229. public/social-icons/16/osnews.png +0 -0
  230. public/social-icons/16/pdf.png +0 -0
  231. public/social-icons/16/ping.png +0 -0
  232. public/social-icons/16/pinterest.png +0 -0
  233. public/social-icons/16/posterous.png +0 -0
  234. public/social-icons/16/printfriendly.png +0 -0
  235. public/social-icons/16/propeller.png +0 -0
  236. public/social-icons/16/ratimarks.png +0 -0
  237. public/social-icons/16/readme.html +0 -44
  238. public/social-icons/16/rec6.png +0 -0
  239. public/social-icons/16/reddit.png +0 -0
  240. public/social-icons/16/rss.png +0 -0
  241. public/social-icons/16/scoopeo.png +0 -0
  242. public/social-icons/16/segnalo.png +0 -0
  243. public/social-icons/16/shetoldme.png +0 -0
  244. public/social-icons/16/simpy.png +0 -0
  245. public/social-icons/16/slashdot.png +0 -0
  246. public/social-icons/16/socialogs.png +0 -0
  247. public/social-icons/16/sphere.png +0 -0
  248. public/social-icons/16/sphinn.png +0 -0
  249. public/social-icons/16/stumbleupon.png +0 -0
  250. public/social-icons/16/techmeme.png +0 -0
  251. public/social-icons/16/technorati.png +0 -0
  252. public/social-icons/16/tipd.png +0 -0
  253. public/social-icons/16/tumblr.png +0 -0
  254. public/social-icons/16/twitter.png +0 -0
  255. public/social-icons/16/upnews.png +0 -0
  256. public/social-icons/16/viadeo.png +0 -0
  257. public/social-icons/16/vkontakte.png +0 -0
  258. public/social-icons/16/webnews.png +0 -0
  259. public/social-icons/16/webride.png +0 -0
  260. public/social-icons/16/wikio.png +0 -0
  261. public/social-icons/16/wists.png +0 -0
  262. public/social-icons/16/wykop.png +0 -0
  263. public/social-icons/16/xerpi.png +0 -0
  264. public/social-icons/16/yahoobuzz.png +0 -0
  265. public/social-icons/16/yahoomyweb.png +0 -0
  266. public/social-icons/16/yiggit.png +0 -0
  267. public/social-icons/32/addtofavorites.png +0 -0
  268. public/social-icons/32/blinklist.png +0 -0
  269. public/social-icons/32/blip.png +0 -0
  270. public/social-icons/32/blogger.png +0 -0
  271. public/social-icons/32/delicious.png +0 -0
  272. public/social-icons/32/designbump.png +0 -0
  273. public/social-icons/32/designfloat.png +0 -0
  274. public/social-icons/32/digg.png +0 -0
  275. public/social-icons/32/dzone.png +0 -0
  276. public/social-icons/32/email.png +0 -0
  277. public/social-icons/32/facebook.png +0 -0
  278. public/social-icons/32/friendfeed.png +0 -0
  279. public/social-icons/32/friendster.png +0 -0
  280. public/social-icons/32/gadugadu.png +0 -0
  281. public/social-icons/32/google.png +0 -0
  282. public/social-icons/32/googleplus.png +0 -0
  283. public/social-icons/32/googlereader.png +0 -0
  284. public/social-icons/32/grono.png +0 -0
  285. public/social-icons/32/hyves.png +0 -0
  286. public/social-icons/32/instapaper.png +0 -0
  287. public/social-icons/32/kciuk.png +0 -0
  288. public/social-icons/32/linkedin.png +0 -0
  289. public/social-icons/32/live.png +0 -0
  290. public/social-icons/32/misterwong.png +0 -0
  291. public/social-icons/32/mixx.png +0 -0
  292. public/social-icons/32/myspace.png +0 -0
  293. public/social-icons/32/netvibes.png +0 -0
  294. public/social-icons/32/newsvine.png +0 -0
  295. public/social-icons/32/nk.png +0 -0
  296. public/social-icons/32/oknotizie.png +0 -0
  297. public/social-icons/32/orkut.png +0 -0
  298. public/social-icons/32/osnews.png +0 -0
  299. public/social-icons/32/ping.png +0 -0
  300. public/social-icons/32/pinterest.png +0 -0
  301. public/social-icons/32/posterous.png +0 -0
  302. public/social-icons/32/printfriendly.png +0 -0
  303. public/social-icons/32/readme.html +0 -44
  304. public/social-icons/32/reddit.png +0 -0
  305. public/social-icons/32/rss.png +0 -0
  306. public/social-icons/32/sphinn.png +0 -0
  307. public/social-icons/32/stumbleupon.png +0 -0
  308. public/social-icons/32/technorati.png +0 -0
  309. public/social-icons/32/tumblr.png +0 -0
  310. public/social-icons/32/twitter.png +0 -0
  311. public/social-icons/32/vkontakte.png +0 -0
  312. public/social-icons/32/wykop.png +0 -0
  313. public/social-icons/32/yahoo.png +0 -0
  314. public/social-icons/32/yahoobuzz.png +0 -0
  315. public/social-icons/wp-socializer-sprite-16px.png +0 -0
  316. public/social-icons/wp-socializer-sprite-32px.png +0 -0
  317. public/social-icons/wp-socializer-sprite-mask-16px.gif +0 -0
  318. public/social-icons/wp-socializer-sprite-mask-32px.gif +0 -0
  319. readme.txt +85 -240
  320. screenshot-1.png +0 -0
  321. screenshot-10.png +0 -0
  322. screenshot-11.png +0 -0
  323. screenshot-2.png +0 -0
  324. screenshot-3.png +0 -0
  325. screenshot-4.png +0 -0
  326. screenshot-5.png +0 -0
  327. screenshot-6.png +0 -0
  328. screenshot-7.png +0 -0
  329. screenshot-8.png +0 -0
  330. screenshot-9.png +0 -0
  331. services/facebook.php +275 -0
  332. services/google_plus.php +191 -0
  333. services/html.php +115 -0
  334. services/linkedin.php +95 -0
  335. services/pinterest.php +169 -0
  336. services/pocket.php +94 -0
  337. services/reddit.php +94 -0
  338. services/share_counter.php +131 -0
  339. services/sharethis.php +158 -0
  340. services/social_buttons.php +581 -0
  341. services/stumbleupon.php +105 -0
  342. services/twitter.php +244 -0
  343. wp-socializer.php +0 -1562
  344. wpsr.php +79 -0
README.md ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ # WP Socializer #
2
+
3
+ WP Socializer is an all in one complete social media plugin to add native social media buttons, icons, floating sharebar, follow us buttons, profile icons, mobile sharebar and selected text share popups easily with complete control and customization.
4
+
5
+ It powers a drag & drop admin interface to create buttons with customization and options to selectively display buttons in the desired post and pages.
admin/admin.php ADDED
@@ -0,0 +1,707 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Main entry point class for admin page
4
+ *
5
+ **/
6
+
7
+ class WPSR_Admin{
8
+
9
+ public static $tabs = array();
10
+ public static $pagehook = 'toplevel_page_wp_socializer';
11
+
12
+ public static function init(){
13
+
14
+ // Register the admin menu
15
+ add_action( 'admin_menu', array( __CLASS__, 'admin_menu' ) );
16
+
17
+ // Enqueue the scripts and styles
18
+ add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_scripts' ) );
19
+
20
+ // Register action to include admin scripts
21
+ add_action( 'admin_print_scripts', array( __CLASS__, 'inline_scripts' ) );
22
+
23
+ // Register the action for admin ajax features
24
+ add_action( 'wp_ajax_wpsr_admin_ajax', array( __CLASS__, 'admin_ajax' ) );
25
+
26
+ // Register the action links in plugin list page
27
+ add_filter( 'plugin_action_links_' . WPSR_BASE_NAME, array( __CLASS__, 'action_links' ) );
28
+
29
+ // Register the admin notice to inform new version features
30
+ add_action( 'admin_notices', array( __CLASS__, 'admin_notices' ) );
31
+
32
+ }
33
+
34
+ public static function admin_menu(){
35
+
36
+ $tabs = self::get_tabs();
37
+ $icon = WPSR_ADMIN_URL . 'images/icons/wp-socializer-sm.png';
38
+
39
+ add_menu_page( 'WP Socializer - Admin page', 'WP Socializer', 'manage_options', 'wp_socializer', array( __CLASS__, 'admin_page' ), $icon );
40
+
41
+ foreach( $tabs as $id=>$config ){
42
+ add_submenu_page( 'wp_socializer', 'WP Socializer - ' . $config[ 'name' ], $config[ 'name' ], 'manage_options', 'wp_socializer&tab="' . $id . '"', array( __CLASS__, 'admin_page' ) );
43
+ }
44
+ }
45
+
46
+ public static function add_tab( $id, $config ){
47
+
48
+ self::$tabs[ $id ] = $config;
49
+
50
+ // Register the validation filter for the form
51
+ if( isset( $config[ 'form' ][ 'validation' ] ) ){
52
+ add_filter( 'wpsr_form_validation_' . $config[ 'form' ][ 'name' ], $config[ 'form' ][ 'validation' ] );
53
+ }
54
+ }
55
+
56
+ public static function get_tabs(){
57
+ return apply_filters( 'wpsr_admin_tabs', self::$tabs );
58
+ }
59
+
60
+ public static function admin_page(){
61
+
62
+ if( !current_user_can( 'manage_options' ) ){
63
+ wp_die( __( 'You do not have sufficient permissions to access this page.' ) );
64
+ }
65
+
66
+ $tabs = self::get_tabs();
67
+ $current_tab = isset( $_GET['tab'] ) ? $_GET['tab'] : '';
68
+
69
+ // Set default tab
70
+ if( empty( $current_tab ) || !array_key_exists( $current_tab, $tabs ) ){
71
+ $current_tab = 'buttons';
72
+ }
73
+
74
+ echo '<div class="wrap">';
75
+ self::admin_tabs();
76
+ echo '<div id="content">';
77
+ call_user_func( self::$tabs[ $current_tab ][ 'page_callback' ] );
78
+ echo '</div>';
79
+ echo '</div>';
80
+
81
+ }
82
+
83
+ public static function admin_tabs(){
84
+
85
+ // Set default as home
86
+ $_GET[ 'tab' ] = empty( $_GET[ 'tab' ] ) ? 'buttons' : $_GET[ 'tab' ];
87
+
88
+ // Apply filters on the tabs list
89
+ $tabs = apply_filters( 'wpsr_mod_admin_tabs', self::$tabs );
90
+
91
+ echo '<div id="head_wrap">';
92
+ echo '<h1 class="wpsr_title">WP Socializer <span class="title-count">' . WPSR_VERSION . '</span></h1>';
93
+ echo '<h2 class="nav-tab-wrapper" >';
94
+
95
+ // Tabs
96
+ foreach( $tabs as $id => $config ){
97
+
98
+ // Apply default config
99
+ $config = wp_parse_args( $config, array(
100
+ 'name' => '',
101
+ 'banner' => '',
102
+ 'page_callback' => '',
103
+ 'form' => array(
104
+ 'id' => '',
105
+ 'name' => '',
106
+ 'callback' => '',
107
+ 'validation' => '',
108
+ )
109
+ ));
110
+
111
+ if( $_GET[ 'tab' ] == $id ){
112
+ $active = ' nav-tab-active';
113
+ }else{
114
+ $active = '';
115
+ }
116
+ echo '<a class="nav-tab' . $active . ' tab-' . $id . '" href="admin.php?page=wp_socializer&tab=' . $id . '">' . $config[ 'name' ];
117
+
118
+ if( !empty( $config[ 'banner' ] ) ){
119
+ echo '<div class="page_tip"><img src="' . $config[ 'banner' ] . '" alt="' . $config[ 'name' ] . '" /></div>';
120
+ }
121
+
122
+ echo '</a>';
123
+ }
124
+ echo '</h2>';
125
+
126
+ self::donate_button();
127
+
128
+ echo '</div>';
129
+ }
130
+
131
+ public static function settings_form( $id = '' ){
132
+
133
+ if( empty( $id ) )
134
+ return;
135
+
136
+ $form_id = self::$tabs[ $id ][ 'form' ][ 'id' ];
137
+ $form_name = self::$tabs[ $id ][ 'form' ][ 'name' ];
138
+ $form_callback = self::$tabs[ $id ][ 'form' ][ 'callback' ];
139
+
140
+ $option = 'wpsr_' . $form_name;
141
+ $nonce = 'wpsr_nonce_' . $form_name . '_submit';
142
+ $form_fields = 'wpsr_form_' . $form_name;
143
+ $validation_filter = 'wpsr_form_validation_' . $form_name;
144
+
145
+ // Form post
146
+ if( $_POST && check_admin_referer( $nonce ) ){
147
+
148
+ $post = self::clean_post();
149
+ $post_value = apply_filters( $validation_filter, $post );
150
+
151
+ update_option( $option, $post_value );
152
+
153
+ echo '<div class="notice notice-success inline is-dismissible"><p>' . __( 'Settings saved !', 'wpsr' ) . '</p></div>';
154
+ }
155
+
156
+ // Get saved details
157
+ $saved_settings = get_option( $option );
158
+
159
+ echo '<form method="post" id="' . $form_id . '" class="main_form">';
160
+
161
+ // Execute all hooked form fields from services
162
+ if( is_callable( $form_callback ) ){
163
+ call_user_func( $form_callback, $saved_settings );
164
+ }
165
+
166
+ do_action( 'wpsr_form_' . $form_name, $saved_settings );
167
+
168
+ wp_nonce_field( $nonce );
169
+
170
+ echo '<div class="main_form_footer postbox"><input type="submit" value="Save Settings" class="button button-primary" /></div>';
171
+
172
+ echo '</form>';
173
+
174
+ self::welcome_popup();
175
+
176
+ self::admin_footer();
177
+
178
+ self::admin_sharebar();
179
+
180
+ }
181
+
182
+ public static function enqueue_scripts( $hook ){
183
+
184
+ if( self::$pagehook == $hook ){
185
+ wp_enqueue_style( 'wpsr_css', WPSR_ADMIN_URL . 'css/style.css' );
186
+ wp_enqueue_style( 'wp-color-picker' );
187
+ wp_enqueue_style( 'wpsr_ipopup', WPSR_ADMIN_URL . 'css/ipopup.css' );
188
+ wp_enqueue_style( 'wpsr_fa', WPSR_Lists::ext_res( 'font-awesome' ) );
189
+
190
+ wp_enqueue_script( 'jquery' );
191
+ wp_enqueue_script( 'jquery-conditioner', WPSR_ADMIN_URL . 'js/jquery.conditioner.js', array( 'jquery' ) );
192
+ wp_enqueue_script( 'wp-color-picker' );
193
+ wp_enqueue_script( 'jquery-ui-sortable' );
194
+ wp_enqueue_script( 'jquery-ui-draggable' );
195
+ wp_enqueue_script( 'wpsr_ipopup', WPSR_ADMIN_URL . 'js/ipopup.js' );
196
+ wp_enqueue_script( 'wpsr_js', WPSR_ADMIN_URL . 'js/script.js', array( 'jquery', 'jquery-ui-sortable', 'jquery-ui-draggable', 'jquery-conditioner', 'wp-color-picker', 'wpsr_ipopup' ) );
197
+
198
+ }
199
+
200
+ }
201
+
202
+ public static function inline_scripts(){
203
+
204
+ $screen = get_current_screen();
205
+
206
+ if( self::$pagehook == $screen->id ){
207
+
208
+ $services = WPSR_Services::list_all();
209
+ $loc_rules = WPSR_Location_Rules::rules_list();
210
+
211
+ $js_texts = array(
212
+ 'sel_btn' => __( 'Please select a service to create button for !', 'wpsr' ),
213
+ 'del_btn' => __( 'Are you sure want to delete this button ?', 'wpsr' ),
214
+ 'close' => __( 'Close', 'wpsr' ),
215
+ 'fb_empty' => __( 'No buttons are added. Open the editor to add buttons.', 'wpsr' )
216
+ );
217
+
218
+ echo '<script>
219
+ var wpsr = {
220
+ ajaxurl: "' . get_admin_url() . 'admin-ajax.php",
221
+ services: ' . wp_json_encode( $services ) . ',
222
+ loc_rules: ' . wp_json_encode( $loc_rules ) . ',
223
+ js_texts: ' . wp_json_encode( $js_texts ) . ',
224
+ ext_res: ' . wp_json_encode( WPSR_Lists::ext_res() ) . ',
225
+ };
226
+ </script>';
227
+
228
+ if( get_option( 'wpsr_version' ) != WPSR_VERSION ){
229
+ echo '<script>var wpsr_show_changelog = "' . WPSR_VERSION . '";</script>';
230
+ }
231
+ }
232
+
233
+ }
234
+
235
+ public static function box_wrap( $type, $title = '' , $desc = '', $step = '', $class = '' ){
236
+
237
+ $title = !empty( $step ) ? '<span class="step" data-step="' . $step . '">' . $title . '</span>' : $title;
238
+
239
+ if( $type == 'open' ){
240
+ echo '<div class="postbox ' . $class . '">';
241
+ echo '<h3 class="hndle">' . $title . '</h3><div class="inside">';
242
+ if( !empty( $desc ) ) echo '<p>' . $desc . '</p>';
243
+ }
244
+
245
+ if( $type == 'close' ){
246
+ echo '</div></div> <!-- postbox, inside -->';
247
+ }
248
+
249
+ }
250
+
251
+ public static function select_box( $list = array(), $props = array() , $action_btn = false ){
252
+
253
+ $class = $props[0];
254
+ $name = $props[1];
255
+ $dval = $props[2];
256
+
257
+ echo '<div class="sbox_wrap ' . $class . '">';
258
+ echo '<input class="sbox_field" type="hidden" ' . ( $name ? 'name="' . $name . '"' : '' ) . ' value="' . ( $name ? $dval : '' ) . '" />';
259
+ echo '<div class="sbox_inner" title="' . __( 'Click to open the list of services', 'wpsr' ) . '">';
260
+ echo '<div class="sbox_val">' . ( $name ? ( isset( $list[ $dval ] ) ? $list[ $dval ] : 'Select ...' ) : $dval ) . '</div>';
261
+ echo '<ul title="' . __( 'Select this service', 'wpsr' ) . '">';
262
+ foreach( $list as $k => $v ){
263
+ echo '<li data-val="' . $k . '">' . $v . '</li>';
264
+ }
265
+ echo '</ul>';
266
+ echo '</div>';
267
+ if( $action_btn ) echo '<div class="sbox_action button-primary">' . $action_btn . '</div>';
268
+ echo '</div>';
269
+
270
+ }
271
+
272
+ public static function build_table( $input, $title = '', $desc = '', $mini = false, $step = '', $class = '' ){
273
+
274
+ //$input = array( array( 'Desc', 'field' ), array( 'Desc2', 'field2' ) );
275
+
276
+ if( !is_array( $input ) )
277
+ return '';
278
+
279
+ if( !empty( $title ) && $mini == false ){
280
+ WPSR_Admin::box_wrap( 'open', $title, $desc, $step, $class );
281
+ }else if ( $mini == true ){
282
+ echo !empty( $title ) || !empty( $desc ) ? '<div class="sec_title_wrap">' : '';
283
+ echo !empty( $title ) ? '<h4>' . $title . '</h4>' : '';
284
+ echo !empty( $desc ) ? '<p>' . $desc . '</p>' : '';
285
+ echo !empty( $title ) || !empty( $desc ) ? '</div>' : '';
286
+ }
287
+
288
+ echo '<table class="form-table">';
289
+ foreach( $input as $r ){
290
+ echo '<tr ' . ( isset( $r[2] ) ? $r[2] : '' ) . '>';
291
+ echo '<th>' . $r[0] . '</th>';
292
+ echo '<td>' . $r[1] . '</td>';
293
+ echo '</tr>';
294
+ }
295
+ echo '</table>';
296
+
297
+ if( !empty( $title ) && $mini == false ){
298
+ echo '</div></div>';
299
+ }
300
+
301
+ }
302
+
303
+ public static function field( $field_type, $params = array() ){
304
+
305
+ $defaults = array(
306
+
307
+ 'text' => array(
308
+ 'type' => 'text',
309
+ 'value' => '',
310
+ 'default' => '',
311
+ 'id' => '',
312
+ 'class' => 'regular-text',
313
+ 'name' => '',
314
+ 'placeholder' => '',
315
+ 'required' => '',
316
+ 'helper' => '',
317
+ 'custom' => '',
318
+ 'tip' => '',
319
+ 'qtip' => ''
320
+ ),
321
+
322
+ 'select' => array(
323
+ 'id' => '',
324
+ 'class' => '',
325
+ 'name' => '',
326
+ 'list' => array(),
327
+ 'value' => '',
328
+ 'default' => '',
329
+ 'helper' => '',
330
+ 'custom' => '',
331
+ 'tip' => '',
332
+ 'qtip' => ''
333
+ ),
334
+
335
+ 'radio' => array(
336
+ 'id' => '',
337
+ 'class' => '',
338
+ 'name' => '',
339
+ 'list' => array(),
340
+ 'value' => '',
341
+ 'default' => '',
342
+ 'helper' => '',
343
+ 'custom' => '',
344
+ 'tip' => '',
345
+ 'qtip' => ''
346
+ ),
347
+
348
+ 'checkbox' => array(
349
+ 'id' => '',
350
+ 'class' => '',
351
+ 'name' => '',
352
+ 'list' => array(),
353
+ 'value' => array(),
354
+ 'default' => array(),
355
+ 'helper' => '',
356
+ 'custom' => '',
357
+ 'tip' => '',
358
+ 'qtip' => ''
359
+ ),
360
+
361
+ 'textarea' => array(
362
+ 'type' => 'text',
363
+ 'value' => '',
364
+ 'name' => '',
365
+ 'default' => '',
366
+ 'id' => '',
367
+ 'class' => '',
368
+ 'placeholder' => '',
369
+ 'rows' => '',
370
+ 'cols' => '',
371
+ 'helper' => '',
372
+ 'custom' => '',
373
+ 'tip' => '',
374
+ 'qtip' => ''
375
+ )
376
+
377
+ );
378
+
379
+ $params = wp_parse_args( $params, $defaults[ $field_type ] );
380
+ $field_html = '';
381
+
382
+ $params = self::clean_attr( $params );
383
+ extract( $params, EXTR_SKIP );
384
+
385
+ $tip = !empty( $tip ) ? ' data-htip="' . $tip . '" ' : '';
386
+
387
+ switch( $field_type ){
388
+ case 'text':
389
+ $field_html = "<input type='$type' class='$class' id='$id' name='$name' value='$value' placeholder='$placeholder' " . ( $required ? "required='$required'" : "" ) . " $custom $tip />";
390
+ break;
391
+
392
+ case 'select':
393
+ $field_html .= "<select name='$name' class='$class' id='$id' $custom $tip>";
394
+ foreach( $list as $k => $v ){
395
+ $field_html .= "<option value='$k' " . selected( $value, $k, false ) . ">$v</option>";
396
+ }
397
+ $field_html .= "</select>";
398
+ break;
399
+
400
+ case 'radio':
401
+ foreach( $list as $k => $v ){
402
+ $field_html .= "<label class='lbl_margin' $custom $tip><input type='radio' name='$name' class='$class' value='$k' id='$id' " . checked( $value, $k, false ) . ">&nbsp;$v </label>";
403
+ }
404
+ break;
405
+
406
+ case 'checkbox':
407
+ foreach( $list as $k => $v ){
408
+ $checked = ( in_array( $k,(array) $value ) ) ? 'checked="checked"' : '';
409
+ $field_html .= "<label $custom $tip><input type='checkbox' name='" . $name . "[]' class='$class' value='$k' id='$id' $checked>&nbsp;$v </label>&nbsp;&nbsp;";
410
+ }
411
+ break;
412
+
413
+ case 'textarea':
414
+ $field_html .= "<textarea id='$id' name='$name' class='$class' placeholder='$placeholder' rows='$rows' cols='$cols' $custom $tip>$value</textarea>";
415
+ break;
416
+ }
417
+
418
+ if( !empty( $qtip ) )
419
+ $field_html .= "<a href='$qtip' class='qtip_icon' title='" . __( 'Click to view help', 'wpsr' ) . "' target='_blank'><i class='fa fa-question-circle'></i></a>";
420
+
421
+ if( !empty( $helper ) )
422
+ $field_html .= "<p class='description'>$helper</p>";
423
+
424
+ return $field_html;
425
+
426
+ }
427
+
428
+ public static function buttons_selector( $feature = array() ){
429
+
430
+ $services = WPSR_Services::list_all();
431
+ $buttons_list = array();
432
+ $feature = self::validate_feature( $feature );
433
+
434
+ foreach( $services as $id => $config ){
435
+ if( !in_array( $feature[ 'name' ], $config[ 'hide_in_feature' ] ) && !in_array( $id, $feature[ 'hide_services' ] ) ){
436
+ $img = '<img src="' . $config[ 'icons' ] . '" />';
437
+ $name = '<div class="btn_liname" data-service="' . $id . '" data-feature="' . $feature[ 'name' ] . '" >' . $config[ 'name' ] . ( isset( $config['desc'] ) ? ' <em>' . $config['desc'] . '</em>' : '' ) . '</div>';
438
+ $buttons_list[ $id ] = $img . $name;
439
+ }
440
+ }
441
+
442
+ self::select_box( $buttons_list, array( 'btn_selector', false, '<i class="grey">Select a service from the list ...</i>' ), 'Create button' );
443
+
444
+ }
445
+
446
+ public static function buttons_list( $mode, $prop ){
447
+
448
+ $services = WPSR_Services::list_all();
449
+ $buttons = WPSR_Buttons::list_all();
450
+ $buttons_list = array(); // Holds all the button ids
451
+ $class = '';
452
+
453
+ // Print all created buttons, prop is feature
454
+ if( $mode == 'all_buttons' ){
455
+ $feature = self::validate_feature( $prop );
456
+ $class = 'btns_created';
457
+ foreach( $buttons as $id => $config )
458
+ if( $config[ 'feature' ] == $feature[ 'name' ] )
459
+ array_push( $buttons_list, $id );
460
+ }
461
+
462
+ // Print all buttons for veditor, prop is list of buttons
463
+ if( $mode == 'veditor_buttons' ){
464
+ $buttons_list = $prop;
465
+ }
466
+
467
+ // To print the created buttons of specific feature
468
+ echo '<ul class="btn_list clearfix ' . $class . '" data-empty="No buttons created">';
469
+ foreach( $buttons_list as $button ){
470
+
471
+ if( !isset( $buttons[ $button ] ) )
472
+ continue;
473
+
474
+ $btn_prop = $buttons[ $button ];
475
+
476
+ if( !isset( $services[ $btn_prop[ 'service' ] ] ) )
477
+ continue;
478
+
479
+ $service = $services[ $btn_prop[ 'service' ] ];
480
+
481
+ echo '<li data-service="' . $btn_prop[ 'service' ] . '" data-id="' . $button . '" class="ui_btn">';
482
+ echo '<span class="btn_icon"><img src="' . $service['icons'] . '" /></span>';
483
+ echo '<span class="btn_name"' . ( isset( $btn_prop[ 'settings' ][ 'title' ] ) ? 'data-title="' . $btn_prop[ 'settings' ][ 'title' ] . '"' : '' ) . '>' . $service['name'] . '</span>';
484
+ echo '<span class="btn_action btn_delete dashicons dashicons-no-alt" title="' . __( 'Delete button', 'wpsr' ) . '"></span>';
485
+ echo '<span class="btn_action btn_edit dashicons dashicons-admin-generic" title="' . __( 'Settings', 'wpsr' ) . '"></span>';
486
+ echo '</li>';
487
+ }
488
+ echo '</ul>';
489
+
490
+ }
491
+
492
+ public static function buttons_veditor( $name, $content, $multiple_rows = true, $preview = false ){
493
+
494
+ echo '<div class="vedit_wrap">';
495
+ echo '<div class="veditor">';
496
+
497
+ $tmpl = base64_decode( $content );
498
+ $tmpl_cnt = ( empty( $tmpl ) || !isset( $tmpl ) ) ? '{"1":{"properties":{},"buttons":{}}}' : $tmpl ;
499
+ $tmpl_cnt_obj = json_decode( $tmpl_cnt );
500
+ $services = WPSR_Services::list_all();
501
+ $buttons = WPSR_Buttons::list_all();
502
+
503
+ foreach( $tmpl_cnt_obj as $k => $o ){
504
+ $buttons_row = array();
505
+ foreach( $o->buttons as $bid ){ // Iterate through array of button objects
506
+ $bkey = key((array)$bid); // Get the key of the button obj
507
+ array_push( $buttons_row, $bkey );
508
+ }
509
+ self::buttons_list( 'veditor_buttons', $buttons_row );
510
+ }
511
+
512
+ echo '</div>';
513
+ echo '<input type="hidden" class="veditor_content" name="' . $name . '" />';
514
+
515
+ if( $preview ){
516
+ echo '<div class="veditor_preview">';
517
+ echo '<button class="button vedit_preview_btn" data-action="' . $preview . '" title="' . __( 'Click to show preview for the above template', 'wpsr' ) . '" data-refresh="' . __( 'Refresh preview', 'wpsr' ) . '"><i class="fa fa-eye"></i> ' . __( 'Show preview', 'wpsr' ) . '</button>';
518
+ echo '<iframe src="" width="100%" class="vedit_preview_iframe"></iframe>';
519
+ echo '</div>';
520
+ }
521
+
522
+ echo '</div><!-- veditor_wrap -->';
523
+
524
+ if( $multiple_rows ){
525
+ echo '<div class="vedit_menu">
526
+ <a class="vedit_add_row" title="' . __( 'Add a new row', 'wpsr' ) . '"><span class="dashicons dashicons-plus"></span></a>
527
+ <a class="vedit_delete_row" title="' . __( 'Delete row', 'wpsr' ) . '"><span class="dashicons dashicons-no-alt"></span></a>
528
+ </div>';
529
+ }
530
+
531
+ }
532
+
533
+ public static function validate_feature( $feature ){
534
+
535
+ return wp_parse_args( $feature, array(
536
+ 'name' => 'none',
537
+ 'hide_services' => array()
538
+ ));
539
+
540
+ }
541
+
542
+ public static function admin_ajax(){
543
+
544
+ $get = self::clean_get();
545
+ $do = $get[ 'do' ];
546
+
547
+ if( $do == 'close_changelog' ){
548
+ update_option( 'wpsr_version', WPSR_VERSION );
549
+ echo 'done';
550
+ }
551
+
552
+ die( 0 );
553
+
554
+ }
555
+
556
+ public static function clean_post(){
557
+
558
+ return stripslashes_deep( $_POST );
559
+
560
+ }
561
+
562
+ public static function clean_attr( $a ){
563
+
564
+ foreach( $a as $k=>$v ){
565
+ if( is_array( $v ) ){
566
+ $a[ $k ] = self::clean_attr( $v );
567
+ }else{
568
+
569
+ if( in_array( $k, array( 'custom', 'tip', 'helper' ) ) )
570
+ continue;
571
+
572
+ $a[ $k ] = esc_attr( $v );
573
+ }
574
+ }
575
+
576
+ return $a;
577
+ }
578
+
579
+ public static function clean_get(){
580
+
581
+ foreach( $_GET as $k=>$v ){
582
+ $_GET[$k] = sanitize_text_field( $v );
583
+ }
584
+
585
+ return $_GET;
586
+ }
587
+
588
+ public static function youtube_help_icon( $url ){
589
+ echo '<a href="' . $url . '" title="' . __( 'YouTube help video for this page', 'wpsr' ) . '" class="yt_help_icon" target="_blank"><i class="fa fa-youtube-play"></i></a>';
590
+ }
591
+
592
+ public static function action_links( $links ){
593
+ array_unshift( $links, '<a href="' . self::admin_sb_link( 'paypal' ) . '" target="_blank">Donate</a>' );
594
+ array_unshift( $links, '<a href="'. esc_url( admin_url( 'admin.php?page=wp_socializer&tab=help') ) .'">Help</a>' );
595
+ array_unshift( $links, '<a href="'. esc_url( admin_url( 'admin.php?page=wp_socializer') ) .'">⚙️ Settings</a>' );
596
+ return $links;
597
+ }
598
+
599
+ public static function admin_notices(){
600
+
601
+ $pages_display = array( 'plugins', 'update-core', 'dashboard' );
602
+
603
+ if( in_array( get_current_screen()->id, $pages_display ) ){
604
+ if( version_compare( WPSR_VERSION, get_option( 'wpsr_version' ), '>' ) ){
605
+ echo '<div class="notice notice-success is-dismissible">
606
+ <p>' . sprintf( __( '<b>WP Socializer</b> is updated to latest version. Please visit the %ssettings%s page to see all the new features and the change log.', 'wpsr' ), '⚙️ <a href="' . esc_url( admin_url( 'admin.php?page=wp_socializer') ) . '">', '</a>' ) . '</p>
607
+ </div>';
608
+ }
609
+ }
610
+ }
611
+
612
+ public static function welcome_popup(){
613
+ echo '<div class="welcome_wrap style_ele">
614
+ <div class="wc_inner"></div>
615
+ <div class="wc_footer">
616
+ <button class="button button-primary close_changelog_btn">🏁 ' . __( 'Start using WP Socializer', 'wpsr' ) . '</button>
617
+ <a href="' . self::admin_sb_link( 'a2a' ) . '" target="_blank" class="button pull-right">😀 Share the news !</a>
618
+ </div></div>';
619
+ }
620
+
621
+ public static function donate_button(){
622
+ echo '<div class="td_btn_wrap"><a href="#">❤️ Donate &amp; Support this plugin <i class="fa fa-caret-down"></i></a>
623
+ <ul>
624
+ <li class="donate_text"><div>Thank you for using WP Socializer. Your donation will motivate and make me happy for all the efforts ! You can donate via PayPal.</div></li>
625
+ <li><a href="' . self::admin_sb_link( 'paypal' ) . '/5" target="_blank"><span>🙂</span> $5</a></li>
626
+ <li><a href="' . self::admin_sb_link( 'paypal' ) . '/7" target="_blank"><span>😉</span> $7</a></li>
627
+ <li><a href="' . self::admin_sb_link( 'paypal' ) . '/10" target="_blank"><span>😊</span> $10</a></li>
628
+ <li><a href="' . self::admin_sb_link( 'paypal' ) . '/12" target="_blank"><span>😀</span> $12</a></li>
629
+ <li><a href="' . self::admin_sb_link( 'paypal' ) . '/15" target="_blank"><span>👍</span> $15</a></li>
630
+ <li><a href="' . self::admin_sb_link( 'paypal' ) . '/17" target="_blank"><span>😲</span> $17</a></li>
631
+ <li><a href="' . self::admin_sb_link( 'paypal' ) . '/20" target="_blank"><span>🥂</span> $20</a></li>
632
+ <li><a href="' . self::admin_sb_link( 'paypal' ) . '/" target="_blank"><span>🤗</span> $xx</a></li>
633
+ </ul>
634
+ </div>';
635
+ }
636
+
637
+ public static function admin_sharebar(){
638
+ echo '<ul class="share_wpsr">
639
+ <li><a href="' . self::admin_sb_link( 'facebook' ) . '" title="Share WP Socializer on Facebook" target="_blank"><i class="fa fa-facebook"></i></a></li>
640
+ <li><a href="' . self::admin_sb_link( 'twitter' ) . '" title="Tweet about WP Socializer" target="_blank"><i class="fa fa-twitter"></i></a></li>
641
+ <li><a href="' . self::admin_sb_link( 'google_plus' ) . '" title="Share WP Socializer on Google Plus" target="_blank"><i class="fa fa-google-plus"></i></a></li>
642
+ <li><a href="' . self::admin_sb_link( 'linkedin' ) . '" title="Share WP Socializer on LinkedIn" target="_blank"><i class="fa fa-linkedin"></i></a></li>
643
+ <li><a href="' . self::admin_sb_link( 'paypal' ) . '" title="Donate" target="_blank" class="no_pp"><i class="fa fa-paypal"></i></a></li>
644
+ <li><a href="' . self::admin_sb_link( 'post_wp' ) . '" title="Share WP Socializer on your website" target="_blank"><i class="fa fa-bullhorn"></i></a></li>
645
+ <li><a href="' . self::admin_sb_link( 'a2a' ) . '" title="Share WP Socializer on other sites" target="_blank"><i class="fa fa-share-alt"></i></a></li>
646
+ </ul>';
647
+ }
648
+
649
+ public static function admin_footer(){
650
+ echo '<div class="page_footer">
651
+
652
+ <div class="fright">
653
+ <p><a href="admin.php?page=wp_socializer&tab=help">' . __( 'Help', 'wpsr' ) . '</a> | <a href="https://www.aakashweb.com/wordpress-plugins/wp-socializer/" target="_blank">' . __( 'Feedback', 'wpsr' ) . '</a> | <a href="https://paypal.me/vaakash" target="_blank">' . __( 'Donate', 'wpsr' ) . '</a></p>
654
+ <p><a href="https://www.aakashweb.com/forum/viewforum.php?f=22" target="_blank">' . __( 'Support Forum', 'wpsr' ) . '</a> | <a href="https://www.youtube.com/playlist?list=PLNwJ5cB8SX4yzB3XdvvC5SsCJsAZh5SF6" target="_blank">Help videos</a> | <a href="https://www.aakashweb.com/forum/viewforum.php?f=22" target="_blank">Submit translation</a></p>
655
+ <p>⭐ Please <a href="https://wordpress.org/support/plugin/wp-socializer/reviews/" target="_blank">rate 5 stars</a> in WordPress.org if you like WP Socializer</p>
656
+ </div>
657
+
658
+ <p>' . __( 'Thank you for using WP Socializer plugin', 'wpsr' ) . ' 👍</p>
659
+ <p>Created by Aakash Chakravarthy - Follow me on <a href="https://twitter.com/vaakash", target="_blank">Twitter</a>, <a href="https://fb.com/aakashweb" target="_blank">Facebook</a>, <a href="https://www.linkedin.com/in/vaakash/" target="_blank">LinkedIn</a>. Check out <a href="https://www.aakashweb.com/tag/work/" target="_blank">my other works</a>.</p>
660
+ <p><img src="' . WPSR_ADMIN_URL . '/images/icons/aakash-web.png" /><a href="https://www.aakashweb.com" target="_blank">www.aakashweb.com</a></p>
661
+ </div>';
662
+ }
663
+
664
+ public static function admin_sb_link( $id ){
665
+
666
+ $url = urlencode( 'https://www.aakashweb.com/wordpress-plugins/wp-socializer/' );
667
+ $surl = urlencode( 'https://goo.gl/BR1Hls' );
668
+
669
+ $title = 'WP Socializer - One of the best social media share plugin for WordPress';
670
+ $tweet = 'Check out WP Socializer - one of the best feature rich ⚡️ social media sharing plugin for %23WordPress';
671
+ $excerpt = 'Check out WP Socializer - WP Socializer is an all in one complete social media plugin to add native social media buttons, icons, floating sharebar, follow us buttons, profile icons, mobile sharebar and selected text share popups easily with complete control and customization';
672
+
673
+ if( $id == 'facebook' ){
674
+ return "https://www.facebook.com/share.php?u=$url";
675
+ }
676
+
677
+ if( $id == 'twitter' ){
678
+ return "https://twitter.com/home?status=$tweet%20-%20$surl%20@vaakash";
679
+ }
680
+
681
+ if( $id == 'google_plus' ){
682
+ return "https://plus.google.com/share?url=$url";
683
+ }
684
+
685
+ if( $id == 'linkedin' ){
686
+ return "https://www.linkedin.com/shareArticle?mini=true&url=$url&title=$title&summary=$excerpt";
687
+ }
688
+
689
+ if( $id == 'paypal' ){
690
+ return "https://paypal.me/vaakash";
691
+ }
692
+
693
+ if( $id == 'post_wp' ){
694
+ return "press-this.php?u=$url&t=$title&s=$excerpt";
695
+ }
696
+
697
+ if( $id == 'a2a' ){
698
+ return "https://www.addtoany.com/share?url=$url&title=$title";
699
+ }
700
+
701
+ }
702
+
703
+ }
704
+
705
+ WPSR_Admin::init();
706
+
707
+ ?>
admin/buttons.php ADDED
@@ -0,0 +1,133 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Buttons selection page
4
+ *
5
+ **/
6
+
7
+ class wpsr_admin_buttons{
8
+
9
+ function __construct(){
10
+
11
+ WPSR_Admin::add_tab( 'buttons', array(
12
+ 'name' => 'Share buttons',
13
+ 'banner' => WPSR_ADMIN_URL . '/images/banners/share-buttons.png',
14
+ 'page_callback' => array( $this, 'page' ),
15
+ 'form' => array(
16
+ 'id' => 'button_settings',
17
+ 'name' => 'button_settings',
18
+ 'callback' => array( $this, 'form_fields' ),
19
+ 'validation' => array( $this, 'validation' ),
20
+ )
21
+ ));
22
+
23
+ }
24
+
25
+ function section_addons_list(){
26
+
27
+ $feature = array(
28
+ 'name' => 'buttons',
29
+ 'hide_services' => array()
30
+ );
31
+
32
+ WPSR_Admin::youtube_help_icon( 'https://www.youtube.com/watch?v=As7_mg_0Gms' );
33
+
34
+ WPSR_Admin::box_wrap( 'open', __( 'Create buttons', 'wpsr' ), __( 'Select a service from the list to create a new button', 'wpsr' ), '1' );
35
+ WPSR_Admin::buttons_selector( $feature );
36
+
37
+ echo '<p>' . __( 'List of buttons created.', 'wpsr' ) . '</p>';
38
+ $buttons = WPSR_Buttons::list_all();
39
+ WPSR_Admin::buttons_list( 'all_buttons', $feature );
40
+
41
+ WPSR_Admin::box_wrap( 'close' );
42
+
43
+ }
44
+
45
+ function section_templates( $values, $i ){
46
+
47
+ if( !isset( $values[ 'tmpl' ][ $i ] ) ){
48
+ $values[ 'tmpl' ][ $i ] = WPSR_Lists::defaults( 'buttons' );
49
+ }else{
50
+ $values[ 'tmpl' ][ $i ] = wp_parse_args( $values[ 'tmpl' ][ $i ], WPSR_Lists::defaults( 'buttons' ) );
51
+ }
52
+
53
+ echo '<div class="template_wrap" data-id="' . $i . '">';
54
+
55
+ WPSR_Admin::box_wrap( 'open', __( 'Drag &amp; drop buttons into template', 'wpsr' ), __( 'Drag the buttons from the above list and drop it into the template below. Click "+" to add a new row. Click and drag row to rearrange its order.', 'wpsr' ), '2' );
56
+ WPSR_Admin::buttons_veditor( "tmpl[$i][content]", $values['tmpl'][$i]['content'], true, 'wpsr_preview_template_buttons' );
57
+ WPSR_Admin::box_wrap( 'close' );
58
+
59
+ // Location rules
60
+ WPSR_Admin::box_wrap( 'open', __( 'Conditions to display the template', 'wpsr' ), __( 'Choose the below options to select the pages which will display the template.', 'wpsr' ), '3' );
61
+ WPSR_Location_Rules::display_rules( "tmpl[$i][loc_rules]", $values['tmpl'][$i]['loc_rules'] );
62
+ WPSR_Admin::box_wrap( 'close' );
63
+
64
+ $positions = array(
65
+ 'above_posts' => __( 'Above posts', 'wpsr' ),
66
+ 'below_posts' => __( 'Below posts', 'wpsr' ),
67
+ 'above_below_posts' => __( 'Both above and below posts', 'wpsr' )
68
+ );
69
+
70
+ // Position rules
71
+ WPSR_Admin::box_wrap( 'open', __( 'Position of template in the page', 'wpsr' ), __( 'Choose the below options to select the position the template in a page.', 'wpsr' ), '4' );
72
+
73
+ echo WPSR_Admin::field( 'radio', array(
74
+ 'name' => 'tmpl[' . $i . '][position]',
75
+ 'list' => $positions,
76
+ 'value' => $values[ 'tmpl' ][ $i ][ 'position' ],
77
+ 'default' => 'above_below_post',
78
+ ));
79
+
80
+ echo '<hr/><p>' . __( 'Select whether to show this template in excerpts', 'wpsr' ) . '</p>';
81
+
82
+ echo WPSR_Admin::field( 'radio', array(
83
+ 'name' => 'tmpl[' . $i . '][in_excerpt]',
84
+ 'list' => array( 'show' => __( 'Show in excerpt', 'wpsr' ), 'hide' => __( 'Hide in excerpt', 'wpsr' ) ),
85
+ 'value' => $values[ 'tmpl' ][ $i ][ 'in_excerpt' ],
86
+ 'default' => 'hide',
87
+ ));
88
+
89
+ WPSR_Admin::box_wrap( 'close' );
90
+
91
+ echo '</div>'; // template_wrap
92
+
93
+ }
94
+
95
+ function form_fields( $values ){
96
+
97
+ $values = wp_parse_args( $values, array(
98
+ 'tmpl' => array()
99
+ ));
100
+
101
+ $this->section_addons_list();
102
+
103
+ $template_count = 3;
104
+
105
+ echo '<ul class="template_tab clearfix">';
106
+ for( $i = 1; $i <= $template_count; $i++ ){
107
+ echo '<li>Template ' . $i . '</li>';
108
+ }
109
+ echo '</ul>';
110
+
111
+ for( $i=1; $i<=$template_count; $i++ ){
112
+ $this->section_templates( $values, $i );
113
+ }
114
+
115
+ }
116
+
117
+
118
+ function page(){
119
+
120
+ // Add settings form
121
+ WPSR_Admin::settings_form( 'buttons' );
122
+
123
+ }
124
+
125
+ function validation( $input ){
126
+ return $input;
127
+ }
128
+
129
+ }
130
+
131
+ new wpsr_admin_buttons();
132
+
133
+ ?>
admin/css/ipopup.css ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #wpsr_ipopup_wrap {
2
+ position: fixed;
3
+ z-index: 99999;
4
+ top: 0;
5
+ left: 0;
6
+ right: 0;
7
+ bottom: 0;
8
+ background: rgba(0, 0, 0, 0.5);
9
+ }
10
+ #wpsr_ipopup_wrap section{
11
+ position: absolute;
12
+ transform: translate(-50%,-50%);
13
+ top: 50%;
14
+ left: 50%;
15
+ width: 800px;
16
+ height: 400px;
17
+ box-shadow: 0 2px 9px -1px #000;
18
+ background: #fff;
19
+ }
20
+ #wpsr_ipopup_wrap section iframe{
21
+ width: 100%;
22
+ height: 100%;
23
+ }
24
+ .wpsr_ipopup_close {
25
+ position: absolute;
26
+ top: -30px;
27
+ right: 0;
28
+ background: #fff;
29
+ border-radius: 50%;
30
+ width: 20px;
31
+ height: 20px;
32
+ text-align: center;
33
+ color: #000;
34
+ text-decoration: none;
35
+ font-weight: bold;
36
+ box-shadow: 0 2px 9px -1px #000;
37
+ }
admin/css/sharebar_preview.css ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ body{
2
+ margin: 0;
3
+ background: rgba(243, 243, 243, 0.90);
4
+ color: #444;
5
+ font-family: "Open Sans",sans-serif;
6
+ font-size: 13px;
7
+ }
8
+ #main_content{
9
+ border: 1px solid #ccc;
10
+ margin: 30px auto;
11
+ height: 2000px;
12
+ width: 800px;
13
+ background: #fff;
14
+ }
15
+ .adjust_bar {
16
+ position: fixed;
17
+ top: 50%;
18
+ left: 50%;
19
+ transform: translate(-50%, -50%);
20
+ margin: 0;
21
+ border: 1px solid #e5e5e5;
22
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
23
+ background: #fff;
24
+ padding: 0 15px 15px 15px;
25
+ z-index: 9999;
26
+ }
27
+ .adjust_bar h3 {
28
+ margin: 0 -15px 15px -15px;
29
+ border-bottom: 1px solid #e5e5e5;
30
+ padding: 10px 15px;
31
+ background: #F3F3F3;
32
+ font-size: 14px;
33
+ }
34
+ .adj_footer {
35
+ margin: 15px -15px -15px -15px;
36
+ padding: 15px;
37
+ border-top: 1px solid #e5e5e5;
38
+ background: #FFFDF0;
39
+ }
40
+ .offset_drag{
41
+ width: 100%;
42
+ }
43
+ .offset_val {
44
+ padding: 5px 0;
45
+ margin: 0;
46
+ border: 0;
47
+ width: 100%;
48
+ text-align: center;
49
+ }
admin/css/style.css ADDED
@@ -0,0 +1,1239 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #content {
2
+ width: 75%;
3
+ margin: 15px auto;
4
+ }
5
+ #head_wrap{
6
+ width: 75%;
7
+ margin: 0 auto;
8
+ position: relative;
9
+ }
10
+ h1.wpsr_title{
11
+ background: url( '../images/icons/wp-socializer.png' ) no-repeat left;
12
+ background-size: 32px 32px;
13
+ padding-left: 40px;
14
+ padding-bottom: 9px;
15
+ }
16
+ h1.wpsr_title .title-count{
17
+ font-size: 10px;
18
+ padding: 2px 8px;
19
+ opacity: 0.7;
20
+ }
21
+ .postbox h3 {
22
+ font-size: 14px;
23
+ padding: 8px 12px;
24
+ margin: 0;
25
+ line-height: 1.4;
26
+ cursor: pointer !important;
27
+ }
28
+ .postbox h3:after{
29
+ content: '-';
30
+ display: inline-block;
31
+ position: absolute;
32
+ right: 15px;
33
+ top: 8px;
34
+ }
35
+ .postbox h3.pbclosed:after{
36
+ content: '+';
37
+ }
38
+ .postbox hr{
39
+ margin: 15px 0;
40
+ border-bottom: none;
41
+ border-top-color: #eee;
42
+ }
43
+
44
+ .btns_colleft{
45
+ float: left;
46
+ width: 40%;
47
+ }
48
+ .btns_colright{
49
+ float: right;
50
+ width: 55%;
51
+ }
52
+
53
+ .nav-tab{
54
+ position: relative;
55
+ }
56
+ .nav-tab .page_tip {
57
+ position: absolute;
58
+ top: 100%;
59
+ left: 0;
60
+ z-index: 9999;
61
+ background: #333;
62
+ display: none;
63
+ padding: 5px;
64
+ line-height: 1;
65
+ box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.6);
66
+ }
67
+ .nav-tab:hover .page_tip {
68
+ display: block;
69
+ }
70
+ .nav-tab .page_tip:after {
71
+ display: block;
72
+ content: ' ';
73
+ border: 7px solid #000;
74
+ position: absolute;
75
+ top: -13px;
76
+ border-color: transparent transparent #3d3d3d transparent;
77
+ }
78
+
79
+ .sbox_wrap{
80
+ position: relative;
81
+ display: table;
82
+ border-radius: 5px;
83
+ border: 1px solid #ccc;
84
+ margin: 0 0 15px 0;
85
+ width: 100%;
86
+ background: #fff;
87
+ -webkit-user-select: none;
88
+ -moz-user-select: none;
89
+ user-select: none;
90
+ }
91
+ .sbox_inner {
92
+ display: table-cell;
93
+ padding: 0.75em;
94
+ position: relative;
95
+ font-size: 18px;
96
+ background: #fff;
97
+ width: 100%;
98
+ line-height: 1em;
99
+ border-radius: 5px 0 0 5px;
100
+ box-shadow: inset 0 1px 2px rgba(0,0,0,.07);
101
+ cursor: pointer;
102
+ }
103
+ .sbox_inner:hover{
104
+ background-color: lightyellow;
105
+ }
106
+ .sbox_inner.sbox_open ul{
107
+ display: block !important;
108
+ }
109
+ .sbox_inner.sbox_open{
110
+ border-radius: 5px 5px 0 0;
111
+ }
112
+ .sbox_inner:after{
113
+ content: '\25bc';
114
+ position: absolute;
115
+ right: 1em;
116
+ top: 50%;
117
+ margin-top: -0.6em;
118
+ color: #999;
119
+ font-size: 0.75em;
120
+ }
121
+ .sbox_inner ul {
122
+ display: none;
123
+ position: absolute;
124
+ background: #fff;
125
+ top: 1.4em;
126
+ left: -1px;
127
+ right: 0;
128
+ border: 1px solid #ccc;
129
+ z-index: 999;
130
+ max-height: 300px;
131
+ overflow: auto;
132
+ box-shadow: 0 4px 10px -2px rgba(0, 0, 0, 0.18);
133
+ border-radius: 0 0 5px 5px;
134
+ }
135
+ .sbox_inner ul li {
136
+ border: 1px solid #ccc;
137
+ position: relative;
138
+ padding: 0.75em;
139
+ margin: 0;
140
+ cursor: pointer;
141
+ float: left;
142
+ border-width: 0 1px 1px 0;
143
+ }
144
+ .sbox_inner ul li:hover{
145
+ background-color: #f7f7f7;
146
+ }
147
+ .sbox_inner ul li:last-child{
148
+ border-bottom: none;
149
+ }
150
+ .sbox_action, .sbox_action:active{
151
+ display: table-cell !important;
152
+ vertical-align: middle !important;
153
+ border: none !important;
154
+ border-radius: 0 5px 5px 0 !important;
155
+ }
156
+ .sbox_loading .sbox_inner{
157
+ opacity: 0;
158
+ }
159
+ .sbox_loading:before{
160
+ content: '';
161
+ width: 16px;
162
+ height: 16px;
163
+ position: absolute;
164
+ background: url('../images/icons/loading.gif') no-repeat;
165
+ top: 1em;
166
+ left: 1em;
167
+ }
168
+
169
+
170
+ .btn_selector img{
171
+ position: absolute;
172
+ top: 50%;
173
+ margin-top: -8px;
174
+ }
175
+ .btn_selector .btn_liname{
176
+ margin-left: 30px;
177
+ }
178
+ .btn_selector em{
179
+ font-size: 0.65em;
180
+ font-style: italic;
181
+ color: #999;
182
+ display: none;
183
+ }
184
+ .btns_created:empty{
185
+ border: 1px dashed #dfdfdf;
186
+ min-height: 50px;
187
+ }
188
+ .btns_created:empty:after{
189
+ content: attr(data-empty);
190
+ display: block;
191
+ text-align: center;
192
+ margin: 15px 0 0 0;
193
+ }
194
+
195
+ .ui_btn{
196
+ display: table;
197
+ background: #333;
198
+ color: #fff;
199
+ margin: 7.5px 15px 7.5px 0;
200
+ box-sizing: border-box;
201
+ position: relative;
202
+ float: left;
203
+ line-height: 32px;
204
+ height: 36px;
205
+ box-shadow: 0 2px 2px rgba(0, 0, 0, 0.18);
206
+ border-radius: 3px;
207
+ cursor: move;
208
+ width: auto !important;
209
+ -webkit-user-select: none;
210
+ -moz-user-select: none;
211
+ user-select: none;
212
+ }
213
+ .ui_btn > span {
214
+ display: table-cell;
215
+ line-height: 1em;
216
+ vertical-align: middle;
217
+ padding: 0 7px;
218
+ }
219
+ .ui_btn_selected{
220
+ background: #333 !important;
221
+ color: #fff !important;
222
+ }
223
+ .ui_btn.ui-draggable{
224
+ cursor: move;
225
+ }
226
+ .ui-state-placeholder{
227
+ border: 1px dashed #ccc;
228
+ height: 34px;
229
+ margin: 7.5px 15px 7.5px 0;
230
+ border-radius: 3px;
231
+ }
232
+ .ui-btn.ui-sortable-helper{
233
+ transition: all 2s;
234
+ box-shadow: 0 4px 4px rgba(0, 0, 0, 0.18);
235
+ }
236
+ .ui-sortable-helper, .ui-draggable-dragging{
237
+ z-index: 9999 !important;
238
+ }
239
+
240
+ .btn_action{
241
+ cursor: pointer;
242
+ width: 16px;
243
+ opacity: 0.5;
244
+ }
245
+ .btn_action:hover{
246
+ opacity: 1;
247
+ }
248
+ .btn_action:active{
249
+ opacity: 0.4;
250
+ }
251
+ .btn_icon, .btn_action{
252
+ width: 16px;
253
+ height: 16px;
254
+ margin: 0 10px;
255
+ }
256
+ .btn_name:after {
257
+ content: attr(data-title);
258
+ display: block;
259
+ font-size: 9px;
260
+ opacity: 0.6;
261
+ max-width: 110px;
262
+ overflow: hidden;
263
+ white-space: nowrap;
264
+ text-overflow: ellipsis;
265
+ }
266
+
267
+ .ui_btn .dashicons{
268
+ width: 16px;
269
+ height: 16px;
270
+ font-size: 16px;
271
+ }
272
+
273
+ .tooltip_settings_dd{
274
+ position: absolute;
275
+ }
276
+
277
+ .tooltip_settings {
278
+ position: absolute;
279
+ background: #fff;
280
+ padding: 15px;
281
+ width: 300px;
282
+ left: 0;
283
+ top: 34px;
284
+ border-radius: 0 0 3px 3px;
285
+ box-shadow: 0 2px 2px rgba(0, 0, 0, 0.18);
286
+ z-index: 999;
287
+ color: #000;
288
+ font-size: 12px;
289
+ padding-bottom: 40px;
290
+ border: 1px solid #333;
291
+ }
292
+ .tooltip_settings input {
293
+ font-size: 12px;
294
+ box-shadow: none;
295
+ }
296
+ .tooltip_close{
297
+ position: absolute;
298
+ top: 5px;
299
+ right: 5px;
300
+ display: inline-block;
301
+ width: 16px;
302
+ height: 16px;
303
+ cursor: pointer;
304
+ opacity: 0.5;
305
+ }
306
+
307
+ .template_wrap{
308
+ margin: 15px 0 0 0;
309
+ }
310
+
311
+ .vedit_wrap{
312
+ margin: 0;
313
+ }
314
+
315
+ .toolbar_wrap{
316
+ background: #F5F5F5;
317
+ border: 1px solid #DEDEDE;
318
+ margin: 0 0 -1px 0;
319
+ padding: 10px 10px 0 10px;
320
+ }
321
+ .toolbar_wrap li{
322
+ float: left;
323
+ border-radius: 3px;
324
+ padding: 5px 10px;
325
+ margin: 0 10px 10px 0;
326
+ border: 1px solid #E7E7E7;
327
+ cursor: pointer;
328
+ }
329
+ .toolbar_wrap .dashicons {
330
+ margin: 0px 10px 0px 0px;
331
+ }
332
+
333
+
334
+ .veditor{
335
+ border: 1px dashed #DEDEDE;
336
+ padding: 0;
337
+ background: #fff;
338
+ clear: both;
339
+ -webkit-user-select: none;
340
+ -moz-user-select: none;
341
+ user-select: none;
342
+ }
343
+ .veditor ul {
344
+ border-bottom: 1px dashed #DEDEDE;
345
+ padding: 7.5px 15px 7.5px 15px;
346
+ margin: 0;
347
+ min-height: 55px;
348
+ cursor: ns-resize;
349
+ }
350
+ .veditor ul:after{
351
+ content: '';
352
+ display: block;
353
+ clear: both;
354
+ }
355
+ .veditor ul li{
356
+ float: left;
357
+ }
358
+ .veditor ul:last-child{
359
+ border-bottom: none;
360
+ }
361
+ .veditor ul:empty:before {
362
+ content: "+";
363
+ font-size: 50px;
364
+ opacity: 0.2;
365
+ position: absolute;
366
+ left: 50%;
367
+ top: 25px;
368
+ }
369
+ .veditor > *{
370
+ position: relative;
371
+ }
372
+ .veditor > *:hover:after{
373
+ right: 0;
374
+ top: 0;
375
+ bottom: 0;
376
+ border: 2px dotted solid;
377
+ content: '';
378
+ display: block;
379
+ }
380
+ .vedit_menu{
381
+ position: absolute;
382
+ top: -1px;
383
+ right: -1px;
384
+ display: none;
385
+ }
386
+ .vedit_menu a {
387
+ padding: 5px;
388
+ background: #dedede;
389
+ color: #FFF;
390
+ display: inline-block;
391
+ cursor: pointer;
392
+ }
393
+ .vedit_menu a:hover{
394
+ background: #000;
395
+ }
396
+
397
+ .veditor_preview{
398
+ margin: 15px 0 0 0;
399
+ }
400
+ .vedit_preview_iframe{
401
+ display: none;
402
+ background: #fff;
403
+ border: 1px dashed #dedede;
404
+ margin: 15px 0 0 0;
405
+ resize: both;
406
+ }
407
+
408
+ .loc_rule_wrap{
409
+ margin: 10px 0;
410
+ position: relative;
411
+ background: url('../images/icons/down-right.png') no-repeat 5px;
412
+ padding-left: 30px;
413
+ }
414
+ .loc_rule_wrap select, .loc_rule_wrap input{
415
+ margin: 0 20px 0 0;
416
+ vertical-align: middle;
417
+ font-size: 13px;
418
+ box-shadow: none;
419
+ padding: 0 3px;
420
+ line-height: 2;
421
+ }
422
+ .loc_rule_wrap .loc_rule_remove{
423
+ position: absolute;
424
+ right:0;
425
+ top: 0;
426
+ display: none;
427
+ }
428
+
429
+ .loc_rule_wrap:hover .loc_rule_remove{
430
+ display:inline-block;
431
+ }
432
+ .loc_rule_wrap .loc_rule_add{
433
+ visibility: hidden;
434
+ }
435
+ .loc_rule_wrap:last-child .loc_rule_add{
436
+ visibility: visible;
437
+ }
438
+ .loc_rule_wrap:first-child {
439
+ margin-top: -25px;
440
+ padding-left: 10px;
441
+ }
442
+
443
+ .loc_rule_wrap:last-child:after{
444
+ display: none;
445
+ }
446
+ .loc_rule_info{
447
+ font-weight: bold;
448
+ margin: 0 0 20px 0 !important;
449
+ }
450
+
451
+ .loc_group_wrap{
452
+ margin: 0 0 15px 0;
453
+ padding: 10px 0 15px 30px;
454
+ border-top:1px solid #f1f1f1;
455
+ position: relative;
456
+ }
457
+ .loc_group_wrap:before {
458
+ content: counter( group-counter );
459
+ counter-increment: group-counter;
460
+ display: inline-block;
461
+ position: absolute;
462
+ top: -14px;
463
+ background: #fff;
464
+ padding: 0 10px;
465
+ left: -5px;
466
+ border: 1px solid #f1f1f1;
467
+ border-radius: 50%;
468
+ height: 28px;
469
+ text-align: center;
470
+ line-height: 28px;
471
+ }
472
+ .loc_group_wrap:last-child{
473
+ margin: 0;
474
+ }
475
+ .loc_rules_inner {
476
+ margin: 30px 0 0 0;
477
+ counter-reset: group-counter;
478
+ }
479
+ .loc_rules_box{
480
+ padding: 15px 15px 0 15px;
481
+ }
482
+
483
+ .wpsr_tooltip_wrap{
484
+ background: #fff;
485
+ border: 1px solid #ccc;
486
+ padding: 15px;
487
+ box-shadow: 0 4px 10px -2px rgba(0, 0, 0, 0.18);
488
+ border-radius: 0 0 3px 3px;
489
+ min-width: 300px;
490
+ min-height: 200px;
491
+ max-height: 450px;
492
+ z-index: 9999;
493
+ }
494
+ .wpsr_tooltip_wrap.loading:after{
495
+ content: '';
496
+ display: block;
497
+ position: absolute;
498
+ top: 30px;
499
+ left: 0;
500
+ right: 0;
501
+ bottom: 0;
502
+ background: url('../images/icons/loading.gif') no-repeat center center rgba(255, 255, 255, 0.8);
503
+ }
504
+ .wpsr_tooltip_wrap .btn_settings_footer{
505
+ position: absolute;
506
+ bottom: 15px;
507
+ right: 15px;
508
+ left: 15px;
509
+ text-align: right;
510
+ }
511
+ .wpsr_tooltip_cnt{
512
+ position: absolute;
513
+ top: 15px;
514
+ bottom: 15px;
515
+ left: 15px;
516
+ right: 15px;
517
+ overflow: auto;
518
+ }
519
+ .wpsr_tooltip_popup{
520
+ outline: 1000px solid rgba(0, 0, 0, 0.5 );
521
+ box-shadow: 0 0 30px -10px #000;
522
+ position: fixed !important;
523
+ top: 31px !important;
524
+ left: 20% !important;
525
+ right: 20% !important;
526
+ bottom: 0 !important;
527
+ max-height: none;
528
+ border-radius: 0;
529
+ }
530
+ .wpsr_tooltip_popup:before{
531
+ content: attr( data-name );
532
+ font-weight: bold;
533
+ display: block;
534
+ border-bottom: 1px solid rgb(241, 241, 241);
535
+ padding: 0px 0px 15px;
536
+ }
537
+ .wpsr_tooltip_popup .wpsr_tooltip_cnt{
538
+ top: 65px;
539
+ }
540
+ .wpsr_tooltip_cnt .tt_name{
541
+ border: 0;
542
+ width: 100%;
543
+ padding: 0 0 10px 0;
544
+ border-bottom: 1px solid #f1f1f1;
545
+ box-shadow: none;
546
+ margin: 0;
547
+ }
548
+ .wpsr_tooltip_cnt > form{
549
+ padding: 0 10px 10px 0;
550
+ }
551
+ .wpsr_tooltip_cnt .form-table{
552
+ margin-top: 0;
553
+ }
554
+ .wpsr_tooltip_cnt .sec_title_wrap{
555
+ border: 1px solid #E2E2E2;
556
+ background: #FDFDFD;
557
+ margin: 15px 0;
558
+ padding: 10px;
559
+ }
560
+ .wpsr_tooltip_cnt .sec_title_wrap > *{
561
+ margin: 0;
562
+ }
563
+ .wpsr_tooltip_cnt .form-table th, .wpsr_tooltip_cnt .form-table p,
564
+ .wpsr_tooltip_cnt .form-table input, .wpsr_tooltip_cnt label {
565
+ font-size: 13px !important;
566
+ font-weight: normal;
567
+ }
568
+ .wpsr_tooltip_cnt.tt_has_footer{
569
+ bottom: 55px;
570
+ border-bottom: 1px solid #dfdfdf;
571
+ }
572
+ .wpsr_tooltip_close{
573
+ position: absolute;
574
+ top: 0;
575
+ right: 0;
576
+ cursor: pointer;
577
+ }
578
+ .wpsr_tooltip_close:hover{
579
+ opacity: 0.4;
580
+ }
581
+ .wpsr_tooltip_popup .wpsr_tooltip_close {
582
+ top: 10px;
583
+ right: 10px;
584
+ padding: 5px;
585
+ }
586
+ .btn_settings_status {
587
+ background: #4CAF50;
588
+ position: absolute;
589
+ bottom: 0;
590
+ left: 0;
591
+ display: none;
592
+ color: #fff;
593
+ padding: 0.3em 0.5em;
594
+ border-radius: 5px;
595
+ }
596
+ .btn_shortcode{
597
+ background: url('../images/icons/shortcode.png') no-repeat 7px;
598
+ padding-left: 28px;
599
+ position: absolute;
600
+ bottom: 0;
601
+ left: 0;
602
+ opacity: 0.3;
603
+ }
604
+ .btn_shortcode:disabled{
605
+ color: #333;
606
+ }
607
+ .btn_shortcode:hover{
608
+ opacity: 1;
609
+ transition: all 1s;
610
+ cursor: text;
611
+ }
612
+
613
+ .main_form {
614
+ position: relative;
615
+ }
616
+ .main_form_footer{
617
+ position: fixed;
618
+ left: 88%;
619
+ bottom: 0;
620
+ padding: 15px;
621
+ min-width: auto !important;
622
+ }
623
+
624
+ .mini_section{
625
+ background: #F9F9F9;
626
+ padding: 0 15px 15px 15px;
627
+ margin: 0 0 15px 0;
628
+ display: none;
629
+ border: 1px solid #ccc;
630
+ }
631
+ .mini_section h4{
632
+ margin: 0 0 15px 0;
633
+ border-bottom: 1px solid #dfdfdf;
634
+ padding: 0 0 15px 0;
635
+ }
636
+ .mini_btn_list{
637
+ margin-bottom: 0;
638
+ }
639
+ .mini_btn_list li{
640
+ float: left;
641
+ margin: 0 10px 10px 0;
642
+ border-radius: 3px;
643
+ padding-right: 8px;
644
+ background-color: #088049;
645
+ color: #fff;
646
+ cursor: move;
647
+ }
648
+ .mini_btn_list li > *{
649
+ display: table-cell;
650
+ padding: 8px 0 8px 8px;
651
+ }
652
+ .mini_btn_list li > *:last-child{
653
+ padding-right: 0;
654
+ }
655
+ .mini_btn_list.list_selected{
656
+ margin: 0;
657
+ border: 1px dashed #ccc;
658
+ padding: 15px 15px 5px 15px;
659
+ }
660
+ .mini_section_select{
661
+ width: 100%;
662
+ text-align: left;
663
+ background: #F5F5F5;
664
+ border: 1px solid #ccc;
665
+ padding: 10px;
666
+ margin: 0 0 15px 0;
667
+ cursor: pointer;
668
+ }
669
+ .mini_section_select:hover{
670
+ opacity: 0.6;
671
+ }
672
+ .mini_filters input, .mini_filters select{
673
+ margin: 0 10px 0 0;
674
+ font-size: 13px;
675
+ width: 180px;
676
+ height: 30px;
677
+ line-height: 30px;
678
+ vertical-align: bottom;
679
+ }
680
+
681
+ .list_available .item_action{
682
+ display: none;
683
+ }
684
+ .list_selected .item_action{
685
+ opacity: 0.7;
686
+ cursor: pointer;
687
+ }
688
+ .list_selected .item_action:hover{
689
+ opacity: 1;
690
+ }
691
+ .list_selected:empty{
692
+ border: 1px dashed #dfdfdf;
693
+ min-height: 50px;
694
+ }
695
+ .list_selected:empty:after{
696
+ content: '+';
697
+ font-size: 40px;
698
+ display: block;
699
+ text-align: center;
700
+ margin: 15px 0 0 0;
701
+ }
702
+ .list_btn_placeholder{
703
+ background: red;
704
+ }
705
+
706
+ .item_popup {
707
+ position: fixed;
708
+ top: 10%;
709
+ bottom: 10%;
710
+ left: 25%;
711
+ right: 25%;
712
+ background: #fff;
713
+ box-shadow: 0 0 20px 0px rgba(0, 0, 0, 0.5);
714
+ padding: 15px;
715
+ overflow: auto;
716
+ display: none;
717
+ z-index: 99;
718
+ }
719
+ .item_popup h4{
720
+ margin: 0;
721
+ border-bottom: 1px solid #dfdfdf;
722
+ padding-bottom: 15px;
723
+ }
724
+ .item_popup_close {
725
+ position: absolute;
726
+ top: 15px;
727
+ right: 15px;
728
+ cursor: pointer;
729
+ padding: 5px;
730
+ }
731
+ .item_popup_save{
732
+ margin-top: 15px !important;
733
+ }
734
+ .item_popup td small {
735
+ display: inline-block;
736
+ margin: 5px 0 0 0;
737
+ color: #7d7d7d;
738
+ }
739
+
740
+ .scr_saction{
741
+ text-align: center;
742
+ border: 1px solid #ccc;
743
+ padding: 20px;
744
+ font-size: 14px;
745
+ cursor: pointer;
746
+ background: #F5F5F5;
747
+ position: relative;
748
+ }
749
+ .scr_saction small{
750
+ border: 1px solid green;
751
+ color: green;
752
+ padding: 5px 10px;
753
+ margin: 10px;
754
+ }
755
+ .scr_saction:hover{
756
+ border-color: #000;
757
+ }
758
+ .scr_btn_close:after {
759
+ position: absolute;
760
+ content: 'Close';
761
+ right: 15px;
762
+ }
763
+ .scr_swrap{
764
+ border: 1px solid #ccc;
765
+ padding: 10px;
766
+ margin-top: -24px;
767
+ background: #fff;
768
+ display: none;
769
+ overflow: auto;
770
+ }
771
+ .scr_templates_wrap{
772
+ height: 500px;
773
+ }
774
+ .scr_tmpl_wrap{
775
+ float: left;
776
+ padding: 15px;
777
+ margin: 0 15px 15px 0;
778
+ position: relative;
779
+ cursor: pointer;
780
+ }
781
+ .scr_tmpl_wrap:after{
782
+ position: absolute;
783
+ top:0;
784
+ left:0;
785
+ right:0;
786
+ bottom:0;
787
+ content: '';
788
+ display: block;
789
+ }
790
+ .scr_tmpl_wrap:hover{
791
+ background: #fffce5;
792
+ }
793
+ .scr_tmpl_wrap small{
794
+ display: block;
795
+ padding: 5px 0;
796
+ }
797
+ .scr_tmpl_wrap:hover:before {
798
+ content: 'Apply template';
799
+ position: absolute;
800
+ right: 15px;
801
+ border: 1px solid #d5d5d5;
802
+ padding: 5px;
803
+ border-radius: 5px;
804
+ background: #fff;
805
+ top: 34%;
806
+ z-index: 99;
807
+ }
808
+
809
+ .ft_table td{
810
+ width: 25%;
811
+ }
812
+ .feature_wrap.ft_disable{
813
+ opacity: 0.5;
814
+ position: relative;
815
+ }
816
+ .feature_wrap.ft_disable:before{
817
+ position: absolute;
818
+ top: 0;
819
+ left: 0;
820
+ right: 0;
821
+ bottom: 0;
822
+ content: '';
823
+ z-index: 1;
824
+ }
825
+ .sharebar_preview_iwrap{
826
+ position: fixed;
827
+ left: 0;
828
+ right: 0;
829
+ top: 0;
830
+ bottom: 0;
831
+ display: none;
832
+ background: rgba(255, 255, 255, 0.90);
833
+ z-index: 999999;
834
+ }
835
+ .sharebar_preview_iwrap > iframe{
836
+ width: 100%;
837
+ height: 100%;
838
+ }
839
+
840
+ #wpsr_pp_editor{
841
+ padding: 0 15px 15px 15px;
842
+ }
843
+
844
+ .fb_selected h4 {
845
+ color: #fff;
846
+ padding: 5px;
847
+ margin: 0;
848
+ cursor: ns-resize;
849
+ }
850
+ .fb_selected label {
851
+ float: left;
852
+ width: 50%;
853
+ box-sizing: border-box;
854
+ }
855
+ .fb_selected label:first-child {
856
+ padding-right: 10px;
857
+ }
858
+ .fb_selected h4 i {
859
+ margin: 0 5px;
860
+ }
861
+ .fb_item_remove {
862
+ float: right;
863
+ color: #fff;
864
+ text-decoration: none;
865
+ }
866
+ .fb_selected li {
867
+ border: 1px solid #ccc;
868
+ background: #fff;
869
+ }
870
+ .fb_selected li > div {
871
+ padding: 10px;
872
+ }
873
+ .fb_selected li > div:after {
874
+ content: ' ';
875
+ display: block;
876
+ clear: both;
877
+ }
878
+ .fb_preview li {
879
+ width: 48px;
880
+ height: 48px;
881
+ color: #fff;
882
+ text-align: center;
883
+ line-height: 48px;
884
+ float: left;
885
+ margin: 0 10px 0 0;
886
+ }
887
+ .fb_preview:after {content: ' ';display: block;clear: both;}
888
+ .fb_preview span {
889
+ text-align: center;
890
+ display: block;
891
+ border: 1px dashed #ccc;
892
+ padding: 24px;
893
+ }
894
+ .fb_list{
895
+ height: auto !important;
896
+ }
897
+
898
+ .ssb_selected_list{
899
+ margin-bottom: 0;
900
+ }
901
+ .ssb_selected_list li {
902
+ float: left;
903
+ width: 48px;
904
+ height: 48px;
905
+ text-align: center;
906
+ line-height: 48px;
907
+ color: #fff;
908
+ margin-right: 15px;
909
+ cursor: move;
910
+ position: relative;
911
+ background: #333;
912
+ }
913
+ .ssb_selected_list li:active{
914
+ box-shadow: 0 2px 4px 0px rgba(0, 0, 0, 0.3);
915
+ }
916
+ .ssb_remove{
917
+ position: absolute;
918
+ top: -10px;
919
+ right: -10px;
920
+ background: #a00;
921
+ width: 20px;
922
+ height: 20px;
923
+ border-radius: 50%;
924
+ line-height: 17px;
925
+ border: 2px solid #fff;
926
+ font-weight: bold;
927
+ display: none;
928
+ cursor: pointer;
929
+ }
930
+ .ssb_selected_list li:hover .ssb_remove{
931
+ display: block;
932
+ }
933
+
934
+ .drop_target{
935
+ border-color: green !important;
936
+ background: #EAFFEA !important;
937
+ }
938
+
939
+ .htip{
940
+ background: #000;
941
+ position: absolute;
942
+ z-index: 9999;
943
+ padding: 5px;
944
+ border-radius: 5px;
945
+ box-shadow: 0 2px 2px rgba(0, 0, 0, 0.2);
946
+ color: #fff;
947
+ max-width: 500px;
948
+ }
949
+ .htip:after {
950
+ content: ' ';
951
+ position: absolute;
952
+ border: 10px solid #000;
953
+ left: 50%;
954
+ bottom: -20px;
955
+ margin-left: -10px;
956
+ border-color: #000 rgba(0, 0, 0, 0) rgba(0, 0, 0, 0) rgba(0, 0, 0, 0);
957
+ z-index:9999;
958
+ }
959
+ .htip img{
960
+ width: 100%;
961
+ margin: 0;
962
+ }
963
+
964
+ .qtip_icon{
965
+ color: #333;
966
+ text-decoration: none;
967
+ margin-left: 10px;
968
+ }
969
+
970
+ .custom_html_editor{
971
+ width: 100%;
972
+ }
973
+
974
+ .template_tab li{
975
+ cursor: pointer;
976
+ float: left;
977
+ border-radius: 2em;
978
+ border: 1px solid #ccc;
979
+ padding: 0.5em 1em;
980
+ margin-right: 1em;
981
+ color: #555;
982
+ font-weight: bold;
983
+ font-size: 14px;
984
+ }
985
+ .template_tab li.templ_tab_active{
986
+ color: #333;
987
+ background: #fff;
988
+ box-shadow: 0 1px 1px rgba(0,0,0,.04);
989
+ }
990
+ .template_tab li:hover{
991
+ background: #e5e5e5;
992
+ }
993
+
994
+ .welcome_wrap{
995
+ background: #fff;
996
+ position: fixed;
997
+ outline: 9999px solid rgba(0, 0, 0, 0.5 );
998
+ top: 10%;
999
+ left: 25%;
1000
+ bottom: 10%;
1001
+ right: 25%;
1002
+ box-shadow: 0 0 8px -1px #000;
1003
+ border: 3px solid orange;
1004
+ display: none;
1005
+ }
1006
+ .wc_inner{
1007
+ position: absolute;
1008
+ top: 0;
1009
+ bottom: 70px;
1010
+ left: 0;
1011
+ right: 0;
1012
+ padding: 15px;
1013
+ overflow: auto;
1014
+ }
1015
+
1016
+ .wc_footer{
1017
+ position: absolute;
1018
+ bottom: 0;
1019
+ padding: 15px;
1020
+ left: 0;
1021
+ right: 0;
1022
+ border-top: 1px solid #dfdfdf;
1023
+ background: #f0f0f0;
1024
+ }
1025
+
1026
+ .help_sec{
1027
+ background: white;
1028
+ padding: 10px 25px 25px 25px;
1029
+ border: 1px solid #dfdfdf;
1030
+ }
1031
+ .help_sec aside{
1032
+ float: right;
1033
+ width: 200px;
1034
+ border: 1px solid #dfdfdf;
1035
+ padding: 0 15px 15px 15px;
1036
+ border-width: 0 0 1px 1px;
1037
+ }
1038
+ .yt-help-videos{
1039
+ padding: 0 !important;
1040
+ }
1041
+ .yt-help-videos li{
1042
+ list-style: none;
1043
+ float: left;
1044
+ width: 25%;
1045
+ height: 190px;
1046
+ padding: 0 20px 0 0;
1047
+ box-sizing: border-box;
1048
+ }
1049
+ .yt-help-videos li img{
1050
+ width: 100%;
1051
+ }
1052
+
1053
+ .style_ele ul{
1054
+ list-style: square;
1055
+ padding-left: 30px;
1056
+ }
1057
+
1058
+ .button .dashicons {
1059
+ margin: 5px 2px 0 0;
1060
+ }
1061
+
1062
+ .collapse_head{
1063
+ border: 1px solid #ccc;
1064
+ padding: 0.7em;
1065
+ background: #F5F5F5;
1066
+ cursor: pointer;
1067
+ }
1068
+ .collapse_head:after{
1069
+ font-family: Dashicons;
1070
+ float: right;
1071
+ content: "\f156";
1072
+ }
1073
+ .collapse_head+.form-table{
1074
+ display: none;
1075
+ }
1076
+
1077
+ .page_footer p {
1078
+ font-size: 12px;
1079
+ font-style: italic;
1080
+ margin: 5px 0;
1081
+ color: #757575;
1082
+ }
1083
+ .page_footer p img{
1084
+ vertical-align: middle;
1085
+ margin-right: 5px;
1086
+ }
1087
+ .page_footer .fright p{
1088
+ text-align: right;
1089
+ }
1090
+
1091
+ .tab-help{
1092
+ float: right;
1093
+ }
1094
+ .tab-help:before {
1095
+ font: normal normal normal 14px/1 FontAwesome;
1096
+ content: "\f059";
1097
+ padding-right: 10px;
1098
+ }
1099
+
1100
+ .veditor > .ui-sortable-helper{
1101
+ box-shadow: 0 4px 4px rgba(0, 0, 0, 0.18);
1102
+ background: #fff;
1103
+ border-bottom: 0px;
1104
+ }
1105
+
1106
+ .step:before {
1107
+ content: attr( data-step );
1108
+ border-radius: 50%;
1109
+ width: 1.2em;
1110
+ height: 1.2em;
1111
+ line-height: 1.2em;
1112
+ display: inline-block;
1113
+ margin: 0 0.5em 0 0;
1114
+ text-align: center;
1115
+ color: #fff;
1116
+ background: #7d7d7d;
1117
+ }
1118
+
1119
+ #head_wrap .td_btn_wrap{
1120
+ position: absolute;
1121
+ right: 0;
1122
+ top: 10px;
1123
+ background: #FF9800;
1124
+ padding: 5px 10px;
1125
+ border-radius: 3px;
1126
+ box-shadow: 0 1px 0px rgba(0, 0, 0, 0.31);
1127
+ }
1128
+ .td_btn_wrap > a {
1129
+ text-decoration: none;
1130
+ color: #fff;
1131
+ }
1132
+ .td_btn_wrap:hover > ul{
1133
+ display: block;
1134
+ }
1135
+ .td_btn_wrap > ul{
1136
+ position: absolute;
1137
+ top: 100%;
1138
+ margin: 0;
1139
+ background: #fff;
1140
+ right: 0;
1141
+ border-radius: 0 0 3px 3px;
1142
+ box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.46);
1143
+ z-index: 999;
1144
+ margin-top: 0;
1145
+ left: 0;
1146
+ display: none;
1147
+ }
1148
+ .td_btn_wrap li {
1149
+ margin: 0;
1150
+ }
1151
+ .td_btn_wrap li a{
1152
+ text-decoration: none;
1153
+ color: #000;
1154
+ background: #fff;
1155
+ padding: 0;
1156
+ margin: 0;
1157
+ padding: 10px 0;
1158
+ float: left;
1159
+ border-bottom: 1px solid #eeeeee;
1160
+ font-size: 18px;
1161
+ text-align: center;
1162
+ width: 50%;
1163
+ }
1164
+ .td_btn_wrap li a:hover{
1165
+ background: lightyellow;
1166
+ }
1167
+ .donate_text{
1168
+ width: 100%;
1169
+ font-size: 10px;
1170
+ border-bottom: 1px solid #eeeeee;
1171
+ }
1172
+ .donate_text > div{
1173
+ padding: 5px 10px;
1174
+ }
1175
+
1176
+
1177
+ .share_wpsr {
1178
+ position: fixed;
1179
+ right: 15px;
1180
+ margin: 0;
1181
+ transform: translateY(-50%);
1182
+ top: 50%;
1183
+ }
1184
+ .share_wpsr a {
1185
+ font-size: 22px;
1186
+ color: #000;
1187
+ opacity: 0.5;
1188
+ }
1189
+ .share_wpsr a:hover{
1190
+ opacity: 1;
1191
+ }
1192
+ .share_wpsr li {
1193
+ margin: 0 0 20px 0;
1194
+ }
1195
+
1196
+ .yt_help_icon{
1197
+ position: absolute;
1198
+ left: -35px;
1199
+ top: 10px;
1200
+ font-size: 22px;
1201
+ color: #e62117;
1202
+ text-decoration: none;
1203
+ }
1204
+
1205
+ .hide_scrollbar{
1206
+ overflow:hidden;
1207
+ }
1208
+ .fright{
1209
+ float: right;
1210
+ }
1211
+ .lbl_margin{
1212
+ margin: 0 10px 0;
1213
+ }
1214
+ .grey{
1215
+ color: #ccc;
1216
+ }
1217
+ .hidden{
1218
+ display: none;
1219
+ }
1220
+ .clearfix{
1221
+ clear: both;
1222
+ }
1223
+ .clearfix:after{
1224
+ content: '';
1225
+ display: block;
1226
+ clear: both;
1227
+ }
1228
+
1229
+ @media screen and (max-width: 950px) {
1230
+ .page_footer .fright{
1231
+ float: none;
1232
+ }
1233
+ .page_footer p {
1234
+ text-align: center !important;
1235
+ }
1236
+ .main_form_footer{
1237
+ position: static;
1238
+ }
1239
+ }
admin/css/style_widgets.css ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .wpsr_widget_wrap{
2
+ padding: 0.3em 1.33em;
3
+ background: #fdfdfd;
4
+ border: 1px solid #e0e0e0;
5
+ margin-bottom: 1.33em;
6
+ border-radius: 3px;
7
+ }
8
+ .wpsr_widget_wrap p:after{
9
+ content: '';
10
+ display: block;
11
+ clear: both;
12
+ }
13
+ .wpsr_widget_wrap label+.widefat{
14
+ margin-top: 10px;
15
+ }
16
+ .wpsr_widget_wrap .wp-picker-container{
17
+ float: right;
18
+ }
19
+ .wpsr_widget_wrap .smallfat{
20
+ float: right;
21
+ }
22
+
23
+ .veditor_preview, .wpsr_wtmpl_wrap .vedit_menu{
24
+ display: none !important;
25
+ }
26
+ .wpsr_wtmpl_wrap .btn_action{
27
+ display: none;
28
+ }
29
+ .veditor .btn_list {
30
+ margin-bottom: 15px;
31
+ }
32
+ .veditor li{
33
+ display: table;
34
+ background: #333;
35
+ color: #fff;
36
+ margin: 0 5px;
37
+ box-sizing: border-box;
38
+ position: relative;
39
+ float: left;
40
+ line-height: 25px;
41
+ height: 25px;
42
+ border-radius: 3px;
43
+ cursor: default;
44
+ width: auto !important;
45
+ -webkit-user-select: none;
46
+ -moz-user-select: none;
47
+ user-select: none;
48
+ font-size: 12px;
49
+ }
50
+ .veditor li span {
51
+ display: table-cell;
52
+ line-height: 1em;
53
+ vertical-align: middle;
54
+ padding: 0 5px;
55
+ }
56
+ .veditor li span img{
57
+ width: 12px;
58
+ }
59
+
60
+ .fb_preview li {
61
+ width: 48px;
62
+ height: 48px;
63
+ color: #fff;
64
+ text-align: center;
65
+ line-height: 48px;
66
+ float: left;
67
+ margin: 0 10px 0 0;
68
+ }
69
+ .fb_preview:after {content: ' ';display: block;clear: both;}
70
+ .fb_preview span {
71
+ text-align: center;
72
+ display: block;
73
+ border: 1px dashed #ccc;
74
+ padding: 24px;
75
+ }
admin/followbar.php ADDED
@@ -0,0 +1,422 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Follow bar admin page helpers
4
+ *
5
+ **/
6
+
7
+ class WPSR_Followbar{
8
+
9
+ public static function init(){
10
+
11
+ add_action( 'wp_ajax_wpsr_followbar_editor', array( __CLASS__, 'popup_editor' ) );
12
+
13
+ }
14
+
15
+ function popup_editor(){
16
+
17
+ global $hook_suffix;
18
+ $hook_suffix = WPSR_Admin::$pagehook;
19
+ set_current_screen( $hook_suffix );
20
+
21
+ iframe_header( 'WP Socializer follow bar editor' );
22
+
23
+ if( !isset( $_GET[ 'template' ] ) || !isset( $_GET[ 'cnt_id' ] ) || !isset( $_GET[ 'prev_id' ] ) ){
24
+ echo '<p align="center">Incomplete info to load editor !</p></body></html>';
25
+ //die( 0 );
26
+ }
27
+
28
+ $sb_sites = WPSR_Lists::social_buttons();
29
+ echo '<script>window.social_buttons = ' . json_encode( $sb_sites ) . ';</script>';
30
+ echo '<script>window.li_template = \'' . self::li_template() . '\';</script>';
31
+
32
+ echo '<div id="wpsr_pp_editor">';
33
+ echo '<h3>WP Socializer - follow bar editor</h3>';
34
+ WPSR_Admin::box_wrap( 'open', __( 'Add buttons to follow bar', 'wpsr' ), __( 'Select a social media button from the list and add it to the list', 'wpsr' ), '1' );
35
+
36
+ echo '<table class="form-table"><tr><td width="90%">';
37
+ echo '<select class="fb_list widefat">';
38
+ foreach( $sb_sites as $id=>$prop ){
39
+ echo '<option value="' . $id . '">' . $prop[ 'name' ] . '</option>';
40
+ }
41
+ echo '</select>';
42
+ echo '</td><td>';
43
+ echo '<button class="fb_add button button-primary widefat">Add button</button>';
44
+ echo '</td></tr></table>';
45
+
46
+ $template = self::read_template( esc_attr( $_GET[ 'template' ] ) );
47
+ echo '<ul class="fb_selected">';
48
+ echo $template[ 'editor' ];
49
+ echo '</ul>';
50
+
51
+ echo '<input type="hidden" class="fb_template" />';
52
+
53
+ WPSR_Admin::box_wrap( 'close' );
54
+
55
+ echo '<p class="wpsr_ppe_footer" align="center"><button class="button button-primary wpsr_ppe_save" data-mode="followbar" data-cnt-id="' . esc_attr( $_GET[ 'cnt_id' ] ) . '" data-prev-id="' . esc_attr( $_GET[ 'prev_id' ] ) . '">Apply settings</button> <button class="button wpsr_ppe_cancel">Cancel</button></p>';
56
+
57
+ echo '</div>';
58
+
59
+ iframe_footer();
60
+ die( 0 );
61
+
62
+ }
63
+
64
+ public static function read_template( $template = '' ){
65
+
66
+ $decoded = base64_decode( $template );
67
+ $btns = json_decode( $decoded );
68
+
69
+ if( !is_array( $btns ) ){
70
+ return array(
71
+ 'prev' => '',
72
+ 'editor' => ''
73
+ );
74
+ }
75
+
76
+ $sb_sites = WPSR_Lists::social_buttons();
77
+ $editor = '';
78
+ $prev = '';
79
+
80
+ foreach( $btns as $btn_obj ){
81
+
82
+ $id = key( (array) $btn_obj );
83
+ $prop = $sb_sites[ $id ];
84
+
85
+ $editor .= self::li_template( $id, $prop[ 'name' ], $prop[ 'icon' ], $prop[ 'colors' ][0], $btn_obj->$id->url, $btn_obj->$id->icon, $btn_obj->$id->text );
86
+ $prev .= '<li style="background-color:' . $prop[ 'colors' ][0] . '"><i class="fa fa-' . $prop[ 'icon' ] . '"></i></li>';
87
+ }
88
+
89
+ if( $prev == '' )
90
+ $prev = '<span>No buttons are added. Open the editor to add buttons.</span>';
91
+
92
+ $prev = '<ul class="fb_preview">' . $prev . '</ul>';
93
+
94
+ return array(
95
+ 'editor' => $editor,
96
+ 'prev' => $prev
97
+ );
98
+
99
+ }
100
+
101
+ public static function li_template( $id = '%id%', $name = '%name%', $icon = '%icon%', $color = '%color%', $url = '%url%', $iurl = '%iurl%', $text = '%text%' ){
102
+ $title = __( 'Leave blank to use default', 'wpsr' );
103
+
104
+ return '<li data-id="' . $id . '"><h4 style="background-color: ' . $color . '"><i class="fa fa-' . $icon . ' item_icon"></i>' . $name . '<a href="#" class="fb_item_remove">' . __( 'Delete', 'wpsr' ) . '</a></h4><div><label>Button URL: <input type="text" class="widefat fb_item_url" placeholder="Enter profile URL" value="' . $url . '" /></label><label>Button text: <input type="text" class="widefat fb_btn_text" title="' . $title . '" placeholder="Enter custom text to show for button" value="' . $text . '"/></label><label>Icon image URL: <input type="text" class="widefat fb_icon_url" placeholder="Enter custom Icon URL." title="' . $title . '" value="' . $iurl . '"/></label></div></li>';
105
+ }
106
+
107
+ }
108
+
109
+ WPSR_Followbar::init();
110
+
111
+ /**
112
+ * Follow bar admin page
113
+ */
114
+
115
+ class wpsr_admin_followbar{
116
+
117
+ function __construct(){
118
+
119
+ WPSR_Admin::add_tab( 'followbar', array(
120
+ 'name' => 'Follow Bar',
121
+ 'banner' => WPSR_ADMIN_URL . '/images/banners/followbar.png',
122
+ 'page_callback' => array( $this, 'page' ),
123
+ 'form' => array(
124
+ 'id' => 'followbar_settings',
125
+ 'name' => 'followbar_settings',
126
+ 'callback' => array( $this, 'form_fields' ),
127
+ 'validation' => array( $this, 'validation' ),
128
+ )
129
+ ));
130
+
131
+ }
132
+
133
+ function form_fields( $values ){
134
+
135
+ $values = wp_parse_args( $values, WPSR_Lists::defaults( 'followbar' ) );
136
+
137
+ $section0 = array(
138
+ array( __( 'Select to enable or disable follow bar feature', 'wpsr' ), WPSR_Admin::field( 'select', array(
139
+ 'name' => 'ft_status',
140
+ 'value' => $values[ 'ft_status' ],
141
+ 'list' => array(
142
+ 'enable' => __( 'Enable follow bar', 'wpsr' ),
143
+ 'disable' => __( 'Disable follow bar', 'wpsr' )
144
+ ),
145
+ )), 'class="ft_table"' ),
146
+ );
147
+
148
+ WPSR_Admin::youtube_help_icon( 'https://www.youtube.com/watch?v=2v5VTYzZcMo' );
149
+
150
+ WPSR_Admin::build_table( $section0, __( 'Enable/disable follow bar', 'wpsr' ), '', false, '1' );
151
+
152
+ $template = WPSR_Followbar::read_template( $values[ 'template' ] );
153
+
154
+ echo '<div class="feature_wrap">';
155
+
156
+ // Section 1
157
+ WPSR_Admin::box_wrap( 'open', __( 'Add and edit follow bar buttons', 'wpsr' ), __( 'Below are the buttons added to follow bar. Open editor to add and rearrange the buttons.', 'wpsr' ), '2' );
158
+ echo '<h4>' . __( 'Selected buttons', 'wpsr' ) . '</h4>';
159
+ echo '<div id="fb_prev_wrap">' . $template[ 'prev' ] . '</div>';
160
+
161
+ echo '<input type="hidden" id="fb_template_val" name="template" value="' . $values[ 'template' ] . '" />';
162
+ echo '<p align="center"><button class="button button-primary wpsr_ppe_fb_open" data-cnt-id="fb_template_val" data-prev-id="fb_prev_wrap">' . __( 'Open editor', 'wpsr' ) . '</button></p>';
163
+ WPSR_Admin::box_wrap( 'close' );
164
+
165
+ // Section 2
166
+ $section2 = array(
167
+ array( __( 'Button shape', 'wpsr' ), WPSR_Admin::field( 'select', array(
168
+ 'name' => 'shape',
169
+ 'value' => $values['shape'],
170
+ 'list' => array(
171
+ '' => 'Square',
172
+ 'circle' => 'Circle',
173
+ 'squircle' => 'Squircle',
174
+ 'squircle-2' => 'Squircle 2',
175
+ 'diamond' => 'Diamond',
176
+ 'ribbon' => 'Ribbon',
177
+ 'drop' => 'Drop',
178
+ ),
179
+ ))),
180
+
181
+ array( __( 'Button size', 'wpsr' ), WPSR_Admin::field( 'select', array(
182
+ 'name' => 'size',
183
+ 'value' => $values['size'],
184
+ 'list' => array(
185
+ '32px' => '32px',
186
+ '16px' => '16px',
187
+ '48px' => '48px',
188
+ '64px' => '64px',
189
+ ),
190
+ ))),
191
+
192
+ array( __( 'Button background color', 'wpsr' ), WPSR_Admin::field( 'text', array(
193
+ 'name' => 'bg_color',
194
+ 'value' => $values['bg_color'],
195
+ 'class' => 'color_picker',
196
+ 'helper' => __( 'Set empty value to use automatic background color', 'wpsr' )
197
+ ))),
198
+
199
+ array( __( 'Icon color', 'wpsr' ), WPSR_Admin::field( 'text', array(
200
+ 'name' => 'icon_color',
201
+ 'value' => $values['icon_color'],
202
+ 'class' => 'color_picker'
203
+ ))),
204
+
205
+ array( __( 'Orientation', 'wpsr' ), WPSR_Admin::field( 'select', array(
206
+ 'name' => 'orientation',
207
+ 'value' => $values['orientation'],
208
+ 'list' => array(
209
+ 'vertical' => __( 'Vertical', 'wpsr' ),
210
+ 'horizontal' => __( 'Horizontal', 'wpsr' )
211
+ ),
212
+ ))),
213
+
214
+ array( __( 'Position', 'wpsr' ), WPSR_Admin::field( 'select', array(
215
+ 'name' => 'position',
216
+ 'value' => $values['position'],
217
+ 'list' => array(
218
+ 'tl' => __( 'Top left', 'wpsr' ),
219
+ 'tm' => __( 'Top middle', 'wpsr' ),
220
+ 'tr' => __( 'Top right', 'wpsr' ),
221
+ 'rm' => __( 'Right middle', 'wpsr' ),
222
+ 'br' => __( 'Bottom right', 'wpsr' ),
223
+ 'bm' => __( 'Bottom middle', 'wpsr' ),
224
+ 'bl' => __( 'Bottom left', 'wpsr' ),
225
+ 'lm' => __( 'Left middle', 'wpsr' ),
226
+ ),
227
+ ))),
228
+
229
+ array( __( 'Text style', 'wpsr' ), WPSR_Admin::field( 'select', array(
230
+ 'name' => 'text',
231
+ 'value' => $values['text'],
232
+ 'list' => array(
233
+ 'hide' => __( 'Hide button text', 'wpsr' ),
234
+ 'hover' => __( 'Show text on hover', 'wpsr' )
235
+ ),
236
+ ))),
237
+
238
+ array( __( 'Hover effect', 'wpsr' ), WPSR_Admin::field( 'select', array(
239
+ 'name' => 'hover',
240
+ 'value' => $values['hover'],
241
+ 'list' => array(
242
+ '' => __( 'None', 'wpsr' ),
243
+ 'opacity' => 'Opacity',
244
+ 'rotate' => 'Rotate',
245
+ 'zoom' => 'Zoom',
246
+ 'shrink' => 'Shrink',
247
+ 'float' => 'Float',
248
+ 'sink' => 'Sink'
249
+ ),
250
+ ))),
251
+
252
+ array( __( 'Gutters', 'wpsr' ), WPSR_Admin::field( 'select', array(
253
+ 'name' => 'pad',
254
+ 'value' => $values['pad'],
255
+ 'list' => array(
256
+ '' => __( 'No', 'wpsr' ),
257
+ 'pad' => __( 'yes', 'wpsr' )
258
+ ),
259
+ 'helper' => __( 'Select to add space between buttons', 'wpsr' )
260
+ ))),
261
+
262
+ array( __( 'Title', 'wpsr' ), WPSR_Admin::field( 'text', array(
263
+ 'name' => 'title',
264
+ 'value' => $values['title'],
265
+ 'helper' => __( 'Text to show above the follow bar', 'wpsr' ),
266
+ ))),
267
+
268
+ array( __( 'Open links in popup', 'wpsr' ), WPSR_Admin::field( 'select', array(
269
+ 'name' => 'open_popup',
270
+ 'value' => $values['open_popup'],
271
+ 'list' => array(
272
+ 'no' => 'No',
273
+ '' => 'yes',
274
+ ),
275
+ ))),
276
+
277
+ );
278
+
279
+ WPSR_Admin::build_table( $section2, __( 'Settings', 'wpsr' ), '', false, '3' );
280
+
281
+
282
+ // Location rules
283
+ WPSR_Admin::box_wrap( 'open', __( 'Conditions to display the followbar', 'wpsr' ), __( 'Choose the below options to select the pages which will display the followbar.', 'wpsr' ), '4' );
284
+ WPSR_Location_Rules::display_rules( "loc_rules", $values['loc_rules'] );
285
+ WPSR_Admin::box_wrap( 'close' );
286
+
287
+ echo '</div>';
288
+ }
289
+
290
+ function page(){
291
+
292
+ WPSR_Admin::settings_form( 'followbar' );
293
+
294
+ }
295
+
296
+ function validation( $input ){
297
+ return $input;
298
+ }
299
+
300
+ }
301
+
302
+ new wpsr_admin_followbar();
303
+
304
+ /**
305
+ * Follow bar widget
306
+ */
307
+
308
+ class wpsr_widget_followbar{
309
+
310
+ function __construct(){
311
+
312
+ WPSR_Widgets::register( 'followbar_widget', array(
313
+ 'name' => 'Follow me/us icons widget',
314
+ 'callbacks' => array(
315
+ 'widget' => array( $this, 'widget' ),
316
+ 'form' => array( $this, 'form' ),
317
+ 'update' => array( $this, 'update' )
318
+ )
319
+ ));
320
+
321
+ $this->defaults = array(
322
+ 'template' => '',
323
+ 'orientation' => 'horizontal',
324
+ 'shape' => '',
325
+ 'size' => '32px',
326
+ 'bg_color' => '',
327
+ 'icon_color' => '#ffffff',
328
+ 'text' => 'hide',
329
+ 'hover' => 'opacity',
330
+ 'pad' => 'pad',
331
+ 'profile_text' => ''
332
+ );
333
+
334
+ }
335
+
336
+ function widget( $args, $instance ){
337
+
338
+ $instance = wp_parse_args( $instance, $this->defaults );
339
+
340
+ $html = WPSR_Template_Followbar::html( $instance, False );
341
+ echo $html;
342
+
343
+ }
344
+
345
+ function form( $obj, $instance ){
346
+
347
+ echo '<h4>' . __( 'Follow bar widget', 'wpsr' ) . '</h4>';
348
+
349
+ $instance = wp_parse_args( $instance, $this->defaults );
350
+ $fields = new WPSR_Widget_Form_Fields( $obj, $instance );
351
+
352
+ $wtmpl_val = esc_attr( $instance[ 'template' ] );
353
+ $wtmpl_cnt_id = $obj->get_field_id( 'template' );
354
+ $wtmpl_prev_id = $obj->get_field_id( 'fbw_prev' );
355
+
356
+ echo '<div class="hidden">';
357
+ $fields->text( 'template', '' );
358
+ $fields->text( 'orientation', '' );
359
+ echo '</div>';
360
+
361
+ echo '<h5>' . __( 'Selected buttons', 'wpsr' ) . '</h5>';
362
+ echo '<div class="wpsr_wtmpl_wrap clearfix" id="' . $wtmpl_prev_id . '">';
363
+ $tmpl = WPSR_Followbar::read_template( $wtmpl_val );
364
+ echo $tmpl[ 'prev' ];
365
+ echo '</div>';
366
+
367
+ echo '<p align="center"><button class="button button-primary wpsr_ppe_fb_open" data-wtmpl-cnt-id="' . $wtmpl_cnt_id . '" data-wtmpl-prev-id="' . $wtmpl_prev_id . '">' . __( 'Open editor', 'wpsr' ) . '</button></p>';
368
+
369
+ echo '<h5>' . __( 'Settings', 'wpsr' ) . '</h5>';
370
+ $fields->select( 'shape', 'Button shape', array(
371
+ '' => 'Square',
372
+ 'circle' => 'Circle',
373
+ 'squircle' => 'Squircle',
374
+ 'squircle-2' => 'Squircle 2',
375
+ 'diamond' => 'Diamond',
376
+ 'ribbon' => 'Ribbon',
377
+ 'drop' => 'Drop',
378
+ ), array( 'class' => 'smallfat' ));
379
+
380
+ $fields->select( 'size', 'Button size', array(
381
+ '32px' => '32px',
382
+ '16px' => '16px',
383
+ '48px' => '48px',
384
+ '64px' => '64px',
385
+ ), array( 'class' => 'smallfat' ));
386
+
387
+ $fields->text( 'bg_color', 'Button background color', array( 'class' => 'smallfat wpsr-color-picker' ));
388
+
389
+ $fields->text( 'icon_color', 'Icon color', array( 'class' => 'smallfat wpsr-color-picker' ));
390
+
391
+ $fields->select( 'text', 'Text style', array(
392
+ 'hide' => 'Hide button text',
393
+ 'hover' => 'Show text on hover'
394
+ ), array( 'class' => 'smallfat' ));
395
+
396
+ $fields->select( 'hover', 'Hover effect', array(
397
+ '' => __( 'None', 'wpsr' ),
398
+ 'opacity' => 'Opacity',
399
+ 'rotate' => 'Rotate',
400
+ 'zoom' => 'Zoom',
401
+ 'shrink' => 'Shrink',
402
+ 'float' => 'Float',
403
+ 'sink' => 'Sink'
404
+ ), array( 'class' => 'smallfat' ));
405
+
406
+ $fields->select( 'pad', 'Gap between buttons', array(
407
+ '' => 'No',
408
+ 'pad' => 'yes'
409
+ ), array( 'class' => 'smallfat' ));
410
+
411
+ $fields->text( 'profile_text', 'Text above buttons' );
412
+
413
+ }
414
+
415
+ function update( $instance ){
416
+ return $instance;
417
+ }
418
+
419
+ }
420
+ new wpsr_widget_followbar();
421
+
422
+ ?>
admin/general_settings.php ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * General settings admin page
4
+ *
5
+ **/
6
+
7
+ class wpsr_admin_settings{
8
+
9
+ function __construct(){
10
+
11
+ WPSR_Admin::add_tab( 'general_settings', array(
12
+ 'name' => 'Settings',
13
+ 'page_callback' => array( $this, 'page' ),
14
+ 'form' => array(
15
+ 'id' => 'general_settings',
16
+ 'name' => 'general_settings',
17
+ 'callback' => ''
18
+ )
19
+ ));
20
+
21
+ add_action( 'wpsr_form_general_settings', array( $this, 'misc_general_settings' ), 10, 1 );
22
+
23
+ }
24
+
25
+ function page(){
26
+
27
+ WPSR_Admin::settings_form( 'general_settings' );
28
+ }
29
+
30
+ function validation( $input ){
31
+ return $input;
32
+ }
33
+
34
+ function misc_general_settings( $values ){
35
+
36
+ $values = wp_parse_args( $values, WPSR_Lists::defaults( 'gsettings_misc' ) );
37
+
38
+ $section1 = array(
39
+ array( __( 'Additional CSS rules', 'wpsr' ), WPSR_Admin::field( 'textarea', array(
40
+ 'name' => 'misc_additional_css',
41
+ 'value' => $values['misc_additional_css'],
42
+ 'helper' => __( 'Enter custom CSS rules to customize without the style tag', 'wpsr' ),
43
+ 'rows' => '3',
44
+ 'cols' => '100'
45
+ )))
46
+ );
47
+
48
+ WPSR_Admin::build_table( $section1, __( 'Miscellaneous settings', 'wpsr' ) );
49
+ }
50
+
51
+ }
52
+
53
+ new wpsr_admin_settings();
54
+
55
+ ?>
admin/help.php ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Help admin page
4
+ *
5
+ **/
6
+
7
+ class wpsr_admin_help{
8
+
9
+ function __construct(){
10
+
11
+ WPSR_Admin::add_tab( 'help', array(
12
+ 'name' => __( 'Help', 'wpsr' ),
13
+ 'page_callback' => array( $this, 'page' ),
14
+ 'form' => array(
15
+ 'id' => 'help',
16
+ 'name' => 'help',
17
+ 'callback' => ''
18
+ )
19
+ ));
20
+
21
+ }
22
+
23
+ function page(){
24
+
25
+ echo '<div class="help_sec style_ele">';
26
+ $help_res = wp_remote_get( WPSR_Lists::ext_res( 'help' ) );
27
+
28
+ if( is_wp_error( $help_res ) ){
29
+ echo '<p>Error retreiving help information</p>';
30
+ }else{
31
+ echo wp_remote_retrieve_body( $help_res );
32
+ }
33
+
34
+ echo '</div>';
35
+
36
+ }
37
+
38
+ function validation( $input ){
39
+ return $input;
40
+ }
41
+
42
+ }
43
+
44
+ new wpsr_admin_help();
45
+
46
+ ?>
admin/images/admin-sprites.png DELETED
Binary file
admin/images/anpn-thumb.png DELETED
Binary file
admin/images/anpn.png DELETED
Binary file
admin/images/banners/followbar.png ADDED
Binary file
admin/images/banners/mobile-sharebar.png ADDED
Binary file
admin/images/banners/share-buttons.png ADDED
Binary file
admin/images/banners/sharebar.png ADDED
Binary file
admin/images/banners/text-sharebar.png ADDED
Binary file
admin/images/buttons/addthis-buttons.png DELETED
Binary file
admin/images/buttons/addthis-tb-16px.png DELETED
Binary file
admin/images/buttons/addthis-tb-32px.png DELETED
Binary file
admin/images/buttons/admin-sprites.png DELETED
Binary file
admin/images/buttons/adthis-sharecount.png DELETED
Binary file
admin/images/buttons/floatbt-bg.png DELETED
Binary file
admin/images/buttons/linkedin-bts.png DELETED
Binary file
admin/images/buttons/pinterest-bts.png DELETED
Binary file
admin/images/buttons/reddit-bts.png DELETED
Binary file
admin/images/buttons/sharethis-buttons.png DELETED
Binary file
admin/images/buttons/sharethis-classic.png DELETED
Binary file
admin/images/buttons/sharethis-hcount.png DELETED
Binary file
admin/images/buttons/sharethis-large.png DELETED
Binary file
admin/images/buttons/sharethis-regular-notext.png DELETED
Binary file
admin/images/buttons/sharethis-regular.png DELETED
Binary file
admin/images/buttons/sharethis-vcount.png DELETED
Binary file
admin/images/buttons/stumbleupon-bts.png DELETED
Binary file
admin/images/demo.png DELETED
Binary file
admin/images/donate.png DELETED
Binary file
admin/images/five-star.png DELETED
Binary file
admin/images/footer-bg.png DELETED
Binary file
admin/images/grey-bg.png DELETED
Binary file
admin/images/header-bg.png DELETED
Binary file
admin/images/{aw.png → icons/aakash-web.png} RENAMED
File without changes
admin/images/icons/add.png ADDED
Binary file
admin/images/icons/close.png ADDED
Binary file
admin/images/icons/down-right.png ADDED
Binary file
admin/images/icons/drag.png ADDED
Binary file
admin/images/icons/facebook.png ADDED
Binary file
admin/images/icons/google-plus.png ADDED
Binary file
admin/images/icons/html.png ADDED
Binary file
admin/images/icons/linkedin.png ADDED
Binary file
admin/images/icons/loading.gif ADDED
Binary file
admin/images/icons/pinterest.png ADDED
Binary file
admin/images/icons/pocket.png ADDED
Binary file
admin/images/icons/reddit.png ADDED
Binary file
admin/images/icons/share_counter.png ADDED
Binary file
admin/images/icons/sharethis.png ADDED
Binary file
admin/images/icons/shortcode.png ADDED
Binary file
admin/images/icons/social_buttons.png ADDED
Binary file
admin/images/icons/stumbleupon.png ADDED
Binary file
admin/images/icons/twitter.png ADDED
Binary file
admin/images/{wp-socializer-20.png → icons/wp-socializer-sm.png} RENAMED
File without changes
admin/images/{wp-socializer.png → icons/wp-socializer.png} RENAMED
File without changes
admin/images/load.gif DELETED
Binary file
admin/images/menu-bg.png DELETED
Binary file
admin/images/menu-hover.png DELETED
Binary file
admin/images/orange-bg.png DELETED
Binary file
admin/images/paypal.gif DELETED
Binary file
admin/images/pressthis.png DELETED
Binary file
admin/images/purchase.png DELETED
Binary file
admin/images/right-arrow.png DELETED
Binary file
admin/images/share.png DELETED
Binary file
admin/images/tips/btn-layouts.png ADDED
Binary file
admin/images/tips/btn-shapes.png ADDED
Binary file
admin/images/tips/btn-sizes.png ADDED
Binary file
admin/images/tips/btn-text-types.png ADDED
Binary file
admin/images/tips/fb-types.png ADDED
Binary file
admin/images/tips/googleplus-sizes.png ADDED
Binary file
admin/images/tips/reddit-types.png ADDED
Binary file
admin/images/tips/sb-types.png ADDED
Binary file
admin/images/tips/stumbleupon-types.png ADDED
Binary file
admin/images/tips/tsb-sizes.png ADDED
Binary file
admin/js/ipopup.js ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ function wpsr_ipopup_show( url, width = '640', height = '480' ){
2
+ $popup = jQuery( '<div id="wpsr_ipopup_wrap"><section style="width:' + width + '; height:' + height + '"><iframe frameborder="0" src="' + url + '"></iframe><a href="#" class="wpsr_ipopup_close" onclick="wpsr_ipopup_close()" title="Close">X</a></section></div>' );
3
+ wpsr_ipopup_close();
4
+
5
+ jQuery( 'body' ).append( $popup );
6
+ }
7
+
8
+ function wpsr_ipopup_close(){
9
+ jQuery( '#wpsr_ipopup_wrap' ).remove();
10
+ }
admin/js/jquery.conditioner.js ADDED
@@ -0,0 +1,192 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * jQuery - Conditioner - v1.0
3
+ * http://www.aakashweb.com/
4
+ * Copyright 2015, Aakash Chakravarthy
5
+ * Released under the MIT License.
6
+ */
7
+
8
+ ;(function ( $ ) {
9
+
10
+ $.fn.conditioner = function( options ){
11
+
12
+ var opts = $.extend({
13
+ events: '',
14
+ conditions: [],
15
+ onTrue: '',
16
+ onFalse: '',
17
+ }, options );
18
+
19
+ function prepareConds( $ele ){
20
+
21
+ $inputs = false;
22
+ opts = $ele.data( 'conditioner-opts' );
23
+ conds = [];
24
+
25
+ // Inline options
26
+ if( typeof $ele.data( 'condr-input' ) !== 'undefined' ){
27
+
28
+ // data-condr-input="(closest::.wrap)(find::.myele)"
29
+ inputAttr = $ele.data( 'condr-input' );
30
+
31
+ $inputEle = $ele;
32
+ if( inputAttr.indexOf( '(' ) != -1 ){ // Input selection is advanced as it has braces
33
+
34
+ // Loop through the selectors and get the jQuery obj of input
35
+ $.each( inputAttr.match( /\(.+?\)/g ), function( index, method ){
36
+ method = method.replace( /[()]/g, '' );
37
+ methodSplit = method.split( '::' );
38
+ $inputEle = $inputEle[ methodSplit[0] ]( methodSplit[1] );
39
+ });
40
+
41
+ }else{
42
+ $inputEle = $( inputAttr );
43
+ }
44
+
45
+ if( typeof $ele.data( 'condr-action' ) !== 'undefined' ){
46
+
47
+ conds.push({
48
+ input: $inputEle,
49
+ value: $ele.data( 'condr-value' ),
50
+ type: $ele.data( 'condr-action' ).split('?')[0]
51
+ });
52
+
53
+ // Add input to list
54
+ $inputs = ( $inputs == false ) ? $inputEle : $inputs.add( $inputEle );
55
+ }
56
+
57
+ }
58
+
59
+ // External options
60
+ if( opts.conditions.length > 0 ){
61
+ $.each( opts.conditions, function( index, cond ){
62
+
63
+ if( cond.input != '' && typeof cond.input === 'function' ){
64
+ $indInput = cond.input.call( $ele );
65
+ }else if( typeof cond.input === 'string' ){
66
+ $indInput = $( cond.input );
67
+ }else{
68
+ return true;
69
+ }
70
+
71
+ conds.push({
72
+ input: $indInput,
73
+ value: ( typeof cond.value === 'function' ) ? cond.value.call( $ele ) : cond.value,
74
+ type: cond.type
75
+ });
76
+
77
+ $inputs = ( $inputs == false ) ? $indInput : $inputs.add( $indInput );
78
+
79
+ });
80
+ }
81
+
82
+ // Attach the array which has all the conditions, value and type to the element
83
+ $ele.data( 'conditioner-conds', conds );
84
+
85
+ return $inputs;
86
+ }
87
+
88
+ function checkCondition( $ele ){
89
+
90
+ conds = $ele.data( 'conditioner-conds' );
91
+ finalCheck = null;
92
+
93
+ // Loop through each condition
94
+ $.each( conds, function( index, cond ){
95
+ indCheck = checkValue( cond );
96
+ finalCheck = ( finalCheck == null ) ? indCheck : ( finalCheck && indCheck );
97
+ });
98
+
99
+ // If inline options are set
100
+ if( typeof $ele.data( 'condr-action' ) !== 'undefined' ){
101
+
102
+ condrAction = $ele.data( 'condr-action' );
103
+ actionSplit = condrAction.split( '?' );
104
+ actions = actionSplit[1].split( ':' );
105
+
106
+ if( finalCheck ){
107
+ $ele[ actions[0] ]();
108
+ }else{
109
+ $ele[ actions[1] ]();
110
+ }
111
+
112
+ return true;
113
+ }
114
+
115
+ // If external options are set
116
+ if( opts.onTrue != '' && opts.onFalse != '' ){
117
+
118
+ if( finalCheck ){
119
+ if( typeof opts.onTrue === 'function' )
120
+ opts.onTrue.call( $ele );
121
+ }else{
122
+ if( typeof opts.onFalse === 'function' )
123
+ opts.onFalse.call( $ele );
124
+ }
125
+
126
+ return true;
127
+
128
+ }
129
+
130
+ }
131
+
132
+ function checkValue( cond ){
133
+
134
+ var inputVal = '';
135
+ var checkPassed = false;
136
+
137
+ if( cond.input.attr( 'type' ) == 'radio'){
138
+ inputVal = cond.input.filter(':checked').val();
139
+ }else if( cond.input.attr( 'type' ) == 'checkbox' ){
140
+ if( cond.input.is( ':checked' ) ) return true;
141
+ else return false;
142
+ }else{
143
+ inputVal = cond.input.val();
144
+ }
145
+
146
+ if( typeof cond.type === 'undefined' ){
147
+ cond.type = 'simple';
148
+ }
149
+
150
+ // Check didn't pass so try others
151
+ if( typeof cond.value !== 'undefined' && typeof inputVal !== 'undefined' ){
152
+ if( cond.type == 'pattern' ){
153
+ checkPassed = ( inputVal.match( new RegExp( cond.value, 'g' ) ) !== null ) ? true : false;
154
+ }else if( cond.type == 'simple' ){
155
+ checkPassed = ( inputVal == cond.value ) ? true : false;
156
+ }
157
+ }
158
+
159
+ return checkPassed;
160
+
161
+ }
162
+
163
+ return this.each(function(){
164
+
165
+ $ele = $(this).data( 'conditioner-opts', opts );
166
+ $inputs = prepareConds( $ele );
167
+ events = ( typeof $ele.data( 'condr-events' ) !== 'undefined' ) ? $ele.data( 'condr-events' ) : opts.events;
168
+ //console.log( $inputs );
169
+ if( $inputs.length > 0 && events != '' ){
170
+
171
+ if( typeof $inputs.data( 'conditioner-ele' ) === 'undefined' ){
172
+ $inputs.data( 'conditioner-ele', $ele );
173
+ }else{
174
+ $eles = $inputs.data( 'conditioner-ele' ).add( $ele );
175
+ $inputs.data( 'conditioner-ele', $eles );
176
+ }
177
+
178
+ $inputs.on( events, function(){
179
+ $(this).data( 'conditioner-ele' ).each(function(){
180
+ checkCondition( $(this) );
181
+ });
182
+ });
183
+
184
+ // Check the conditions once
185
+ checkCondition( $ele );
186
+ }
187
+
188
+ });
189
+
190
+ }
191
+
192
+ })( jQuery );
admin/js/script.js ADDED
@@ -0,0 +1,1275 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function($){
2
+ jQuery(document).ready(function(){
3
+
4
+ var scr_templates = [
5
+ ["Color icons", "32px,icon-white,pad", "no"],
6
+ ["Color icons", "32px,icon-white", "no"],
7
+ ["Color icons", "32px,icon-white,circle,pad", "no"],
8
+ ["Color icons", "32px,icon-white,squircle,pad", "no"],
9
+ ["Color icons", "32px,icon-white,diamond,pad", "no"],
10
+ ["Color icons", "32px,icon-white,ribbon,pad", "no"],
11
+ ["Color icons", "32px,icon-white,drop,pad", "no"],
12
+ ["Color icons with shadow", "32px,icon-white,pad,sw-icon-1", "no"],
13
+ ["Color icons with shadow", "32px,icon-white,pad,sw-2", "no"],
14
+
15
+ ["Just icons", "32px,bg-none,pad", "no"],
16
+ ["Just icons", "32px,bg-none,icon-dark,pad", "no"],
17
+ ["Just icons", "32px,bg-none,icon-grey,pad", "no"],
18
+ ["Just icons with shadow", "32px,bg-none,sw-icon-1,pad", "no"],
19
+ ["Just icons with shadow", "32px,bg-none,icon-dark,sw-icon-1,pad", "no"],
20
+ ["Just icons with shadow", "32px,bg-none,icon-grey,sw-icon-1,pad", "no"],
21
+
22
+ ["Fixed background", "32px,icon-white,bg-dark,pad", "no"],
23
+ ["Fixed background", "32px,bg-dark,circle,pad", "no"],
24
+ ["Fixed background", "32px,icon-white,bg-dark,squircle-2,pad", "no"],
25
+
26
+ ["Fixed background", "32px,icon-dark,bg-white,pad", "no"],
27
+ ["Fixed background", "32px,bg-white,circle,sw-1,pad", "no"],
28
+ ["Fixed background", "32px,icon-dark,bg-white,drop,sw-2,pad", "no"],
29
+
30
+ ["Fixed background", "32px,diamond,icon-dark,bg-grey,pad", "no"],
31
+ ["Fixed background", "32px,bg-grey,circle,sw-1,pad", "no"],
32
+ ["Fixed background", "32px,icon-dark,bg-grey,squircle-2,sw-2,pad", "no"],
33
+
34
+ ["Icon and border", "32px,bdr-md,bg-none,pad", "no"],
35
+ ["Icon and border", "32px,bdr-md,bg-none,circle,pad", "no"],
36
+ ["Icon and border", "32px,bdr-md,bg-none,squircle-2,pad", "no"],
37
+
38
+ ["Icon and border", "32px,bdr-md,bg-none,bdr-dark,icon-dark,pad", "no"],
39
+ ["Icon and border", "32px,bdr-md,bg-none,bdr-dark,icon-dark,circle,pad", "no"],
40
+ ["Icon and border", "32px,bdr-md,bg-none,bdr-dark,icon-dark,squircle-2,pad", "no"],
41
+
42
+ ["Icon and border", "32px,bdr-md,bdr-dark,icon-white,sw-icon-1,pad", "no"],
43
+ ["Icon and border", "32px,bdr-md,bdr-color,icon-color,bg-dark,pad", "no"],
44
+ ["Icon and border", "32px,bdr-md,bdr-color,icon-dark,bg-grey,squircle,pad", "no"],
45
+
46
+ ["Mixed", "32px,bg-white,bdr-md,bdr-grey,circle,pad", "no"],
47
+ ["Mixed", "32px,bg-white,bdr-md,bdr-dark,squircle-2,pad", "no"],
48
+ ["Mixed", "32px,icon-white,bdr-md,bdr-dark,drop,sw-3,pad", "no"],
49
+
50
+ ["Ribbons", "32px,icon-white,sw-icon-1,ribbon,pad", "no"],
51
+ ["Ribbons", "32px,icon-white,bg-dark,bdr-dark,ribbon,pad", "no"],
52
+ ["Ribbons", "32px,icon-dark,bg-grey,bdr-grey,ribbon,pad", "no"],
53
+
54
+ ["With text", "32px,icon-white,pad", "in"],
55
+ ["With text", "32px,icon-white,circle,pad", "in"],
56
+ ["With text", "32px,icon-white,squircle-2,pad", "in"],
57
+ ["With text", "32px,icon-white,pad", "out"],
58
+
59
+ ["Fluid Icons", "32px,icon-white,squircle,fluid,pad", "no"],
60
+ ["Fluid Icons", "32px,icon-white,fluid", "no"],
61
+ ["Fluid Icons", "32px,icon-white,sw-icon-1,fluid", "no"],
62
+ ["Fluid Icons", "32px,icon-white,sw-2,pad,fluid", "no"],
63
+ ["Fluid Icons", "32px,icon-white,bg-dark,fluid,pad", "no"],
64
+ ["Fluid Icons", "32px,bg-none,fluid", "no"],
65
+ ["Fluid Icons", "32px,bg-none,fluid", "in"],
66
+
67
+ ["Vertical", "32px,icon-white,vertical,pad", "no"],
68
+ ["Vertical", "32px,bdr-md,bg-none,squircle-2,vertical,pad", "no"],
69
+ ["Vertical", "32px,bg-dark,circle,vertical,pad", "no"],
70
+ ["Vertical", "32px,bdr-md,bdr-dark,icon-white,sw-icon-1,squircle,vertical,pad", "no"],
71
+ ["Vertical", "32px,icon-white,bg-dark,vertical,pad", "no"],
72
+ ["Vertical", "32px,bg-none,pad,vertical", "no"],
73
+ ["Vertical", "32px,bg-none,icon-dark,pad,vertical", "no"],
74
+ ["Vertical", "32px,icon-white,vertical", "no"],
75
+ ];
76
+
77
+ var scr_default_values = {
78
+ 'sites': [ 'facebook', 'googleplus', 'print', 'email', 'rss' ],
79
+ 'sizes': '32px',
80
+ 'shapes': '',
81
+ 'hover': '',
82
+ 'layouts': '',
83
+ 'text-styles': '',
84
+ 'font-size': '',
85
+ 'icon-color': '',
86
+ 'border-color': '',
87
+ 'background-color': '',
88
+ 'border-width': '',
89
+ 'shadow': '',
90
+ 'pad': 'pad',
91
+ 'multiline': '',
92
+ 'more-count': 0,
93
+ 'sharebar-orientation': 'vl-left',
94
+ 'sharebar-theme': '',
95
+ 'btn-type': 'hbar'
96
+ };
97
+
98
+ var atc = {
99
+ pc: $('#adminmenu a').css('color'),
100
+ pbc: $('#adminmenu').css('background-color'),
101
+ sc: $('.wp-core-ui .button-primary').css('color'),
102
+ sbc: $('.wp-core-ui .button-primary').css('background-color')
103
+ }
104
+
105
+ var init = function(){
106
+
107
+ if( $.fn.draggable ){
108
+ $( ".btns_created li" ).draggable( draggable_opts );
109
+ }
110
+
111
+ if( $.fn.sortable ){
112
+ $( ".veditor ul" ).sortable( vedit_sortable_btns );
113
+
114
+ $( ".veditor" ).sortable({
115
+ axis: 'y',
116
+ start: function( e, ui ){
117
+ ui.placeholder.height( ui.item.height() );
118
+ wpsr_admin_tooltip_close();
119
+ }
120
+ });
121
+
122
+ $( '.fb_selected' ).sortable({
123
+ axis: 'y',
124
+ handle: 'h4'
125
+ });
126
+
127
+ $( '.ssb_selected_list' ).sortable({
128
+ stop: process_tsb_editor
129
+ });
130
+
131
+ }
132
+
133
+ loc_sub_criteria();
134
+
135
+ loc_generate_rules();
136
+
137
+ feature_toggle();
138
+
139
+ $( '.loc_page' ).each( function(){
140
+ loc_update_rule_helper( $(this) );
141
+ });
142
+
143
+ if( $.fn.conditioner ){
144
+ $('[data-conditioner]').conditioner();
145
+ }
146
+
147
+ if( $.fn.wpColorPicker ){
148
+ $('.color_picker').wpColorPicker();
149
+ }
150
+
151
+ $('body').append('<style>.btns_created .ui_btn{ color: ' + atc.pc + '; background-color: ' + atc.pbc + ' } .vedit_wrap .ui_btn{ color: ' + atc.sc + '; background-color: ' + atc.sbc + '; } .sbox_inner li:hover{ color: ' + atc.pc + '; background-color: ' + atc.pbc + '!important; }</style>' );
152
+
153
+ $('.template_wrap').hide().first().show();
154
+ $('.template_tab li').first().addClass( 'templ_tab_active' );
155
+
156
+ if( window.wpsr_show_changelog ){
157
+ changelog_show( window.wpsr_show_changelog );
158
+ }
159
+
160
+ }
161
+
162
+ var loc_generate_rules = function(){
163
+
164
+ $( '.loc_rules_wrap' ).each(function(){
165
+
166
+ tval = new Array();
167
+ $wrap = $(this);
168
+ $tinfo = $wrap.find( '.loc_rule_info' );
169
+ $gadd = $wrap.find( '.loc_group_add' );
170
+ $rule_box = $wrap.find( '.loc_rule_value' );
171
+ $tgrp = $wrap.find( '.loc_rules_box .loc_group_wrap' );
172
+
173
+ i = 0;
174
+ $( $tgrp ).each(function(){
175
+ $trle = $(this).find( '.loc_rule_wrap' );
176
+ j = 0;
177
+ tval[i] = new Array();
178
+ $( $trle ).each(function(){
179
+
180
+ tval[i][j] = [
181
+ $(this).find( '.loc_page' ).val(),
182
+ $(this).find( '.loc_operator' ).val(),
183
+ $(this).find( '.loc_value' ).val()
184
+ ];
185
+
186
+ j++;
187
+ });
188
+ i++;
189
+ });
190
+
191
+ $rule_box.val( btoa( JSON.stringify( tval ) ) );
192
+
193
+ if( $tgrp.length == 0 ){
194
+ $tinfo.show();
195
+ $gadd.text( 'Add new rules' );
196
+ }else{
197
+ $tinfo.hide();
198
+ $gadd.text( ' Add another page ' );
199
+ }
200
+
201
+ });
202
+ }
203
+
204
+ var loc_sub_criteria = function(){
205
+ $('.loc_group_wrap').each(function(){
206
+ $master_rule = $(this).find( '.loc_rule_wrap:first-child' );
207
+ master = $master_rule.find( '.loc_page' ).val();
208
+
209
+ $( this ).find( '.loc_rule_wrap' ).each(function(){
210
+ if( $(this).index() == 0 )
211
+ return true;
212
+ $(this).find( '.loc_page option' ).each(function(){
213
+ if( $.inArray( $(this).val(), wpsr.loc_rules[ master ][ 'children' ] ) == -1 ){
214
+ $(this).remove();
215
+ }
216
+ });
217
+ });
218
+
219
+ if( 'children' in wpsr.loc_rules[ master ] && wpsr.loc_rules[ master ][ 'children' ].length > 0 ){
220
+ $master_rule.find( '.loc_rule_add' ).show()
221
+ }else{
222
+ $master_rule.find( '.loc_rule_add' ).hide()
223
+ }
224
+
225
+ });
226
+
227
+ $( '.loc_page' ).each(function(){
228
+ loc_update_rule_helper( $(this) );
229
+ });
230
+ }
231
+
232
+ var loc_add_rule = function( group, btn ){
233
+ grp_temp = $( '.loc_rules_temp' ).html();
234
+ rule_temp = $( '.loc_rules_temp .loc_group_wrap').html();
235
+
236
+ if( group ){
237
+ btn.closest( '.loc_rules_wrap' ).find('.loc_rules_box').append( grp_temp );
238
+ }else{
239
+ btn.closest( '.loc_group_wrap' ).append( rule_temp );
240
+ }
241
+
242
+ loc_sub_criteria();
243
+ loc_generate_rules();
244
+ }
245
+
246
+
247
+ var loc_remove_rule = function( btn ){
248
+ $rule = btn.parent();
249
+ $grp = $rule.parent();
250
+
251
+ if( $rule.index() == 0 ){
252
+ $grp.empty();
253
+ }
254
+
255
+ $rule.remove();
256
+
257
+ if( $grp.children().length == 0 ){
258
+ $grp.remove();
259
+ }
260
+
261
+ loc_generate_rules();
262
+ }
263
+
264
+ var loc_update_rule_helper = function( pageBtn ){
265
+
266
+ helper = pageBtn.find( 'option:selected' ).attr( 'data-helper' );
267
+
268
+ if( helper == 0 ){
269
+ pageBtn.siblings( '.loc_operator, .loc_value' ).hide();
270
+ }else{
271
+ pageBtn.siblings( '.loc_operator, .loc_value' ).show();
272
+ }
273
+
274
+ placeholder = pageBtn.find( 'option:selected' ).attr( 'data-placeholder' );
275
+ if( placeholder ){
276
+ pageBtn.siblings( '.loc_value' ).attr( 'placeholder', placeholder );
277
+ }
278
+
279
+ }
280
+
281
+ var process_vedit = function(){
282
+ $( '.vedit_wrap' ).each(function(){
283
+
284
+ $cnt_box = $(this).find( '.veditor_content' );
285
+ $vedit_rows = $(this).find( '.veditor ul' );
286
+ cnt = {};
287
+ row = 1;
288
+
289
+ if( $vedit_rows.length > 0 ){
290
+ $vedit_rows.each(function(){
291
+ cnt[row] = {
292
+ 'properties' : {},
293
+ 'buttons': []
294
+ }
295
+
296
+ $(this).children('li').each(function(){
297
+ temp = {};
298
+ bid = $(this).attr( 'data-id' );
299
+ temp[ bid ] = {};
300
+ cnt[row]['buttons'].push( temp );
301
+ });
302
+
303
+ row++;
304
+ });
305
+
306
+ $cnt_box.val( btoa( JSON.stringify( cnt ) ) );
307
+ }
308
+
309
+ });
310
+ }
311
+
312
+ var draggable_opts = {
313
+ revert: 'invalid',
314
+ helper: 'clone',
315
+ cursor: 'move',
316
+ connectToSortable: '.veditor ul',
317
+ containment: 'document',
318
+ start: function( e, ui ){
319
+ $( '.veditor ul' ).addClass( 'drop_target' );
320
+ wpsr_admin_tooltip_close();
321
+ },
322
+ stop: function(){
323
+ $( '.veditor ul' ).removeClass( 'drop_target' );
324
+ }
325
+ };
326
+
327
+ var vedit_sortable_btns = {
328
+ connectWith: ".veditor ul",
329
+ placeholder: 'ui-state-placeholder',
330
+ items: '> li',
331
+ containment: 'document',
332
+ start: function( e, ui ){
333
+ ui.placeholder.width( ui.item.width() );
334
+ ui.item.width( parseInt( ui.item.width() ) + 1 );
335
+ wpsr_admin_tooltip_close();
336
+ }
337
+ }
338
+
339
+ var feature_toggle = function(){
340
+ var $ft_wrap = $( '.feature_wrap' );
341
+
342
+ if( $( '[name="ft_status"]' ).val() == 'enable' ){
343
+ $ft_wrap.removeClass( 'ft_disable' );
344
+ }else{
345
+ $ft_wrap.addClass( 'ft_disable' );
346
+ }
347
+ }
348
+
349
+ var setTemplate = function( id ){
350
+ var tmpl = scr_templates[ id ];
351
+ var features = tmpl[1];
352
+ var text = tmpl[2];
353
+ var featSplit = features.split( ',' );
354
+
355
+ // Set default values
356
+ $( '[data-scr-settings]' ).each(function(){
357
+ var setting = $(this).data( 'scr-settings' );
358
+ if ( setting in scr_default_values ){
359
+ $(this).val( scr_default_values[ setting ] );
360
+ }
361
+ });
362
+
363
+ $.each( featSplit, function( idx, featVal ){
364
+ for( setting in window.scr_api.settings ){
365
+ if( window.scr_api.settings.hasOwnProperty(setting) ){
366
+ if( featVal in window.scr_api.settings[ setting ][ 'options' ] ){
367
+ $( '[data-scr-settings="' + setting + '"]' ).val( featVal );
368
+ }
369
+ }
370
+ }
371
+ });
372
+
373
+ text = ( text == 'no' ) ? 'in' : text;
374
+ $( '[data-scr-settings="text-styles"]' ).val( text );
375
+
376
+ $tmpl_open_btn = $( '.scr_templates_btn' );
377
+ $tmpl_open_btn.trigger( 'click' );
378
+ $tmpl_open_btn.find( 'small' ).remove();
379
+ $tmpl_open_btn.append( '<small>Template applied, you can edit it below</small>' );
380
+ $tmpl_open_btn.find( 'small' ).delay( 6000 ).fadeOut();
381
+ }
382
+
383
+ var changelog_show = function( version ){
384
+ vFile = wpsr.ext_res[ 'wp-socializer-cl' ] + version + '.html';
385
+ $wcPopup = $( '.welcome_wrap' );
386
+ $.get( vFile, function(data){
387
+ $wcPopup.find( '.wc_inner' ).html( data );
388
+ $wcPopup.fadeIn( 'fast' );
389
+ });
390
+ }
391
+
392
+ var changelog_hide = function(){
393
+ var url = wpsr.ajaxurl + '?action=wpsr_admin_ajax&do=close_changelog';
394
+ $.get( url, function( data ){
395
+ if( data.search( /done/g ) == -1 ){
396
+ $( '.welcome_wrap .wc_inner' ).html( 'Failed to close welcome window. <a href="' + url + '" target="_blank">Please click here to close</a>' );
397
+ }else{
398
+ $( '.welcome_wrap' ).fadeOut();
399
+ }
400
+ });
401
+ }
402
+
403
+ // Attach the events
404
+
405
+ $(document).on( 'click', '.btn_selector .sbox_action', function(){
406
+ $parent = $(this).closest( '.sbox_wrap' ).addClass( 'sbox_loading' );
407
+ $sel = $parent.find( '.sbox_val .btn_liname' );
408
+
409
+ if( $sel.length == 0 || $('.btns_created').length == 0 )
410
+ alert( wpsr.js_texts.sel_btn );
411
+
412
+ $.get( wpsr.ajaxurl, {
413
+
414
+ action: 'wpsr_service',
415
+ do: 'new',
416
+ service_id: $sel.attr( 'data-service' ),
417
+ feature: $sel.attr( 'data-feature' )
418
+
419
+ }).done(function( data ){
420
+
421
+ $parent.removeClass( 'sbox_loading' );
422
+ $( data['html'] ).hide().appendTo( '.btns_created' ).fadeTo( 'slow', 1 ).draggable( draggable_opts );
423
+
424
+ });
425
+
426
+ });
427
+
428
+ // Button edit
429
+ $(document).on( 'click', '.btn_edit', function(){
430
+
431
+ $parent = $(this).parent();
432
+ service = $parent.attr( 'data-service' );
433
+ wpsr_service = wpsr.services[ service ];
434
+
435
+ // Tooltip properties
436
+ tt_props = {
437
+ parent: $parent,
438
+ content: {
439
+ url: wpsr.ajaxurl,
440
+ data: {
441
+ action: 'wpsr_service',
442
+ do: 'edit',
443
+ service_id: service,
444
+ button_id: $parent.attr( 'data-id' )
445
+ }
446
+ }
447
+ };
448
+
449
+ if( typeof wpsr_service[ 'settings' ] !== 'undefined' && typeof wpsr_service[ 'settings' ][ 'size' ] !== 'undefined' ){
450
+ ss = wpsr.services[ service ][ 'settings' ][ 'size' ];
451
+ if ( ss.match( /x/i ) != null ){
452
+ tt_props[ 'width' ] = ss.split( 'x' )[0];
453
+ tt_props[ 'height' ] = ss.split( 'x' )[1];
454
+ }else{
455
+ tt_props[ 'class' ] = 'wpsr_tooltip_popup';
456
+ tt_props[ 'name' ] = wpsr_service[ 'name' ];
457
+ }
458
+ }
459
+
460
+ // Show the tooltip
461
+ wpsr_admin_tooltip(tt_props);
462
+ });
463
+
464
+ $(document).on( 'submit', '.wpsr_tooltip_wrap form', function(e){
465
+ e.preventDefault();
466
+
467
+ $tt = $(this).parent().parent().addClass( 'loading' );
468
+ post_url = $(this).attr( 'action' );
469
+ button_title = $(this).find( 'input[name="o[title]"]' ).val()
470
+ button_id = $(this).find( 'input[name=button_id]' ).val()
471
+
472
+ $callbacks = $( this ).find( '[data-callback]' );
473
+ if( $callbacks.length > 0 ){
474
+ $callbacks.each(function(){
475
+
476
+ $ele = $( this );
477
+ cb = $ele.data( 'callback' );
478
+
479
+ if( typeof window[ cb ] !== 'undefined' ){
480
+ window[ cb ]( $ele );
481
+ }
482
+
483
+ });
484
+ }
485
+
486
+ $.post( post_url, $(this).serialize() ).done(function( data ){
487
+
488
+ $( '.ui_btn[data-id="' + button_id + '"] .btn_name' ).attr( 'data-title', button_title );
489
+ $tt.removeClass( 'loading' );
490
+ $( '.btn_settings_status' ).fadeIn().delay( 5000 ).fadeOut();
491
+
492
+ });
493
+
494
+ });
495
+
496
+
497
+ $(document).on('submit', function(e){
498
+ process_vedit();
499
+ loc_generate_rules();
500
+ });
501
+
502
+ $(document).on( 'click', '.vedit_preview_btn', function(e){
503
+ e.preventDefault();
504
+
505
+ $vedit = $(this).closest( '.vedit_wrap' );
506
+ $iframe = $vedit.find( '.vedit_preview_iframe' );
507
+ $iframe.fadeTo( 'slow', 0.5 );
508
+ $(this).text( $(this).data('refresh') );
509
+ action = $(this).data( 'action' );
510
+
511
+ process_vedit()
512
+
513
+ template = $vedit.find( '.veditor_content' ).val();
514
+ $iframe.attr( 'src', wpsr.ajaxurl + '?action=' + action + '&template=' + template );
515
+ $iframe.load(function(){
516
+ $(this).fadeTo( 'slow', 1 );
517
+ });
518
+ });
519
+
520
+ $(document).on( 'change', '.loc_rule_select', function(e){
521
+
522
+ $parent = $(this).parent();
523
+ $parent.find( '.loc_rule_selector, .loc_btn_menu' ).remove();
524
+
525
+ $.get( wpsr.ajaxurl, {
526
+
527
+ action: 'wpsr_location_rules',
528
+ rule_id: $(this).val()
529
+
530
+ }).done(function( data ){
531
+
532
+ $parent.append( '<span class="loc_rule_selector">' + data + '</span>' );
533
+
534
+ });
535
+
536
+ });
537
+
538
+ $(document).on( 'click', '.loc_rules_menu', function(){
539
+ $(this).siblings('.loc_rule_selector').fadeToggle('fast');
540
+ });
541
+
542
+ $(document).on( 'click', '.loc_rules_remove', function(){
543
+ $(this).parent().remove();
544
+ });
545
+
546
+ $(document).on( 'click', '.add_loc_rule', function(e){
547
+ e.preventDefault();
548
+
549
+ rule = $('.loc_rules_temp').html();
550
+ rule = rule.replace( '%rule_id%', $(this).attr( 'data-id' ) );
551
+ $(this).siblings( '.loc_rules_list' ).append( '<li>' + rule + '</li>' );
552
+
553
+ });
554
+
555
+ $( document ).on( 'click' , '.btn_delete', function(){
556
+
557
+ if ( $(this).closest( '.btns_created' ).length > 0 ){
558
+ reply = confirm( wpsr.js_texts.del_btn );
559
+ if( reply == true ){
560
+ btn_id = $(this).parent().attr( 'data-id' );
561
+ the_btn = $('.ui_btn[data-id=' + btn_id + ']');
562
+
563
+ $.ajax({
564
+ url: wpsr.ajaxurl,
565
+ data: {
566
+ action: 'wpsr_service',
567
+ do: 'delete',
568
+ service_id: the_btn.attr( 'data-service' ),
569
+ button_id: btn_id
570
+ }
571
+ }).done(function(d){
572
+ if( d == '1' ){
573
+ the_btn.fadeOut('slow', function(){
574
+ the_btn.remove();
575
+ });
576
+ }else{
577
+ console.info( 'Delete button failed: ' + d );
578
+ }
579
+ });
580
+
581
+ }
582
+ }else{
583
+ $(this).parent().remove();
584
+ }
585
+
586
+ });
587
+
588
+ $( document ).on( 'click', '.btn_settings_save', function(){
589
+ $( '.wpsr_tooltip_cnt form' ).submit();
590
+ });
591
+
592
+ $( document ).on( 'click', '.vedit_add_row', function(){
593
+ $('<ul></ul>').sortable( vedit_sortable_btns ).appendTo( (this).closest( '.veditor' ) );
594
+ });
595
+
596
+ $(document).on( 'click', '.vedit_delete_row', function(e){
597
+ $(this).closest( 'ul' ).remove();
598
+ });
599
+
600
+ $( document ).on( 'mouseenter', '.veditor > ul', function(){
601
+
602
+ $vedit_menu = $('.vedit_menu').clone().show();
603
+ if( $(this).parent().children().length == 1 ){
604
+ $vedit_menu.find( '.vedit_delete_row' ).remove();
605
+ }
606
+ $vedit_menu.appendTo($(this));
607
+ });
608
+
609
+ $( document ).on( 'mouseleave', '.veditor > ul', function(){
610
+ $(this).find( '.vedit_menu' ).remove();
611
+ });
612
+
613
+ $(document).on( 'click', '.loc_group_add', function(e){
614
+ e.preventDefault();
615
+ loc_add_rule( true, $(this) );
616
+ });
617
+
618
+ $(document).on( 'click', '.loc_rule_add', function(e){
619
+ e.preventDefault();
620
+ loc_add_rule( false, $(this) );
621
+ });
622
+
623
+ $(document).on( 'click', '.loc_rule_remove', function(e){
624
+ e.preventDefault();
625
+ loc_remove_rule( $(this) );
626
+ });
627
+
628
+ $(document).on( 'click', '.loc_value', function(e){
629
+ $list = $(this).siblings( '.loc_page' )
630
+ val = $list.val();
631
+ helper = $list.find( 'option:selected' ).attr( 'data-helper' );
632
+
633
+ if( helper == "1" ){
634
+ wpsr_admin_tooltip({
635
+ parent: $(this),
636
+ class: 'loc_rules_tt',
637
+ height: '200px',
638
+ content: {
639
+ url: wpsr.ajaxurl,
640
+ data: {
641
+ action: 'wpsr_location_rules',
642
+ rule_id: val,
643
+ selected: $(this).val()
644
+ }
645
+ }
646
+ });
647
+ }
648
+ });
649
+
650
+ $(document).on( 'click', '.loc_rules_tt input[type="checkbox"]', function(e){
651
+ temp = [];
652
+ $(this).closest( '.loc_rules_tt' ).find( 'input[type="checkbox"]' ).each(function(){
653
+ if( $(this).is(':checked') )
654
+ temp.push( $(this).val() );
655
+ });
656
+ document.wpsr_tt_parent.val( temp );
657
+ });
658
+
659
+ $(document).on( 'change', '.loc_page', function(e){
660
+ loc_update_rule_helper( $(this) );
661
+ wpsr_admin_tooltip_close();
662
+ $(this).siblings( '.loc_value' ).val( '' );
663
+
664
+ if( $(this).closest( '.loc_rule_wrap' ).index() == 0 ){
665
+ $(this).closest( '.loc_group_wrap' ).children().not(':first-child' ).remove();
666
+ loc_sub_criteria();
667
+ }
668
+
669
+ });
670
+
671
+ $(document).on( 'click', '.sbox_inner', function(){
672
+ $(this).toggleClass( 'sbox_open' );
673
+ });
674
+
675
+ $(document).on( 'change', '[name="ft_status"]', function(){
676
+ feature_toggle();
677
+ });
678
+
679
+ $(document).on( 'click', '.sharebar_preview_btn', function(e){
680
+ e.preventDefault();
681
+
682
+ process_vedit();
683
+
684
+ $iwrap = $( '.sharebar_preview_iwrap' );
685
+ $iframe = $( '.sharebar_preview_iwrap > iframe' );
686
+ form_data = $( '#sharebar_settings' ).serialize();
687
+
688
+ $( 'body' ).addClass( 'hide_scrollbar' );
689
+ $iwrap.show();
690
+ $iframe.attr( 'src', wpsr.ajaxurl + '?action=wpsr_preview_template_sharebar&' + form_data );
691
+
692
+ });
693
+
694
+ $(document).on( 'click', '.sharebar_preview_close', function(){
695
+ wpsr_sharebar_preview_close();
696
+ });
697
+
698
+ //Social buttons item properties
699
+ $current_item = '';
700
+
701
+ $( document ).on( 'click', '.item_delete', function(){
702
+ $(this).parent().remove();
703
+ });
704
+
705
+ $( document ).on( 'click', '.item_popup_close', function(){
706
+ $(this).parent().fadeOut();
707
+ });
708
+
709
+ $( document ).on( 'click', '.item_settings', function(){
710
+
711
+ $item = $(this).parent();
712
+ $data = $item.data();
713
+ $current_item = $item;
714
+ console.log( $data );
715
+
716
+ $popup = $( '.item_popup' ).show();
717
+ $popup.find( 'h4' ).text( sb_sites[ $item.data( 'id' ) ][ 'name' ] );
718
+ $cnt = $( '.item_popup_cnt' ).empty().append( '<table class="form-table"></table>' );
719
+ $tbl = $cnt.find( 'table' );
720
+
721
+ for( opt in $data ){
722
+
723
+ if( opt.search( 'opt' ) != -1 ){
724
+
725
+ opt_val = $data[ opt ];
726
+ the_opt = opt.replace( 'opt_', '' );
727
+
728
+ if( typeof sb_site_options[ the_opt ] === 'undefined' )
729
+ continue;
730
+
731
+ $wrap = $( '<tr><th></th><td></td></tr>' );
732
+ $checkbox = $( '<input type="checkbox" value="1" />' );
733
+ $text = $( '<input type="text" />' );
734
+
735
+ helper = sb_site_options[ the_opt ][ 'helper' ];
736
+ type = sb_site_options[ the_opt ][ 'type' ];
737
+ placeholder = ( 'placeholder' in sb_site_options[ the_opt ] ) ? sb_site_options[ the_opt ][ 'placeholder' ] : '';
738
+
739
+ $the_input = $( '<i/>' );
740
+
741
+ if( type == 'checkbox' ){
742
+ if( opt_val == '1' || opt_val == 'true' )
743
+ $checkbox.attr('checked', 'checked');
744
+
745
+ $the_input = $checkbox.attr( 'data-id', the_opt );
746
+ }
747
+
748
+ if( type == 'text' ){
749
+ $the_input = $text.val( opt_val ).attr( 'data-id', the_opt );
750
+ }
751
+
752
+ $wrap.find( 'th' ).append( helper );
753
+ $wrap.find( 'td' ).append( $the_input );
754
+
755
+ if( placeholder != '' )
756
+ $wrap.find( 'td' ).append( '<small>' + placeholder + '</small>' );
757
+
758
+ $tbl.append( $wrap );
759
+
760
+ }
761
+ }
762
+
763
+ });
764
+
765
+ $( document ).on( 'click', '.item_popup_save', function( e ){
766
+ e.preventDefault();
767
+ if( $( $current_item ).length ){
768
+ $item = $( $current_item );
769
+ $popup = $( this ).closest( '.item_popup' );
770
+ $inputs = $popup.find( 'tr input' );
771
+
772
+ $inputs.each( function(){
773
+
774
+ $i = $( this );
775
+ id = $i.data( 'id' );
776
+ type = $i.attr( 'type' );
777
+ value = '';
778
+
779
+ if( type == 'checkbox' && $i.is( ':checked' ) )
780
+ value = '1';
781
+
782
+ if( type == 'text' )
783
+ value = $i.val();
784
+
785
+ $item.data( 'opt_' + id, value );
786
+ });
787
+
788
+ $popup.fadeOut();
789
+
790
+ }
791
+ });
792
+
793
+ $( document ).on( 'keyup', '.list_search', function( e ){
794
+ $list = $( $( this ).data( 'list' ) );
795
+ if( $list.length > 0 ){
796
+ val = $( this ).val();
797
+
798
+ $list.children().each(function(){
799
+ $item = $(this);
800
+ text = $item.text().toLowerCase();
801
+ if( text.search( val.toLowerCase() ) == -1 ){
802
+ $item.hide();
803
+ }else{
804
+ $item.show();
805
+ }
806
+ });
807
+ }
808
+ });
809
+
810
+ $( document ).on( 'change', '.sb_features_list', function( e ){
811
+ $list = $( $( this ).data( 'list' ) );
812
+
813
+ if( $list.length > 0 ){
814
+ val = $( this ).val();
815
+
816
+ $list.children().each(function(){
817
+ $item = $(this);
818
+ features_split = $item.data( 'features' ).split( ',' );
819
+
820
+ if( $.inArray( val, features_split ) > -1 || val == 'all' ){
821
+ $item.show();
822
+ }else{
823
+ $item.hide();
824
+ }
825
+ });
826
+ }
827
+ });
828
+
829
+ $( document ).on( 'click', '.mini_section_select', function( e ){
830
+ $parent = $(this).parent();
831
+ $parent.find( '.mini_section' ).slideToggle();
832
+ e.preventDefault();
833
+ });
834
+
835
+ $( document ).on( 'click', '.scr_saction', function(){
836
+ $(this).next().slideToggle();
837
+ $(this).toggleClass( 'scr_btn_close' );
838
+ });
839
+
840
+ $( document ).on( 'click', '.scr_templates_btn', function(){
841
+ $btn = $(this);
842
+
843
+ var init_socializer = function(){
844
+ if( typeof $btn.data( 'scr_init' ) === 'undefined' ){
845
+ $tmpl_wrap = $( '.scr_templates' ).empty();
846
+ $.each( scr_templates, function( idx, tmpl ){
847
+ $tmpl_wrap.append( '<li class="scr_tmpl_wrap" data-tmpl-id="' + idx + '"><div class="scr_tmpl" data-sites="facebook,twitter,rss,googleplus,print" data-features="' + tmpl[1] + '" data-text="' + tmpl[2] + '" ></div><small>' + tmpl[0] + '</small></li>' );
848
+ });
849
+
850
+ if( window.socializer ){
851
+ socializer( '.scr_templates .scr_tmpl' );
852
+ $btn.data( 'scr_init', true );
853
+ }
854
+ }
855
+ }
856
+
857
+ if( !window.scr_loaded ){
858
+ wpsr_load_css( 'socializer_css', wpsr.ext_res[ 'socializer-css' ] );
859
+ $.getScript( wpsr.ext_res[ 'socializer-js' ] ).done(function(){
860
+ init_socializer();
861
+ });
862
+ $.get( wpsr.ext_res[ 'socializer-api' ] ).done(function( data ){
863
+ window.scr_api = data;
864
+ });
865
+ window.scr_loaded = true;
866
+ }
867
+
868
+ init_socializer();
869
+
870
+ });
871
+
872
+ $( document ).on( 'click', '.scr_tmpl_wrap', function(){
873
+ setTemplate( $(this).data( 'tmpl-id' ) );
874
+ });
875
+
876
+ $( document ).on( 'click', '.btn_shortcode', function(){
877
+ this.select();
878
+ });
879
+
880
+ $( document ).on( 'click', '.fb_add', function(){
881
+ $sel_list = $( '.fb_selected' );
882
+ sel_val = $( '.fb_list' ).val();
883
+ props = social_buttons[ sel_val ];
884
+ li_tmpl = window.li_template;
885
+
886
+ li_tmpl = li_tmpl.replace( /%id%/g, sel_val );
887
+ li_tmpl = li_tmpl.replace( /%color%/g, props[ 'colors' ][0] );
888
+ li_tmpl = li_tmpl.replace( /%name%/g, props[ 'name' ] );
889
+ li_tmpl = li_tmpl.replace( /%icon%/g, props[ 'icon' ] );
890
+ li_tmpl = li_tmpl.replace( /%url%/g, '' );
891
+ li_tmpl = li_tmpl.replace( /%iurl%/g, '' );
892
+ li_tmpl = li_tmpl.replace( /%text%/g, '' );
893
+
894
+ $sel_list.append( li_tmpl );
895
+
896
+ });
897
+
898
+ var process_fb_editor = function(){
899
+
900
+ cnt = [];
901
+ prev = '';
902
+
903
+ $( '.fb_selected li' ).each(function(){
904
+ sid = $(this).data( 'id' );
905
+ burl = $(this).find( '.fb_item_url' ).val();
906
+ iurl = $(this).find( '.fb_icon_url' ).val();
907
+ text = $(this).find( '.fb_btn_text' ).val();
908
+ btn = {};
909
+
910
+ btn[ sid ] = {
911
+ 'url': burl,
912
+ 'icon': iurl,
913
+ 'text': text
914
+ };
915
+
916
+ cnt.push( btn );
917
+
918
+ // For preview
919
+ pcolor = social_buttons[ sid ][ 'colors' ][0];
920
+ pname = social_buttons[ sid ][ 'name' ];
921
+ picon = social_buttons[ sid ][ 'icon' ];
922
+
923
+ prev += '<li style="background-color:' + pcolor + '" title="' + pname + '"><i class="fa fa-' + picon + '"></i></li>';
924
+
925
+ });
926
+
927
+ template = btoa( JSON.stringify( cnt ) );
928
+ $( '.fb_template' ).val( template );
929
+
930
+ if( prev == '' && window.wpsr ){
931
+ prev = '<span>' + window.wpsr.js_texts.fb_empty + '</span>';
932
+ }
933
+
934
+ return '<ul class="fb_preview">' + prev + '</ul>';
935
+ }
936
+
937
+ $( document ).on( 'click', '.fb_item_remove', function(e){
938
+ e.preventDefault();
939
+ $(this).closest( 'li' ).remove();
940
+ });
941
+
942
+ var process_tsb_editor = function(){
943
+ selected = [];
944
+
945
+ $( '.ssb_selected_list li' ).each(function(){
946
+ selected.push( $(this).data( 'id' ) );
947
+ });
948
+
949
+ $( '.ssb_template' ).val( btoa( JSON.stringify( selected ) ) );
950
+
951
+ }
952
+
953
+ $( document ).on( 'click', '.ssb_add', function(e){
954
+ e.preventDefault();
955
+ $slist = $( '.ssb_selected_list' );
956
+ $list = $( '.ssb_list' );
957
+ sel_val = $list.val();
958
+
959
+ $slist.find( '.ssb_empty' ).remove();
960
+ $slist.append( '<li title="' + sb_sites[ sel_val ][ 'name' ] + '" data-id="' + sel_val + '"><i class="fa fa-' + sb_sites[ sel_val ][ 'icon' ] + '"></i><span class="ssb_remove">x</span></li>' );
961
+
962
+ process_tsb_editor();
963
+
964
+ });
965
+
966
+ $( document ).on( 'click', '.ssb_remove', function(){
967
+ $(this).parent().remove();
968
+ process_tsb_editor();
969
+ });
970
+
971
+ // Htip
972
+ $( document ).on( 'mouseover', '[data-htip]', function(){
973
+ $parent = $(this);
974
+ $htip = $( '<div class="htip"></div>' );
975
+ html = $parent.data( 'htip' );
976
+
977
+ if( html.search( '://' ) != -1 ){
978
+ $htip.html( '<img src="' + $parent.data( 'htip' ) + '"/>' );
979
+ }else{
980
+ $htip.html( $parent.data( 'htip' ) );
981
+ }
982
+
983
+ $htip.appendTo( 'body' ).hide();
984
+
985
+ var set_position = function( $parent, $htip ){
986
+ offset = $parent.offset();
987
+ calc_left = offset.left - ( $htip.outerWidth()/2 ) + ($parent.outerWidth()/2);
988
+ calc_top = offset.top - $htip.outerHeight() - ($parent.outerHeight()/2);
989
+
990
+ $htip.css({
991
+ 'left': calc_left,
992
+ 'top': calc_top
993
+ }).show();
994
+ };
995
+
996
+ if( $htip.find( 'img' ).length > 0 ){
997
+ $htip.find( 'img' ).load(function(){
998
+ set_position( $parent, $htip );
999
+ });
1000
+ }else{
1001
+ set_position( $parent, $htip );
1002
+ }
1003
+
1004
+ });
1005
+
1006
+ $( document ).on( 'click', '.collapse_head', function(){
1007
+ $( '.collapse_head+.form-table' ).fadeOut( 'fast' );
1008
+ $(this).next().fadeToggle();
1009
+ });
1010
+
1011
+ $( document ).on( 'mouseleave', '[data-htip]', function(){
1012
+ $( '.htip' ).remove();
1013
+ });
1014
+
1015
+ //Button selector events
1016
+ $(document).on( 'click', '.sbox_inner li', function(){
1017
+ $wrap = $(this).closest( '.sbox_wrap' );
1018
+ $wrap.find('.sbox_val').html( $(this).html() );
1019
+ $wrap.find('.sbox_field').val( $(this).attr( 'data-val' ) );
1020
+ $(this).parent().hide();
1021
+ });
1022
+
1023
+ $( document ).on( 'click', '.template_tab li', function(){
1024
+ id = $(this).index() + 1;
1025
+ $('.template_tab li').removeClass( 'templ_tab_active' );
1026
+ $('.template_wrap').hide();
1027
+ $('.template_wrap[data-id="' + id + '"]').fadeIn( 'slow' );
1028
+ $(this).addClass( 'templ_tab_active' );
1029
+ });
1030
+
1031
+ $( document ).on( 'click', '.postbox h3', function(){
1032
+ $(this).next().fadeToggle( 'fast' );
1033
+ $(this).toggleClass( 'pbclosed' );
1034
+ });
1035
+
1036
+ // Popup editor on click events
1037
+ $( document ).on( 'click', '.wpsr_ppe_save', function(){
1038
+ mode = $(this).data( 'mode' );
1039
+
1040
+ if( self != top ){
1041
+
1042
+ cnt_id = $(this).data( 'cnt-id' );
1043
+ prev_id = $(this).data( 'prev-id' );
1044
+
1045
+ cnt_val = '';
1046
+ prev_val = '';
1047
+
1048
+ if( mode == 'widget' ){
1049
+ process_vedit();
1050
+
1051
+ cnt_val = $( '#wpsr_pp_editor .veditor_content' ).val();
1052
+ prev_val = $( '#wpsr_pp_editor .veditor' )[0].outerHTML;
1053
+
1054
+ }
1055
+
1056
+ if( mode == 'followbar' ){
1057
+ prev_val = process_fb_editor();
1058
+ cnt_val = $( '.fb_template' ).val();
1059
+ }
1060
+
1061
+ window.parent.document.getElementById( cnt_id ).value = cnt_val;
1062
+ window.parent.document.getElementById( prev_id ).innerHTML = prev_val;
1063
+
1064
+ if( window.parent.wpsr_ipopup_close ){
1065
+ window.parent.wpsr_ipopup_close();
1066
+ }
1067
+
1068
+ }
1069
+ });
1070
+
1071
+ $( document ).on( 'click', '.wpsr_ppe_cancel', function(){
1072
+ if( window.parent.wpsr_ipopup_close ){
1073
+ window.parent.wpsr_ipopup_close();
1074
+ }
1075
+ });
1076
+
1077
+ $( document ).on( 'click', '.wpsr_ppe_fb_open', function(e){
1078
+ e.preventDefault();
1079
+
1080
+ if( wpsr.ajaxurl ){
1081
+
1082
+ cnt_id = $( this ).attr( 'data-cnt-id' );
1083
+ cnt = $( '#' + cnt_id ).val();
1084
+ prev_id = $( this ).attr( 'data-prev-id' );
1085
+ qstring = 'action=wpsr_followbar_editor&template=' + cnt + '&cnt_id=' + cnt_id + '&prev_id=' + prev_id;
1086
+
1087
+ wpsr_ipopup_show( wpsr.ajaxurl + '?' + qstring, '500px', '80%' );
1088
+
1089
+ }
1090
+ });
1091
+
1092
+ $( document ).on( 'click', '.close_changelog_btn', function(e){
1093
+ e.preventDefault();
1094
+ changelog_hide();
1095
+ });
1096
+
1097
+ $( document ).on( 'click', '.share_wpsr a:not(".no_pp")', function(e){
1098
+ e.preventDefault();
1099
+ wpsr_open_popup( $(this).attr( 'href' ), 'Share WP Socializer', 800, 400 );
1100
+ });
1101
+
1102
+ // Initinitinitinitinit
1103
+ init();
1104
+
1105
+ });
1106
+ })( jQuery );
1107
+
1108
+ function wpsr_admin_tooltip( o ){
1109
+
1110
+ if( !o.parent.is( document.wpsr_tt_parent ) ){
1111
+ wpsr_admin_tooltip_close();
1112
+ }else{
1113
+ return false;
1114
+ }
1115
+
1116
+ $tt = jQuery('<div class="wpsr_tooltip_wrap"><span class="dashicons dashicons-no-alt wpsr_tooltip_close" title="' + wpsr.js_texts.close + '"></span><div class="wpsr_tooltip_cnt"></div></div>');
1117
+
1118
+ $parent = o.parent;
1119
+ document.wpsr_tt_parent = $parent;
1120
+
1121
+ if( o.class ) $tt.addClass( o.class );
1122
+ if( o.width ) $tt.width( o.width );
1123
+ if( o.height ) $tt.height( o.height );
1124
+ if( o.name ) $tt.attr( 'data-name', o.name );
1125
+
1126
+ $tt.css({
1127
+ position: 'absolute',
1128
+ top: $parent.offset().top + $parent.outerHeight(),
1129
+ left: $parent.offset().left
1130
+ });
1131
+
1132
+ $tt.appendTo( 'body' );
1133
+
1134
+ if( typeof o.content == 'object' ){
1135
+
1136
+ $tt.addClass( 'loading' );
1137
+
1138
+ jQuery.ajax(o.content).done(function(data){
1139
+ $tt.removeClass( 'loading' );
1140
+ $tt.find('.wpsr_tooltip_cnt').html( data );
1141
+
1142
+ $footer = $tt.find( '.btn_settings_footer' );
1143
+ if( $footer.length > 0 ){
1144
+ $footer.appendTo( '.wpsr_tooltip_wrap' );
1145
+ $tt.find('.wpsr_tooltip_cnt').addClass( 'tt_has_footer' );
1146
+ }
1147
+
1148
+ if( jQuery.fn.wpColorPicker ){
1149
+ jQuery( '.wp-color' ).wpColorPicker();
1150
+ }
1151
+
1152
+ });
1153
+
1154
+ }else{
1155
+
1156
+ $tt.find('.wpsr_tooltip_cnt').html( o.content );
1157
+
1158
+ }
1159
+
1160
+ if( o.class && o.class.search( 'wpsr_tooltip_popup' ) != -1 )
1161
+ jQuery( 'body' ).addClass( 'hide_scrollbar' );
1162
+
1163
+ // Positioning adjust
1164
+ winwid = jQuery(window).width();
1165
+ ttwid = $tt.offset().left + $tt.outerWidth();
1166
+
1167
+ if( winwid < ttwid ){
1168
+ $tt.css( 'margin-left', -(ttwid+70-winwid));
1169
+ }
1170
+
1171
+ jQuery('.wpsr_tooltip_close').click(function(){
1172
+ wpsr_admin_tooltip_close();
1173
+ });
1174
+
1175
+ }
1176
+
1177
+ function wpsr_admin_tooltip_close(){
1178
+ jQuery('.wpsr_tooltip_close').off( 'click' );
1179
+ jQuery('.wpsr_tooltip_wrap').remove();
1180
+ jQuery( 'body' ).removeClass( 'hide_scrollbar' );
1181
+ document.wpsr_tt_parent = false;
1182
+ }
1183
+
1184
+ function wpsr_list_selector_init(){
1185
+
1186
+ item_width = jQuery( '.list_available li' ).first().width();
1187
+
1188
+ jQuery( '.list_available li' ).draggable({
1189
+ revert: 'invalid',
1190
+ helper: 'clone',
1191
+ connectToSortable: '.list_selected',
1192
+ start: function(){
1193
+ jQuery( '.list_selected' ).addClass( 'drop_target' );
1194
+ },
1195
+ stop: function( e, ui ){
1196
+ jQuery( '.list_selected' ).removeClass( 'drop_target' );
1197
+ ui.helper.width( 'auto' );
1198
+ }
1199
+ });
1200
+ jQuery( '.list_selected' ).sortable().disableSelection();
1201
+
1202
+ }
1203
+
1204
+ function wpsr_sb_process_list( $list ){
1205
+ $input = jQuery( $list.data( 'input' ) );
1206
+ temp = [];
1207
+
1208
+ $list.children().each(function(){
1209
+ $item = jQuery( this );
1210
+ id = $item.data( 'id' );
1211
+ data = $item.data();
1212
+ temp_item = {};
1213
+ temp_item[ id ] = {};
1214
+
1215
+ for( d in data ){
1216
+ if( d.search( 'opt_' ) != -1 ){
1217
+ opt = d.replace( 'opt_', '' );
1218
+ val = data[ d ];
1219
+ temp_item[ id ][ opt ] = val;
1220
+ }
1221
+ }
1222
+ temp.push( temp_item );
1223
+ });
1224
+
1225
+ //console.log( temp );
1226
+ $input.val( btoa( JSON.stringify( temp ) ) );
1227
+
1228
+ }
1229
+
1230
+ function wpsr_st_process_list( $list ){
1231
+ $input = jQuery( $list.data( 'input' ) );
1232
+ temp = [];
1233
+
1234
+ $list.children().each(function(){
1235
+ temp.push( jQuery( this ).data( 'id' ) );
1236
+ });
1237
+
1238
+ console.log( temp );
1239
+ $input.val( btoa( JSON.stringify( temp ) ) );
1240
+ }
1241
+
1242
+ function wpsr_load_css( id, css ){
1243
+ if( !document.getElementById( id ) ){
1244
+ var head = document.getElementsByTagName('head')[0];
1245
+ var link = document.createElement('link');
1246
+ link.id = id;
1247
+ link.rel = 'stylesheet';
1248
+ link.type = 'text/css';
1249
+ link.href = css;
1250
+ link.media = 'all';
1251
+ head.appendChild(link);
1252
+ }
1253
+ }
1254
+
1255
+ function wpsr_load_js( id, js, callback ){
1256
+ if( !jQuery.fn.trumbowyg ){
1257
+ jQuery.getScript( js, function(){
1258
+ callback();
1259
+ });
1260
+ }else{
1261
+ callback();
1262
+ }
1263
+ }
1264
+
1265
+ function wpsr_sharebar_preview_close(){
1266
+ jQuery( '.sharebar_preview_iwrap' ).hide();
1267
+ jQuery( 'body' ).removeClass( 'hide_scrollbar' );
1268
+ }
1269
+
1270
+ function wpsr_open_popup( url, title, w, h ){
1271
+ var left = ( screen.width/2 )-( w/2 ),
1272
+ top = ( screen.height/2 )-( h/2 );
1273
+
1274
+ return window.open( url, title, 'toolbar=no,location=no,menubar=no,scrollbars=no,width='+w+',height='+h+',top='+top+',left='+left );
1275
+ }
admin/js/script_widgets.js ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function($){
2
+ jQuery(document).ready(function(){
3
+
4
+ var init = function(){
5
+ loadColorPicker();
6
+ }
7
+
8
+ var loadColorPicker = function(){
9
+ if( $.fn.wpColorPicker ){
10
+ $( '.wpsr-color-picker' ).wpColorPicker();
11
+ }
12
+ }
13
+
14
+ $(document).ajaxComplete(function(){
15
+ loadColorPicker();
16
+ });
17
+
18
+ $( document ).on( 'change', '.wpsr_widget_selector', function(){
19
+ $form = $(this).closest( 'form' );
20
+ $form.find( '.wpsr_widget_wrap' ).fadeTo( 'fast', 0.3, function(){
21
+ $form.find( '.widget-control-save' ).trigger( 'click' );
22
+ });
23
+ });
24
+
25
+ $( document ).on( 'click', '.wpsr_ppe_widget_open', function(e){
26
+ e.preventDefault();
27
+
28
+ if( wpsr_ppe_ajax != '' ){
29
+
30
+ wtmpl_cnt_id = $( this ).attr( 'data-wtmpl-cnt-id' );
31
+ wtmpl_cnt = $( '#' + wtmpl_cnt_id ).val();
32
+ wtmpl_prev_id = $( this ).attr( 'data-wtmpl-prev-id' );
33
+ qstring = 'action=wpsr_widget_buttons&template=' + wtmpl_cnt + '&cnt_id=' + wtmpl_cnt_id + '&prev_id=' + wtmpl_prev_id;
34
+
35
+ wpsr_ipopup_show( wpsr_ppe_ajax + '?' + qstring, '1200px', '80%' );
36
+
37
+ }
38
+ });
39
+
40
+ $( document ).on( 'click', '.wpsr_ppe_fb_open', function(e){
41
+ e.preventDefault();
42
+
43
+ if( wpsr_ppe_ajax ){
44
+
45
+ wtmpl_cnt_id = $( this ).attr( 'data-wtmpl-cnt-id' );
46
+ wtmpl_cnt = $( '#' + wtmpl_cnt_id ).val();
47
+ wtmpl_prev_id = $( this ).attr( 'data-wtmpl-prev-id' );
48
+ qstring = 'action=wpsr_followbar_editor&template=' + wtmpl_cnt + '&cnt_id=' + wtmpl_cnt_id + '&prev_id=' + wtmpl_prev_id;
49
+
50
+ wpsr_ipopup_show( wpsr_ppe_ajax + '?' + qstring, '500px', '80%' );
51
+
52
+ }
53
+ });
54
+
55
+ // Initinitinitinitinit
56
+ init();
57
+
58
+ });
59
+ })( jQuery );
admin/js/share.php DELETED
@@ -1,75 +0,0 @@
1
- <html>
2
- <head>
3
- <style type="text/css">
4
- <!--
5
- body {
6
- font: 13px Arial, Helvetica, sans-serif;
7
- padding: 10px;
8
- overflow: hidden;
9
- }
10
- .txtBox{
11
- font-size: 20px;
12
- padding: 5px;
13
- width: 25%;
14
- }
15
- p {
16
- font-size: 12px;
17
- }
18
- #close{
19
- background: #dfdfdf;
20
- height: 21px;
21
- width: 15px;
22
- top: -5px;
23
- right: -5px;
24
- position: absolute;
25
- padding: 8px 5px 1px 10px;
26
- -webkit-border-radius: 35px;
27
- -moz-border-radius: 35px;
28
- border-radius: 35px;
29
- cursor: pointer;
30
- }
31
- -->
32
- </style>
33
-
34
- </head>
35
- <body>
36
- <?php $id = intval($_GET['i']); ?>
37
-
38
- <div id="close" onClick="parent.wpsr_closeiframe();">x</div>
39
-
40
- <?php if ($id == 1): ?>
41
- <div id="donate">
42
- <h3>Donate and support this plugin !</h3>
43
- <p>If you like this plugin, then just make a small donation for this plugin.</p>
44
- <p style="font-size:10px">This plugin is free with premium features, so your donation will encourage me to work on the plugin to add more features.</p>
45
- <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
46
- <input type="hidden" name="cmd" value="_xclick">$&nbsp;
47
- <input type="number" name="amount" class="txtBox" value="20">
48
- <input type="hidden" name="business" value="donations@aakashweb.com">
49
- <input type="hidden" name="lc" value="US">
50
- <input type="hidden" name="item_name" value="Donation for WP Socializer plugin">
51
- <input type="hidden" name="button_subtype" value="services">
52
- <input type="hidden" name="no_note" value="1">
53
- <input type="hidden" name="no_shipping" value="1">
54
- <input type="hidden" name="rm" value="1">
55
- <input type="hidden" name="currency_code" value="USD">
56
- <input align="right" src="../images/paypal.gif" name="submit" alt="PayPal - The safer, easier way to pay online!" type="image" border="0">
57
- </form>
58
-
59
- </div>
60
- <?php endif; ?>
61
-
62
- <?php if ($id == 2): ?>
63
- <div id="share">
64
- <h3>Share this plugin !!</h3>
65
- <div class="addthis_toolbox addthis_default_style">
66
- <a class="addthis_button_facebook_like" fb:like:layout="button_count" fb:like:href="http://facebook.com/aakashweb"></a>
67
- <a class="addthis_button_google_plusone" g:plusone:size="medium" g:plusone:href="http://www.aakashweb.com"></a>
68
- <a class="addthis_button_tweet" tw:count="horizontal" tw:url="http://www.aakashweb.com/wordpress-plugins/wp-socializer/" tw:text="WP Socializer - Awesome plugin to insert all konds of Social bookmarking buttons in WordPress"></a>
69
- </div>
70
- <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=vaakash"></script>
71
- </div>
72
- <?php endif; ?>
73
-
74
- </body>
75
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/js/sharebar_preview.js ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ $ = jQuery
2
+ jQuery(document).ready(function( $ ) {
3
+
4
+ var $sb = $( '.wpsr-sharebar' );
5
+ mousedown = false,
6
+ parent = window.parent;
7
+
8
+ $(document).on( 'input change', '.offset_drag', function(){
9
+ var cur_val = parseInt( $(this).val() );
10
+ var off_change = $(this).attr( 'data-coffset' );
11
+ var $off_val = $( '.offset_val' );
12
+
13
+ cur_val = cur_val * ( ( off_change == 'right' || off_change == 'bottom' ) ? -1 : 1 );
14
+
15
+ //$sb.attr( 'style', '' );
16
+ $sb.css( off_change, cur_val );
17
+ $off_val.val( cur_val + 'px' );
18
+ });
19
+
20
+ $(document).on( 'change', '.offset_val', function(){
21
+ $( '.offset_drag' ).val( parseInt( $(this).val() ) ).change();
22
+ });
23
+
24
+ $(document).on( 'click', '.save_btn', function(){
25
+ var $off_val = $( '.offset_val' );
26
+ $( parent.document ).find( '[name="offset"]' ).val( $off_val.val() );
27
+ parent.wpsr_sharebar_preview_close();
28
+ });
29
+
30
+ $(document).on( 'click', '.close_btn', function(){
31
+ parent.wpsr_sharebar_preview_close();
32
+ });
33
+
34
+ });
35
+
admin/js/tinymce/Thumbs.db DELETED
Binary file
admin/js/tinymce/editor_plugin.js DELETED
@@ -1,96 +0,0 @@
1
- /*
2
- * WP Socializer shortcode inserting javascript in TinyMCE editor
3
- * http://www.aakashweb.com
4
- * v1.2
5
- * Added since WP Socializer v2.0
6
- */
7
- function wpsr_insert_shortcode(type, edparam) {
8
- var choice = prompt('Select the button to insert: \n\n1.Social buttons \n2.Addthis \n3.Sharethis \n4.Retweet \n5.Google +1 \n6.Digg \n7.Facebook \n8.StumbleUpon \n9.Reddit \n10.LinkedIn \n11.Pinterest \n\nExample: 4 \n\n Please refer "http://bit.ly/wpsrParams" for parameters.', '');
9
- var btncode;
10
-
11
- if (choice !== null) {
12
- switch (jQuery.trim(choice)) {
13
- case '1':
14
- btncode = "socialbts"; break;
15
- case '2':
16
- btncode = "addthis"; break;
17
- case '3':
18
- btncode = "sharethis"; break;
19
- case '4':
20
- btncode = "retweet"; break;
21
- case '5':
22
- btncode = "plusone"; break;
23
- case '6':
24
- btncode = "digg"; break;
25
- case '7':
26
- btncode = "facebook"; break;
27
- case '8':
28
- btncode = "stumbleupon"; break;
29
- case '9':
30
- btncode = "reddit"; break;
31
- case '10':
32
- btncode = "linkedin"; break;
33
- case '11':
34
- btncode = "pinterest"; break;
35
- default:
36
- return '';
37
- }
38
-
39
- var shortcode = "[wpsr_" + btncode + "]";
40
-
41
- if (type === 'visual') {
42
- edparam.execCommand('mceInsertContent', false, shortcode);
43
- }else{
44
- edInsertContent(edCanvas, shortcode);
45
- }
46
-
47
- }else{
48
- return '';
49
- }
50
- }
51
-
52
- // For adding button in the visual editing toolbox
53
- (function() {
54
- tinymce.create('tinymce.plugins.WPSRButton', {
55
-
56
- init : function(ed, url) {
57
- ed.addButton('wpsrbutton', {
58
- title : 'Insert WP Socializer buttons',
59
- image : url + '/icon.png',
60
- onclick : function() {
61
- wpsr_insert_shortcode('visual', ed);
62
- }
63
- });
64
- },
65
-
66
- getInfo : function() {
67
- return {
68
- longname : 'WP Socializer',
69
- author : 'Aakash Chakravarthy',
70
- authorurl : 'http://www.aakashweb.com/',
71
- infourl : 'http://www.aakashweb.com/',
72
- version : '1.2'
73
- };
74
- }
75
-
76
- });
77
-
78
- tinymce.PluginManager.add('wpsrbutton', tinymce.plugins.WPSRButton);
79
- })();
80
-
81
- // For adding button in the code editing toolbox
82
-
83
- if(document.getElementById("ed_toolbar")){
84
- qt_toolbar = document.getElementById("ed_toolbar");
85
- edButtons[edButtons.length] = new edButton("ed_wpsrbutton", "WP Socializer", "", "","");
86
- var qt_button = qt_toolbar.lastChild;
87
- while (qt_button.nodeType != 1){
88
- qt_button = qt_button.previousSibling;
89
- }
90
- qt_button = qt_button.cloneNode(true);
91
- qt_button.value = 'WP Socializer';
92
- qt_button.title = 'Insert WP Socializer buttons';
93
- qt_button.onclick = function(){ wpsr_insert_shortcode('code', ''); };
94
- qt_button.id = "ed_wpsrbutton";
95
- qt_toolbar.appendChild(qt_button);
96
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/js/tinymce/icon.png DELETED
Binary file
admin/js/trumbowyg/icons.svg ADDED
@@ -0,0 +1 @@
 
1
+ <svg xmlns="http://www.w3.org/2000/svg"><symbol id="trumbowyg-blockquote" viewBox="0 0 72 72"><path d="M21.3 31.9h-.6c.8-1.2 1.9-2.2 3.4-3.2 2.1-1.4 5-2.7 9.2-3.3l-1.4-8.9c-4.7.7-8.5 2.1-11.7 4-2.4 1.4-4.3 3.1-5.8 4.9-2.3 2.7-3.7 5.7-4.5 8.5-.8 2.8-1 5.4-1 7.5 0 2.3.3 4 .4 4.8 0 .1.1.3.1.4 1.2 5.4 6.1 9.5 11.9 9.5 6.7 0 12.2-5.4 12.2-12.2s-5.5-12-12.2-12zM49.5 31.9h-.6c.8-1.2 1.9-2.2 3.4-3.2 2.1-1.4 5-2.7 9.2-3.3l-1.4-8.9c-4.7.7-8.5 2.1-11.7 4-2.4 1.4-4.3 3.1-5.8 4.9-2.3 2.7-3.7 5.7-4.5 8.5-.8 2.8-1 5.4-1 7.5 0 2.3.3 4 .4 4.8 0 .1.1.3.1.4 1.2 5.4 6.1 9.5 11.9 9.5 6.7 0 12.2-5.4 12.2-12.2s-5.5-12-12.2-12z"/></symbol><symbol id="trumbowyg-bold" viewBox="0 0 72 72"><path d="M51.1 37.8c-1.1-1.4-2.5-2.5-4.2-3.3 1.2-.8 2.1-1.8 2.8-3 1-1.6 1.5-3.5 1.5-5.3 0-2-.6-4-1.7-5.8-1.1-1.8-2.8-3.2-4.8-4.1-2-.9-4.6-1.3-7.8-1.3h-16v42h16.3c2.6 0 4.8-.2 6.7-.7 1.9-.5 3.4-1.2 4.7-2.1 1.3-1 2.4-2.4 3.2-4.1.9-1.7 1.3-3.6 1.3-5.7.2-2.5-.5-4.7-2-6.6zM40.8 50.2c-.6.1-1.8.2-3.4.2h-9V38.5h8.3c2.5 0 4.4.2 5.6.6 1.2.4 2 1 2.7 2 .6.9 1 2 1 3.3 0 1.1-.2 2.1-.7 2.9-.5.9-1 1.5-1.7 1.9-.8.4-1.7.8-2.8 1zm2.6-20.4c-.5.7-1.3 1.3-2.5 1.6-.8.3-2.5.4-4.8.4h-7.7V21.6h7.1c1.4 0 2.6 0 3.6.1s1.7.2 2.2.4c1 .3 1.7.8 2.2 1.7.5.9.8 1.8.8 3-.1 1.3-.4 2.2-.9 3z"/></symbol><symbol id="trumbowyg-close" viewBox="0 0 72 72"><path d="M57 20.5l-5.4-5.4-15.5 15.5-15.6-15.5-5.4 5.4L30.7 36 15.1 51.5l5.4 5.4 15.6-15.5 15.5 15.5 5.4-5.4L41.5 36z"/></symbol><symbol id="trumbowyg-create-link" viewBox="0 0 72 72"><path d="M31.1 48.9l-6.7 6.7c-.8.8-1.6.9-2.1.9s-1.4-.1-2.1-.9L15 50.4c-1.1-1.1-1.1-3.1 0-4.2l6.1-6.1.2-.2 6.5-6.5c-1.2-.6-2.5-.9-3.8-.9-2.3 0-4.6.9-6.3 2.6L11 41.8c-3.5 3.5-3.5 9.2 0 12.7l5.2 5.2c1.7 1.7 4 2.6 6.3 2.6s4.6-.9 6.3-2.6l6.7-6.7c2.5-2.6 3.1-6.7 1.5-10l-5.9 5.9zM38.7 22.5l6.7-6.7c.8-.8 1.6-.9 2.1-.9s1.4.1 2.1.9l5.2 5.2c1.1 1.1 1.1 3.1 0 4.2l-6.1 6.1-.2.2L42 38c1.2.6 2.5.9 3.8.9 2.3 0 4.6-.9 6.3-2.6l6.7-6.7c3.5-3.5 3.5-9.2 0-12.7l-5.2-5.2c-1.7-1.7-4-2.6-6.3-2.6s-4.6.9-6.3 2.6l-6.7 6.7c-2.7 2.7-3.3 6.9-1.7 10.2l6.1-6.1c0 .1 0 .1 0 0z"/><path d="M44.2 30.5c.2-.2.4-.6.4-.9 0-.3-.1-.6-.4-.9l-2.3-2.3c-.3-.2-.6-.4-.9-.4-.3 0-.6.1-.9.4L25.9 40.6c-.2.2-.4.6-.4.9 0 .3.1.6.4.9l2.3 2.3c.2.2.6.4.9.4.3 0 .6-.1.9-.4l14.2-14.2zM49.9 55.4h-8.5v-5h8.5v-8.9h5.2v8.9h8.5v5h-8.5v8.9h-5.2v-8.9z"/></symbol><symbol id="trumbowyg-del" viewBox="0 0 72 72"><path d="M45.8 45c0 1-.3 1.9-.9 2.8-.6.9-1.6 1.6-3 2.1s-3.1.8-5 .8c-2.1 0-4-.4-5.7-1.1-1.7-.7-2.9-1.7-3.6-2.7-.8-1.1-1.3-2.6-1.5-4.5l-.1-.8-6.7.6v.9c.1 2.8.9 5.4 2.3 7.6 1.5 2.3 3.5 4 6.1 5.1 2.6 1.1 5.7 1.6 9.4 1.6 2.9 0 5.6-.5 8-1.6 2.4-1.1 4.3-2.7 5.6-4.7 1.3-2 2-4.2 2-6.5 0-1.6-.3-3.1-.9-4.5l-.2-.6H44c0 .1 1.8 2.3 1.8 5.5zM29 28.9c-.8-.8-1.2-1.7-1.2-2.9 0-.7.1-1.3.4-1.9.3-.6.7-1.1 1.4-1.6.6-.5 1.4-.9 2.5-1.1 1.1-.3 2.4-.4 3.9-.4 2.9 0 5 .6 6.3 1.7 1.3 1.1 2.1 2.7 2.4 5.1l.1.9 6.8-.5v-.9c-.1-2.5-.8-4.7-2.1-6.7s-3.2-3.5-5.6-4.5c-2.4-1-5.1-1.5-8.1-1.5-2.8 0-5.3.5-7.6 1.4-2.3 1-4.2 2.4-5.4 4.3-1.2 1.9-1.9 3.9-1.9 6.1 0 1.7.4 3.4 1.2 4.9l.3.5h11.8c-2.3-.9-3.9-1.7-5.2-2.9zm13.3-6.2zM22.7 20.3zM13 34.1h46.1v3.4H13z"/></symbol><symbol id="trumbowyg-em" viewBox="0 0 72 72"><path d="M26 57l10.1-42h7.2L33.2 57H26z"/></symbol><symbol id="trumbowyg-fullscreen" viewBox="0 0 72 72"><path d="M25.2 7.1H7.1v17.7l6.7-6.5 10.5 10.5 4.5-4.5-10.4-10.5zM47.2 7.1l6.5 6.7-10.5 10.5 4.5 4.5 10.5-10.4 6.7 6.8V7.1zM47.7 43.2l-4.5 4.5 10.4 10.5-6.8 6.7h18.1V47.2l-6.7 6.5zM24.3 43.2L13.8 53.6l-6.7-6.8v18.1h17.7l-6.5-6.7 10.5-10.5z"/><path fill="currentColor" d="M10.7 28.8h18.1V11.2l-6.6 6.4L11.6 7.1l-4.5 4.5 10.5 10.5zM60.8 28.8l-6.4-6.6 10.5-10.6-4.5-4.5-10.5 10.5-6.7-6.9v18.1zM60.4 64.9l4.5-4.5-10.5-10.5 6.9-6.7H43.2v17.6l6.6-6.4zM11.6 64.9l10.5-10.5 6.7 6.9V43.2H11.1l6.5 6.6L7.1 60.4z"/></symbol><symbol id="trumbowyg-h1" viewBox="0 0 72 72"><path d="M6.4 14.9h7.4v16.7h19.1V14.9h7.4V57h-7.4V38H13.8v19H6.4V14.9zM47.8 22.5c1.4 0 2.8-.1 4.1-.4 1.3-.2 2.5-.6 3.6-1.2 1.1-.5 2-1.3 2.8-2.1.8-.9 1.3-1.9 1.5-3.2h5.5v41.2h-7.4v-29H47.8v-5.3z"/></symbol><symbol id="trumbowyg-h2" viewBox="0 0 72 72"><path d="M1.5 14.9h7.4v16.7H28V14.9h7.4V57H28V38H8.8v19H1.5V14.9zM70.2 56.9H42c0-3.4.9-6.4 2.5-9s3.8-4.8 6.6-6.7c1.3-1 2.7-1.9 4.2-2.9 1.5-.9 2.8-1.9 4-3 1.2-1.1 2.2-2.2 3-3.4.8-1.2 1.2-2.7 1.2-4.3 0-.7-.1-1.5-.3-2.4s-.5-1.6-1-2.4c-.5-.7-1.2-1.3-2.1-1.8-.9-.5-2.1-.7-3.5-.7-1.3 0-2.4.3-3.3.8s-1.6 1.3-2.1 2.2-.9 2-1.2 3.3c-.3 1.3-.4 2.6-.4 4.1h-6.7c0-2.3.3-4.4.9-6.3.6-1.9 1.5-3.6 2.7-5 1.2-1.4 2.7-2.5 4.4-3.3 1.7-.8 3.8-1.2 6.1-1.2 2.5 0 4.6.4 6.3 1.2 1.7.8 3.1 1.9 4.1 3.1 1 1.3 1.8 2.6 2.2 4.1.4 1.5.6 2.9.6 4.2 0 1.6-.3 3.1-.8 4.5-.5 1.3-1.2 2.6-2.1 3.7-.9 1.1-1.8 2.2-2.9 3.1-1.1.9-2.2 1.8-3.4 2.7-1.2.8-2.4 1.6-3.5 2.4-1.2.7-2.3 1.5-3.3 2.2-1 .7-1.9 1.5-2.6 2.3-.7.8-1.3 1.7-1.5 2.6h20.1v5.9z"/></symbol><symbol id="trumbowyg-h3" viewBox="0 0 72 72"><path d="M1.4 14.5h7.4v16.7h19.1V14.5h7.4v42.1h-7.4v-19H8.8v19H1.4V14.5zM53.1 32.4c1.1 0 2.2 0 3.3-.2 1.1-.2 2.1-.5 2.9-1 .9-.5 1.6-1.2 2.1-2 .5-.9.8-1.9.8-3.2 0-1.8-.6-3.2-1.8-4.2-1.2-1.1-2.7-1.6-4.6-1.6-1.2 0-2.2.2-3.1.7-.9.5-1.6 1.1-2.2 1.9-.6.8-1 1.7-1.3 2.7-.3 1-.4 2-.4 3.1h-6.7c.1-2 .5-3.9 1.1-5.6.7-1.7 1.6-3.2 2.7-4.4s2.6-2.2 4.2-2.9c1.6-.7 3.5-1.1 5.6-1.1 1.6 0 3.2.2 4.7.7 1.6.5 2.9 1.2 4.2 2.1 1.2.9 2.2 2.1 3 3.4.7 1.4 1.1 3 1.1 4.8 0 2.1-.5 3.9-1.4 5.4-.9 1.6-2.4 2.7-4.4 3.4v.1c2.4.5 4.2 1.6 5.5 3.5 1.3 1.9 2 4.1 2 6.8 0 2-.4 3.7-1.2 5.3-.8 1.6-1.8 2.9-3.2 3.9-1.3 1.1-2.9 1.9-4.7 2.5-1.8.6-3.6.9-5.6.9-2.4 0-4.5-.3-6.3-1s-3.3-1.7-4.5-2.9c-1.2-1.3-2.1-2.8-2.7-4.5-.6-1.8-1-3.7-1-5.9h6.7c-.1 2.5.5 4.6 1.9 6.3 1.3 1.7 3.3 2.5 5.9 2.5 2.2 0 4.1-.6 5.6-1.9 1.5-1.3 2.3-3.1 2.3-5.4 0-1.6-.3-2.9-.9-3.8-.6-.9-1.5-1.7-2.5-2.2-1-.5-2.2-.8-3.4-.9-1.3-.1-2.6-.2-3.9-.1v-5.2z"/></symbol><symbol id="trumbowyg-h4" viewBox="0 0 72 72"><path d="M1.5 14.9h7.4v16.7H28V14.9h7.4V57H28V38H8.9v19H1.5V14.9zM70.5 47.2h-5.3V57h-6.4v-9.8H41.2v-6.7l17.7-24.8h6.4v26.2h5.3v5.3zm-24.2-5.3h12.5V23.7h-.1L46.3 41.9z"/></symbol><symbol id="trumbowyg-horizontal-rule" viewBox="0 0 72 72"><path d="M9.1 32h54v8h-54z"/></symbol><symbol id="trumbowyg-insert-image" viewBox="0 0 72 72"><path d="M64 17v38H8V17h56m8-8H0v54h72V9z"/><path d="M17.5 22C15 22 13 24 13 26.5s2 4.5 4.5 4.5 4.5-2 4.5-4.5-2-4.5-4.5-4.5zM16 50h27L29.5 32zM36 36.2l8.9-8.5L60.2 50H45.9S35.6 35.9 36 36.2z"/></symbol><symbol id="trumbowyg-italic" viewBox="0 0 72 72"><path d="M26 57l10.1-42h7.2L33.2 57H26z"/></symbol><symbol id="trumbowyg-justify-center" viewBox="0 0 72 72"><path d="M9 14h54v8H9zM9 50h54v8H9zM18 32h36v8H18z"/></symbol><symbol id="trumbowyg-justify-full" viewBox="0 0 72 72"><path d="M9 14h54v8H9zM9 50h54v8H9zM9 32h54v8H9z"/></symbol><symbol id="trumbowyg-justify-left" viewBox="0 0 72 72"><path d="M9 14h54v8H9zM9 50h54v8H9zM9 32h36v8H9z"/></symbol><symbol id="trumbowyg-justify-right" viewBox="0 0 72 72"><path d="M9 14h54v8H9zM9 50h54v8H9zM27 32h36v8H27z"/></symbol><symbol id="trumbowyg-link" viewBox="0 0 72 72"><path d="M30.9 49.1l-6.7 6.7c-.8.8-1.6.9-2.1.9s-1.4-.1-2.1-.9l-5.2-5.2c-1.1-1.1-1.1-3.1 0-4.2l6.1-6.1.2-.2 6.5-6.5c-1.2-.6-2.5-.9-3.8-.9-2.3 0-4.6.9-6.3 2.6L10.8 42c-3.5 3.5-3.5 9.2 0 12.7l5.2 5.2c1.7 1.7 4 2.6 6.3 2.6s4.6-.9 6.3-2.6l6.7-6.7C38 50.5 38.6 46.3 37 43l-6.1 6.1zM38.5 22.7l6.7-6.7c.8-.8 1.6-.9 2.1-.9s1.4.1 2.1.9l5.2 5.2c1.1 1.1 1.1 3.1 0 4.2l-6.1 6.1-.2.2-6.5 6.5c1.2.6 2.5.9 3.8.9 2.3 0 4.6-.9 6.3-2.6l6.7-6.7c3.5-3.5 3.5-9.2 0-12.7l-5.2-5.2c-1.7-1.7-4-2.6-6.3-2.6s-4.6.9-6.3 2.6l-6.7 6.7c-2.7 2.7-3.3 6.9-1.7 10.2l6.1-6.1z"/><path d="M44.1 30.7c.2-.2.4-.6.4-.9 0-.3-.1-.6-.4-.9l-2.3-2.3c-.2-.2-.6-.4-.9-.4-.3 0-.6.1-.9.4L25.8 40.8c-.2.2-.4.6-.4.9 0 .3.1.6.4.9l2.3 2.3c.2.2.6.4.9.4.3 0 .6-.1.9-.4l14.2-14.2z"/></symbol><symbol id="trumbowyg-ordered-list" viewBox="0 0 72 72"><path d="M27 14h36v8H27zM27 50h36v8H27zM27 32h36v8H27zM11.8 15.8V22h1.8v-7.8h-1.5l-2.1 1 .3 1.3zM12.1 38.5l.7-.6c1.1-1 2.1-2.1 2.1-3.4 0-1.4-1-2.4-2.7-2.4-1.1 0-2 .4-2.6.8l.5 1.3c.4-.3 1-.6 1.7-.6.9 0 1.3.5 1.3 1.1 0 .9-.9 1.8-2.6 3.3l-1 .9V40H15v-1.5h-2.9zM13.3 53.9c1-.4 1.4-1 1.4-1.8 0-1.1-.9-1.9-2.6-1.9-1 0-1.9.3-2.4.6l.4 1.3c.3-.2 1-.5 1.6-.5.8 0 1.2.3 1.2.8 0 .7-.8.9-1.4.9h-.7v1.3h.7c.8 0 1.6.3 1.6 1.1 0 .6-.5 1-1.4 1-.7 0-1.5-.3-1.8-.5l-.4 1.4c.5.3 1.3.6 2.3.6 2 0 3.2-1 3.2-2.4 0-1.1-.8-1.8-1.7-1.9z"/></symbol><symbol id="trumbowyg-p" viewBox="0 0 72 72"><path d="M47.8 15.1H30.1c-4.7 0-8.5 3.7-8.5 8.4s3.7 8.4 8.4 8.4v25h7V19.8h3v37.1h4.1V19.8h3.7v-4.7z"/></symbol><symbol id="trumbowyg-redo" viewBox="0 0 72 72"><path d="M10.8 51.2c0-5.1 2.1-9.7 5.4-13.1 3.3-3.3 8-5.4 13.1-5.4H46v-12L61.3 36 45.9 51.3V39.1H29.3c-3.3 0-6.4 1.3-8.5 3.5-2.2 2.2-3.5 5.2-3.5 8.5h-6.5z"/></symbol><symbol id="trumbowyg-removeformat" viewBox="0 0 72 72"><path d="M58.2 54.6L52 48.5l3.6-3.6 6.1 6.1 6.4-6.4 3.8 3.8-6.4 6.4 6.1 6.1-3.6 3.6-6.1-6.1-6.4 6.4-3.7-3.8 6.4-6.4zM21.7 52.1H50V57H21.7zM18.8 15.2h34.1v6.4H39.5v24.2h-7.4V21.5H18.8v-6.3z"/></symbol><symbol id="trumbowyg-strikethrough" viewBox="0 0 72 72"><path d="M45.8 45c0 1-.3 1.9-.9 2.8-.6.9-1.6 1.6-3 2.1s-3.1.8-5 .8c-2.1 0-4-.4-5.7-1.1-1.7-.7-2.9-1.7-3.6-2.7-.8-1.1-1.3-2.6-1.5-4.5l-.1-.8-6.7.6v.9c.1 2.8.9 5.4 2.3 7.6 1.5 2.3 3.5 4 6.1 5.1 2.6 1.1 5.7 1.6 9.4 1.6 2.9 0 5.6-.5 8-1.6 2.4-1.1 4.3-2.7 5.6-4.7 1.3-2 2-4.2 2-6.5 0-1.6-.3-3.1-.9-4.5l-.2-.6H44c0 .1 1.8 2.3 1.8 5.5zM29 28.9c-.8-.8-1.2-1.7-1.2-2.9 0-.7.1-1.3.4-1.9.3-.6.7-1.1 1.4-1.6.6-.5 1.4-.9 2.5-1.1 1.1-.3 2.4-.4 3.9-.4 2.9 0 5 .6 6.3 1.7 1.3 1.1 2.1 2.7 2.4 5.1l.1.9 6.8-.5v-.9c-.1-2.5-.8-4.7-2.1-6.7s-3.2-3.5-5.6-4.5c-2.4-1-5.1-1.5-8.1-1.5-2.8 0-5.3.5-7.6 1.4-2.3 1-4.2 2.4-5.4 4.3-1.2 1.9-1.9 3.9-1.9 6.1 0 1.7.4 3.4 1.2 4.9l.3.5h11.8c-2.3-.9-3.9-1.7-5.2-2.9zm13.3-6.2zM22.7 20.3zM13 34.1h46.1v3.4H13z"/></symbol><symbol id="trumbowyg-strong" viewBox="0 0 72 72"><path d="M51.1 37.8c-1.1-1.4-2.5-2.5-4.2-3.3 1.2-.8 2.1-1.8 2.8-3 1-1.6 1.5-3.5 1.5-5.3 0-2-.6-4-1.7-5.8-1.1-1.8-2.8-3.2-4.8-4.1-2-.9-4.6-1.3-7.8-1.3h-16v42h16.3c2.6 0 4.8-.2 6.7-.7 1.9-.5 3.4-1.2 4.7-2.1 1.3-1 2.4-2.4 3.2-4.1.9-1.7 1.3-3.6 1.3-5.7.2-2.5-.5-4.7-2-6.6zM40.8 50.2c-.6.1-1.8.2-3.4.2h-9V38.5h8.3c2.5 0 4.4.2 5.6.6 1.2.4 2 1 2.7 2 .6.9 1 2 1 3.3 0 1.1-.2 2.1-.7 2.9-.5.9-1 1.5-1.7 1.9-.8.4-1.7.8-2.8 1zm2.6-20.4c-.5.7-1.3 1.3-2.5 1.6-.8.3-2.5.4-4.8.4h-7.7V21.6h7.1c1.4 0 2.6 0 3.6.1s1.7.2 2.2.4c1 .3 1.7.8 2.2 1.7.5.9.8 1.8.8 3-.1 1.3-.4 2.2-.9 3z"/></symbol><symbol id="trumbowyg-subscript" viewBox="0 0 72 72"><path d="M32 15h7.8L56 57.1h-7.9L44.3 46H27.4l-4 11.1h-7.6L32 15zm-2.5 25.4h12.9L36 22.3h-.2l-6.3 18.1zM58.7 59.9c.6-1.4 2-2.8 4.1-4.4 1.9-1.3 3.1-2.3 3.7-2.9.8-.9 1.3-1.9 1.3-3 0-.9-.2-1.6-.7-2.2-.5-.6-1.2-.9-2.1-.9-1.2 0-2.1.5-2.5 1.4-.3.5-.4 1.4-.5 2.5h-4c.1-1.8.4-3.2 1-4.3 1.1-2.1 3-3.1 5.8-3.1 2.2 0 3.9.6 5.2 1.8 1.3 1.2 1.9 2.8 1.9 4.8 0 1.5-.5 2.9-1.4 4.1-.6.8-1.6 1.7-3 2.6L66 57.7c-1 .7-1.7 1.2-2.1 1.6-.4.3-.7.7-1 1.1H72V64H57.8c0-1.5.3-2.8.9-4.1z"/></symbol><symbol id="trumbowyg-superscript" viewBox="0 0 72 72"><path d="M32 15h7.8L56 57.1h-7.9l-4-11.1H27.4l-4 11.1h-7.6L32 15zm-2.5 25.4h12.9L36 22.3h-.2l-6.3 18.1zM49.6 28.8c.5-1.1 1.6-2.3 3.4-3.6 1.5-1.1 2.5-1.9 3-2.4.7-.7 1-1.6 1-2.4 0-.7-.2-1.3-.6-1.8-.4-.5-1-.7-1.7-.7-1 0-1.7.4-2.1 1.1-.2.4-.3 1.1-.4 2.1H49c.1-1.5.3-2.6.8-3.5.9-1.7 2.5-2.6 4.8-2.6 1.8 0 3.2.5 4.3 1.5 1.1 1 1.6 2.3 1.6 4 0 1.3-.4 2.4-1.1 3.4-.5.7-1.3 1.4-2.4 2.2l-1.3 1c-.8.6-1.4 1-1.7 1.3-.3.3-.6.6-.8.9h7.4v3H48.8c0-1.3.3-2.4.8-3.5z"/></symbol><symbol id="trumbowyg-underline" viewBox="0 0 72 72"><path d="M36 35zM15.2 55.9h41.6V59H15.2zM21.1 13.9h6.4v21.2c0 1.2.1 2.5.2 3.7.1 1.3.5 2.4 1 3.4.6 1 1.4 1.8 2.6 2.5 1.1.6 2.7 1 4.8 1 2.1 0 3.7-.3 4.8-1 1.1-.6 2-1.5 2.6-2.5.6-1 .9-2.1 1-3.4.1-1.3.2-2.5.2-3.7V13.9H51v23.3c0 2.3-.4 4.4-1.1 6.1-.7 1.7-1.7 3.2-3 4.4-1.3 1.2-2.9 2-4.7 2.6-1.8.6-3.9.9-6.1.9-2.2 0-4.3-.3-6.1-.9-1.8-.6-3.4-1.5-4.7-2.6-1.3-1.2-2.3-2.6-3-4.4-.7-1.7-1.1-3.8-1.1-6.1V13.9z"/></symbol><symbol id="trumbowyg-undo" viewBox="0 0 72 72"><path d="M61.2 51.2c0-5.1-2.1-9.7-5.4-13.1-3.3-3.3-8-5.4-13.1-5.4H26.1v-12L10.8 36l15.3 15.3V39.1h16.7c3.3 0 6.4 1.3 8.5 3.5 2.2 2.2 3.5 5.2 3.5 8.5h6.4z"/></symbol><symbol id="trumbowyg-unlink" viewBox="0 0 72 72"><path d="M30.9 49.1l-6.7 6.7c-.8.8-1.6.9-2.1.9s-1.4-.1-2.1-.9l-5.2-5.2c-1.1-1.1-1.1-3.1 0-4.2l6.1-6.1.2-.2 6.5-6.5c-1.2-.6-2.5-.9-3.8-.9-2.3 0-4.6.9-6.3 2.6L10.8 42c-3.5 3.5-3.5 9.2 0 12.7l5.2 5.2c1.7 1.7 4 2.6 6.3 2.6s4.6-.9 6.3-2.6l6.7-6.7C38 50.5 38.6 46.3 37 43l-6.1 6.1zM38.5 22.7l6.7-6.7c.8-.8 1.6-.9 2.1-.9s1.4.1 2.1.9l5.2 5.2c1.1 1.1 1.1 3.1 0 4.2l-6.1 6.1-.2.2-6.5 6.5c1.2.6 2.5.9 3.8.9 2.3 0 4.6-.9 6.3-2.6l6.7-6.7c3.5-3.5 3.5-9.2 0-12.7l-5.2-5.2c-1.7-1.7-4-2.6-6.3-2.6s-4.6.9-6.3 2.6l-6.7 6.7c-2.7 2.7-3.3 6.9-1.7 10.2l6.1-6.1z"/><path d="M44.1 30.7c.2-.2.4-.6.4-.9 0-.3-.1-.6-.4-.9l-2.3-2.3c-.2-.2-.6-.4-.9-.4-.3 0-.6.1-.9.4L25.8 40.8c-.2.2-.4.6-.4.9 0 .3.1.6.4.9l2.3 2.3c.2.2.6.4.9.4.3 0 .6-.1.9-.4l14.2-14.2zM41.3 55.8v-5h22.2v5H41.3z"/></symbol><symbol id="trumbowyg-unordered-list" viewBox="0 0 72 72"><path d="M27 14h36v8H27zM27 50h36v8H27zM9 50h9v8H9zM9 32h9v8H9zM9 14h9v8H9zM27 32h36v8H27z"/></symbol><symbol id="trumbowyg-view-html" viewBox="0 0 72 72"><path fill="none" stroke="currentColor" stroke-width="8" stroke-miterlimit="10" d="M26.9 17.9L9 36.2 26.9 54M45 54l17.9-18.3L45 17.9"/></symbol><symbol id="trumbowyg-base64" viewBox="0 0 72 72"><path d="M64 17v38H8V17h56m8-8H0v54h72V9z"/><path d="M29.9 28.9c-.5-.5-1.1-.8-1.8-.8s-1.4.2-1.9.7c-.5.4-.9 1-1.2 1.6-.3.6-.5 1.3-.6 2.1-.1.7-.2 1.4-.2 1.9l.1.1c.6-.8 1.2-1.4 2-1.8.8-.4 1.7-.5 2.7-.5.9 0 1.8.2 2.6.6.8.4 1.6.9 2.2 1.5.6.6 1 1.3 1.2 2.2.3.8.4 1.6.4 2.5 0 1.1-.2 2.1-.5 3-.3.9-.8 1.7-1.5 2.4-.6.7-1.4 1.2-2.3 1.6-.9.4-1.9.6-3 .6-1.6 0-2.8-.3-3.9-.9-1-.6-1.8-1.4-2.5-2.4-.6-1-1-2.1-1.3-3.4-.2-1.3-.4-2.6-.4-3.9 0-1.3.1-2.6.4-3.8.3-1.3.8-2.4 1.4-3.5.7-1 1.5-1.9 2.5-2.5 1-.6 2.3-1 3.8-1 .9 0 1.7.1 2.5.4.8.3 1.4.6 2 1.1.6.5 1.1 1.1 1.4 1.8.4.7.6 1.5.7 2.5h-4c0-1-.3-1.6-.8-2.1zm-3.5 6.8c-.4.2-.8.5-1 .8-.3.4-.5.8-.6 1.2-.1.5-.2 1-.2 1.5s.1.9.2 1.4c.1.5.4.9.6 1.2.3.4.6.7 1 .9.4.2.9.3 1.4.3.5 0 1-.1 1.3-.3.4-.2.7-.5 1-.9.3-.4.5-.8.6-1.2.1-.5.2-.9.2-1.4 0-.5-.1-1-.2-1.4-.1-.5-.3-.9-.6-1.2-.3-.4-.6-.7-1-.9-.4-.2-.9-.3-1.4-.3-.4 0-.9.1-1.3.3zM36.3 41.3v-3.8l9-12.1H49v12.4h2.7v3.5H49v4.8h-4v-4.8h-8.7zM45 30.7l-5.3 7.2h5.4l-.1-7.2z"/></symbol><symbol id="trumbowyg-back-color" viewBox="0 0 72 72"><path d="M36.5 22.3l-6.3 18.1H43l-6.3-18.1z"/><path d="M9 8.9v54.2h54.1V8.9H9zm39.9 48.2L45 46H28.2l-3.9 11.1h-7.6L32.8 15h7.8l16.2 42.1h-7.9z"/></symbol><symbol id="trumbowyg-fore-color" viewBox="0 0 72 72"><path d="M32 15h7.8L56 57.1h-7.9l-4-11.1H27.4l-4 11.1h-7.6L32 15zm-2.5 25.4h12.9L36 22.3h-.2l-6.3 18.1z"/></symbol><symbol id="trumbowyg-noembed" viewBox="0 0 72 72"><path d="M31.5 33.6V25l11 11-11 11v-8.8z"/><path d="M64 17v38H8V17h56m8-8H0v54h72V9z"/></symbol><symbol id="trumbowyg-preformatted" viewBox="0 0 72 72"><path d="M10.3 33.5c.4 0 .9-.1 1.5-.2s1.2-.3 1.8-.7c.6-.3 1.1-.8 1.5-1.3.4-.5.6-1.3.6-2.1V17.1c0-1.4.3-2.6.8-3.6s1.2-1.9 2-2.5c.8-.7 1.6-1.2 2.5-1.5.9-.3 1.6-.5 2.2-.5h5.3v5.3h-3.2c-.7 0-1.3.1-1.8.4-.4.3-.8.6-1 1-.2.4-.4.9-.4 1.3-.1.5-.1.9-.1 1.4v11.4c0 1.2-.2 2.1-.7 2.9-.5.8-1 1.4-1.7 1.8-.6.4-1.3.8-2 1-.7.2-1.3.3-1.7.4v.1c.5 0 1 .1 1.7.3.7.2 1.3.5 2 .9.6.5 1.2 1.1 1.7 1.9.5.8.7 2 .7 3.4v11.1c0 .4 0 .9.1 1.4.1.5.2.9.4 1.3s.6.7 1 1c.4.3 1 .4 1.8.4h3.2V63h-5.3c-.6 0-1.4-.2-2.2-.5-.9-.3-1.7-.8-2.5-1.5s-1.4-1.5-2-2.5c-.5-1-.8-2.2-.8-3.6V43.5c0-.9-.2-1.7-.6-2.3-.4-.6-.9-1.1-1.5-1.5-.6-.4-1.2-.6-1.8-.7-.6-.1-1.1-.2-1.5-.2v-5.3zM61.8 38.7c-.4 0-1 .1-1.6.2-.6.1-1.2.4-1.8.7-.6.3-1.1.7-1.5 1.3-.4.5-.6 1.3-.6 2.1v12.1c0 1.4-.3 2.6-.8 3.6s-1.2 1.9-2 2.5c-.8.7-1.6 1.2-2.5 1.5-.9.3-1.6.5-2.2.5h-5.3v-5.3h3.2c.7 0 1.3-.1 1.8-.4.4-.3.8-.6 1-1 .2-.4.4-.9.4-1.3.1-.5.1-.9.1-1.4V42.3c0-1.2.2-2.1.7-2.9.5-.8 1-1.4 1.7-1.8.6-.4 1.3-.8 2-1 .7-.2 1.3-.3 1.7-.4v-.1c-.5 0-1-.1-1.7-.3-.7-.2-1.3-.5-2-.9-.6-.4-1.2-1.1-1.7-1.9-.5-.8-.7-2-.7-3.4V18.5c0-.4 0-.9-.1-1.4-.1-.5-.2-.9-.4-1.3s-.6-.7-1-1c-.4-.3-1-.4-1.8-.4h-3.2V9.1h5.3c.6 0 1.4.2 2.2.5.9.3 1.7.8 2.5 1.5s1.4 1.5 2 2.5c.5 1 .8 2.2.8 3.6v11.6c0 .9.2 1.7.6 2.3.4.6.9 1.1 1.5 1.5.6.4 1.2.6 1.8.7.6.1 1.2.2 1.6.2v5.2z"/></symbol><symbol id="trumbowyg-upload" viewBox="0 0 72 72"><path d="M64 27v28H8V27H0v36h72V27h-8z"/><path d="M32.1 6.7h8v33.6h-8z"/><path d="M48 35.9L36 49.6 24 36h24z"/></symbol></svg>
admin/js/trumbowyg/trumbowyg.min.css ADDED
@@ -0,0 +1,2 @@
 
 
1
+ /** Trumbowyg v2.1.0 - A lightweight WYSIWYG editor - alex-d.github.io/Trumbowyg - License MIT - Author : Alexandre Demode (Alex-D) / alex-d.fr */
2
+ #trumbowyg-icons,#trumbowyg-icons svg{height:0;width:0}#trumbowyg-icons{overflow:hidden;visibility:hidden}.trumbowyg-box *,.trumbowyg-box ::after,.trumbowyg-box ::before{box-sizing:border-box}.trumbowyg-box svg{width:17px;height:100%;fill:#222}.trumbowyg-box,.trumbowyg-editor{display:block;position:relative;border:1px solid #DDD;width:100%;min-height:300px;margin:17px auto}.trumbowyg-box .trumbowyg-editor{margin:0 auto}.trumbowyg-box.trumbowyg-fullscreen{background:#FEFEFE;border:none!important}.trumbowyg-editor,.trumbowyg-textarea{position:relative;box-sizing:border-box;padding:20px;min-height:300px;width:100%;border-style:none;resize:none;outline:0;overflow:auto}.trumbowyg-box-blur .trumbowyg-editor *,.trumbowyg-box-blur .trumbowyg-editor::before{color:transparent!important;text-shadow:0 0 7px #333}@media screen and (min-width:0 \0){.trumbowyg-box-blur .trumbowyg-editor *,.trumbowyg-box-blur .trumbowyg-editor::before{color:rgba(200,200,200,.6)!important}}@supports (-ms-accelerator:true){.trumbowyg-box-blur .trumbowyg-editor *,.trumbowyg-box-blur .trumbowyg-editor::before{color:rgba(200,200,200,.6)!important}}.trumbowyg-box-blur .trumbowyg-editor hr,.trumbowyg-box-blur .trumbowyg-editor img{opacity:.2}.trumbowyg-textarea{position:relative;display:block;overflow:auto;border:none;white-space:normal;font-size:14px;font-family:Inconsolata,Consolas,Courier,"Courier New",sans-serif;line-height:18px}.trumbowyg-box.trumbowyg-editor-visible .trumbowyg-textarea{height:1px!important;width:25%;min-height:0!important;padding:0!important;background:0 0;opacity:0!important}.trumbowyg-box.trumbowyg-editor-hidden .trumbowyg-textarea{display:block}.trumbowyg-box.trumbowyg-editor-hidden .trumbowyg-editor{display:none}.trumbowyg-box.trumbowyg-disabled .trumbowyg-textarea{opacity:.8;background:0 0}.trumbowyg-editor[contenteditable=true]:empty::before{content:attr(placeholder);color:#999;pointer-events:none}.trumbowyg-button-pane{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-flow:row wrap;-ms-flex-flow:row wrap;flex-flow:row wrap;width:100%;min-height:36px;background:#ecf0f1;border-bottom:1px solid #d7e0e2;margin:0;padding:0 5px;list-style-type:none;line-height:10px;-webkit-backface-visibility:hidden;backface-visibility:hidden}.trumbowyg-button-pane::after{content:" ";display:block;position:absolute;top:36px;left:0;right:0;width:100%;height:1px;background:#d7e0e2}.trumbowyg-button-pane .trumbowyg-button-group{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-flow:row wrap;-ms-flex-flow:row wrap;flex-flow:row wrap}.trumbowyg-button-pane .trumbowyg-button-group .trumbowyg-fullscreen-button svg{color:transparent}.trumbowyg-button-pane .trumbowyg-button-group:not(:empty)+.trumbowyg-button-group::before{content:" ";display:block;width:1px;background:#d7e0e2;margin:0 5px;height:35px}.trumbowyg-button-pane button{display:block;position:relative;width:35px;height:35px;padding:1px 6px!important;margin-bottom:1px;overflow:hidden;border:none;cursor:pointer;background:0 0;-webkit-transition:background-color 150ms,opacity 150ms;transition:background-color 150ms,opacity 150ms}.trumbowyg-button-pane.trumbowyg-disable button:not(.trumbowyg-not-disable):not(.trumbowyg-active),.trumbowyg-disabled .trumbowyg-button-pane button:not(.trumbowyg-not-disable):not(.trumbowyg-viewHTML-button){opacity:.2;cursor:default}.trumbowyg-button-pane.trumbowyg-disable .trumbowyg-button-group::before,.trumbowyg-disabled .trumbowyg-button-pane .trumbowyg-button-group::before{background:#e3e9eb}.trumbowyg-button-pane button.trumbowyg-active,.trumbowyg-button-pane button:not(.trumbowyg-disable):focus,.trumbowyg-button-pane button:not(.trumbowyg-disable):hover{background-color:#FFF;outline:0}.trumbowyg-button-pane .trumbowyg-open-dropdown::after{display:block;content:" ";position:absolute;top:25px;right:3px;height:0;width:0;border:3px solid transparent;border-top-color:#555}.trumbowyg-button-pane .trumbowyg-right{margin-left:auto}.trumbowyg-button-pane .trumbowyg-right::before{display:none!important}.trumbowyg-dropdown{width:200px;border:1px solid #ecf0f1;padding:5px 0;border-top:none;background:#FFF;margin-left:-1px;box-shadow:rgba(0,0,0,.1) 0 2px 3px}.trumbowyg-dropdown button{display:block;width:100%;height:35px;line-height:35px;text-decoration:none;background:#FFF;padding:0 10px;color:#333!important;border:none;cursor:pointer;text-align:left;font-size:15px;-webkit-transition:all 150ms;transition:all 150ms}.trumbowyg-dropdown button:focus,.trumbowyg-dropdown button:hover{background:#ecf0f1}.trumbowyg-dropdown button svg{float:left;margin-right:14px}.trumbowyg-modal{position:absolute;top:0;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);max-width:520px;width:100%;height:350px;z-index:11;overflow:hidden;-webkit-backface-visibility:hidden;backface-visibility:hidden}.trumbowyg-modal-box{position:absolute;top:0;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%);max-width:500px;width:calc(100% - 20px);padding-bottom:45px;z-index:1;background-color:#FFF;text-align:center;font-size:14px;box-shadow:rgba(0,0,0,.2) 0 2px 3px;-webkit-backface-visibility:hidden;backface-visibility:hidden}.trumbowyg-modal-box .trumbowyg-modal-title{font-size:24px;font-weight:700;margin:0 0 20px;padding:15px 0 13px;display:block;border-bottom:1px solid #EEE;color:#333;background:#fbfcfc}.trumbowyg-modal-box .trumbowyg-progress{width:100%;height:3px;position:absolute;top:58px}.trumbowyg-modal-box .trumbowyg-progress .trumbowyg-progress-bar{background:#2BC06A;height:100%;-webkit-transition:width 150ms linear;transition:width 150ms linear}.trumbowyg-modal-box label{display:block;position:relative;margin:15px 12px;height:27px;line-height:27px;overflow:hidden}.trumbowyg-modal-box label .trumbowyg-input-infos{display:block;text-align:left;height:25px;line-height:25px;-webkit-transition:all 150ms;transition:all 150ms}.trumbowyg-modal-box label .trumbowyg-input-infos span{display:block;color:#69878f;background-color:#fbfcfc;border:1px solid #DEDEDE;padding:0 7px;width:150px}.trumbowyg-modal-box label .trumbowyg-input-infos span.trumbowyg-msg-error{color:#e74c3c}.trumbowyg-modal-box label.trumbowyg-input-error input,.trumbowyg-modal-box label.trumbowyg-input-error textarea{border:1px solid #e74c3c}.trumbowyg-modal-box label.trumbowyg-input-error .trumbowyg-input-infos{margin-top:-27px}.trumbowyg-modal-box label input{position:absolute;top:0;right:0;height:27px;line-height:27px;border:1px solid #DEDEDE;background:#fff;font-size:14px;max-width:330px;width:70%;padding:0 7px;-webkit-transition:all 150ms;transition:all 150ms}.trumbowyg-modal-box label input:focus,.trumbowyg-modal-box label input:hover{outline:0;border:1px solid #95a5a6}.trumbowyg-modal-box label input:focus{background:#fbfcfc}.trumbowyg-modal-box .error{margin-top:25px;display:block;color:red}.trumbowyg-modal-box .trumbowyg-modal-button{position:absolute;bottom:10px;right:0;text-decoration:none;color:#FFF;display:block;width:100px;height:35px;line-height:33px;margin:0 10px;background-color:#333;border:none;cursor:pointer;font-family:"Trebuchet MS",Helvetica,Verdana,sans-serif;font-size:16px;-webkit-transition:all 150ms;transition:all 150ms}.trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-submit{right:110px;background:#2bc06a}.trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-submit:focus,.trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-submit:hover{background:#40d47e;outline:0}.trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-submit:active{background:#25a25a}.trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-reset{color:#555;background:#e6e6e6}.trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-reset:focus,.trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-reset:hover{background:#fbfbfb;outline:0}.trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-reset:active{background:#d5d5d5}.trumbowyg-overlay{position:absolute;background-color:rgba(255,255,255,.5);width:100%;left:0;display:none;z-index:10}body.trumbowyg-body-fullscreen{overflow:hidden}.trumbowyg-fullscreen{position:fixed;top:0;left:0;width:100%;height:100%;margin:0;padding:0;z-index:99999}.trumbowyg-fullscreen .trumbowyg-editor,.trumbowyg-fullscreen.trumbowyg-box{border:none}.trumbowyg-fullscreen .trumbowyg-editor,.trumbowyg-fullscreen .trumbowyg-textarea{height:calc(100% - 37px)!important;overflow:auto}.trumbowyg-fullscreen .trumbowyg-overlay{height:100%!important}.trumbowyg-fullscreen .trumbowyg-button-group .trumbowyg-fullscreen-button svg{color:#222;fill:transparent}.trumbowyg-editor embed,.trumbowyg-editor img,.trumbowyg-editor object,.trumbowyg-editor video{max-width:100%}.trumbowyg-editor img,.trumbowyg-editor video{height:auto}.trumbowyg-editor img{cursor:move}.trumbowyg-editor.trumbowyg-reset-css{background:#FEFEFE!important;font-family:"Trebuchet MS",Helvetica,Verdana,sans-serif!important;font-size:14px!important;line-height:1.45em!important;white-space:normal!important;color:#333}.trumbowyg-editor.trumbowyg-reset-css a{color:#15c!important;text-decoration:underline!important}.trumbowyg-editor.trumbowyg-reset-css blockquote,.trumbowyg-editor.trumbowyg-reset-css div,.trumbowyg-editor.trumbowyg-reset-css ol,.trumbowyg-editor.trumbowyg-reset-css p,.trumbowyg-editor.trumbowyg-reset-css ul{box-shadow:none!important;background:0 0!important;margin:0 0 15px!important;line-height:1.4em!important;font-family:"Trebuchet MS",Helvetica,Verdana,sans-serif!important;font-size:14px!important;border:none}.trumbowyg-editor.trumbowyg-reset-css hr,.trumbowyg-editor.trumbowyg-reset-css iframe,.trumbowyg-editor.trumbowyg-reset-css object{margin-bottom:15px!important}.trumbowyg-editor.trumbowyg-reset-css blockquote{margin-left:32px!important;font-style:italic!important;color:#555}.trumbowyg-editor.trumbowyg-reset-css ol,.trumbowyg-editor.trumbowyg-reset-css ul{padding-left:20px!important}.trumbowyg-editor.trumbowyg-reset-css ol ol,.trumbowyg-editor.trumbowyg-reset-css ol ul,.trumbowyg-editor.trumbowyg-reset-css ul ol,.trumbowyg-editor.trumbowyg-reset-css ul ul{border:none;margin:2px!important;padding:0 0 0 24px!important}.trumbowyg-editor.trumbowyg-reset-css hr{display:block;height:1px;border:none;border-top:1px solid #CCC}.trumbowyg-editor.trumbowyg-reset-css h1,.trumbowyg-editor.trumbowyg-reset-css h2,.trumbowyg-editor.trumbowyg-reset-css h3,.trumbowyg-editor.trumbowyg-reset-css h4{color:#111;background:0 0;margin:0!important;padding:0!important;font-weight:700}.trumbowyg-editor.trumbowyg-reset-css h1{font-size:32px!important;line-height:38px!important;margin-bottom:20px!important}.trumbowyg-editor.trumbowyg-reset-css h2{font-size:26px!important;line-height:34px!important;margin-bottom:15px!important}.trumbowyg-editor.trumbowyg-reset-css h3{font-size:22px!important;line-height:28px!important;margin-bottom:7px!important}.trumbowyg-editor.trumbowyg-reset-css h4{font-size:16px!important;line-height:22px!important;margin-bottom:7px!important}.trumbowyg-dark .trumbowyg-textarea{background:#111;color:#ddd}.trumbowyg-dark .trumbowyg-box{border:1px solid #343434}.trumbowyg-dark .trumbowyg-box.trumbowyg-fullscreen{background:#111}.trumbowyg-dark .trumbowyg-box.trumbowyg-box-blur .trumbowyg-editor *,.trumbowyg-dark .trumbowyg-box.trumbowyg-box-blur .trumbowyg-editor::before{text-shadow:0 0 7px #ccc}@media screen and (min-width:0 \0){.trumbowyg-dark .trumbowyg-box.trumbowyg-box-blur .trumbowyg-editor *,.trumbowyg-dark .trumbowyg-box.trumbowyg-box-blur .trumbowyg-editor::before{color:rgba(20,20,20,.6)!important}}@supports (-ms-accelerator:true){.trumbowyg-dark .trumbowyg-box.trumbowyg-box-blur .trumbowyg-editor *,.trumbowyg-dark .trumbowyg-box.trumbowyg-box-blur .trumbowyg-editor::before{color:rgba(20,20,20,.6)!important}}.trumbowyg-dark .trumbowyg-box svg{fill:#ecf0f1;color:#ecf0f1}.trumbowyg-dark .trumbowyg-button-pane{background-color:#222;border-bottom-color:#343434}.trumbowyg-dark .trumbowyg-button-pane::after{background:#343434}.trumbowyg-dark .trumbowyg-button-pane .trumbowyg-button-group:not(:empty)::before{background-color:#343434}.trumbowyg-dark .trumbowyg-button-pane .trumbowyg-button-group:not(:empty) .trumbowyg-fullscreen-button svg{color:transparent}.trumbowyg-dark .trumbowyg-button-pane.trumbowyg-disable .trumbowyg-button-group::before{background-color:#2a2a2a}.trumbowyg-dark .trumbowyg-button-pane button.trumbowyg-active,.trumbowyg-dark .trumbowyg-button-pane button:not(.trumbowyg-disable):focus,.trumbowyg-dark .trumbowyg-button-pane button:not(.trumbowyg-disable):hover{background-color:#333}.trumbowyg-dark .trumbowyg-button-pane .trumbowyg-open-dropdown::after{border-top-color:#fff}.trumbowyg-dark .trumbowyg-fullscreen .trumbowyg-button-group .trumbowyg-fullscreen-button svg{color:#ecf0f1;fill:transparent}.trumbowyg-dark .trumbowyg-dropdown{border-color:#222;background:#333;box-shadow:rgba(0,0,0,.3) 0 2px 3px}.trumbowyg-dark .trumbowyg-dropdown button{background:#333;color:#fff!important}.trumbowyg-dark .trumbowyg-dropdown button:focus,.trumbowyg-dark .trumbowyg-dropdown button:hover{background:#222}.trumbowyg-dark .trumbowyg-modal-box{background-color:#222}.trumbowyg-dark .trumbowyg-modal-box .trumbowyg-modal-title{border-bottom:1px solid #555;color:#fff;background:#3c3c3c}.trumbowyg-dark .trumbowyg-modal-box label{display:block;position:relative;margin:15px 12px;height:27px;line-height:27px;overflow:hidden}.trumbowyg-dark .trumbowyg-modal-box label .trumbowyg-input-infos span{color:#eee;background-color:#2f2f2f;border-color:#222}.trumbowyg-dark .trumbowyg-modal-box label .trumbowyg-input-infos span.trumbowyg-msg-error{color:#e74c3c}.trumbowyg-dark .trumbowyg-modal-box label.trumbowyg-input-error input,.trumbowyg-dark .trumbowyg-modal-box label.trumbowyg-input-error textarea{border-color:#e74c3c}.trumbowyg-dark .trumbowyg-modal-box label input{border-color:#222;color:#eee;background:#333}.trumbowyg-dark .trumbowyg-modal-box label input:focus,.trumbowyg-dark .trumbowyg-modal-box label input:hover{border-color:#626262}.trumbowyg-dark .trumbowyg-modal-box label input:focus{background-color:#2f2f2f}.trumbowyg-dark .trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-submit{background:#1b7943}.trumbowyg-dark .trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-submit:focus,.trumbowyg-dark .trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-submit:hover{background:#25a25a}.trumbowyg-dark .trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-submit:active{background:#176437}.trumbowyg-dark .trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-reset{background:#333;color:#ccc}.trumbowyg-dark .trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-reset:focus,.trumbowyg-dark .trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-reset:hover{background:#444}.trumbowyg-dark .trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-reset:active{background:#111}.trumbowyg-dark .trumbowyg-overlay{background-color:rgba(15,15,15,.6)}
admin/js/trumbowyg/trumbowyg.min.js ADDED
@@ -0,0 +1,2 @@
 
 
1
+ /** Trumbowyg v2.1.0 - A lightweight WYSIWYG editor - alex-d.github.io/Trumbowyg - License MIT - Author : Alexandre Demode (Alex-D) / alex-d.fr */
2
+ jQuery.trumbowyg={langs:{en:{viewHTML:"View HTML",undo:"Undo",redo:"Redo",formatting:"Formatting",p:"Paragraph",blockquote:"Quote",code:"Code",header:"Header",bold:"Bold",italic:"Italic",strikethrough:"Stroke",underline:"Underline",strong:"Strong",em:"Emphasis",del:"Deleted",superscript:"Superscript",subscript:"Subscript",unorderedList:"Unordered list",orderedList:"Ordered list",insertImage:"Insert Image",link:"Link",createLink:"Insert link",unlink:"Remove link",justifyLeft:"Align Left",justifyCenter:"Align Center",justifyRight:"Align Right",justifyFull:"Align Justify",horizontalRule:"Insert horizontal rule",removeformat:"Remove format",fullscreen:"Fullscreen",close:"Close",submit:"Confirm",reset:"Cancel",required:"Required",description:"Description",title:"Title",text:"Text",target:"Target"}},plugins:{},svgPath:null},function(e,t,n,a){"use strict";a.fn.trumbowyg=function(e,t){var n="trumbowyg";if(e===Object(e)||!e)return this.each(function(){a(this).data(n)||a(this).data(n,new o(this,e))});if(1===this.length)try{var r=a(this).data(n);switch(e){case"execCmd":return r.execCmd(t.cmd,t.param,t.forceCss);case"openModal":return r.openModal(t.title,t.content);case"closeModal":return r.closeModal();case"openModalInsert":return r.openModalInsert(t.title,t.fields,t.callback);case"saveRange":return r.saveRange();case"getRange":return r.range;case"getRangeText":return r.getRangeText();case"restoreRange":return r.restoreRange();case"enable":return r.toggleDisable(!1);case"disable":return r.toggleDisable(!0);case"destroy":return r.destroy();case"empty":return r.empty();case"html":return r.html(t)}}catch(i){}return!1};var o=function(e,o){var r=this,i="trumbowyg-icons";r.doc=e.ownerDocument||n,r.$ta=a(e),r.$c=a(e),o=o||{},null!=o.lang||null!=a.trumbowyg.langs[o.lang]?r.lang=a.extend(!0,{},a.trumbowyg.langs.en,a.trumbowyg.langs[o.lang]):r.lang=a.trumbowyg.langs.en;var s=null!=a.trumbowyg.svgPath?a.trumbowyg.svgPath:o.svgPath;if(r.hasSvg=s!==!1,r.svgPath=r.doc.querySelector("base")?t.location:"",0===a("#"+i,r.doc).length&&s!==!1){if(null==s)try{throw new Error}catch(l){var d=l.stack.split("\n");for(var c in d)if(d[c].match(/http[s]?:\/\//)){s=d[Number(c)].match(/((http[s]?:\/\/.+\/)([^\/]+\.js)):/)[1].split("/"),s.pop(),s=s.join("/")+"/ui/icons.svg";break}}var u=r.doc.createElement("div");u.id=i,r.doc.body.insertBefore(u,r.doc.body.childNodes[0]),a.get(s,function(e){u.innerHTML=(new XMLSerializer).serializeToString(e.documentElement)})}var g=r.lang.header,f=function(){return(t.chrome||t.Intl&&Intl.v8BreakIterator)&&"CSS"in t};r.btnsDef={viewHTML:{fn:"toggle"},undo:{isSupported:f,key:"Z"},redo:{isSupported:f,key:"Y"},p:{fn:"formatBlock"},blockquote:{fn:"formatBlock"},h1:{fn:"formatBlock",title:g+" 1"},h2:{fn:"formatBlock",title:g+" 2"},h3:{fn:"formatBlock",title:g+" 3"},h4:{fn:"formatBlock",title:g+" 4"},subscript:{tag:"sub"},superscript:{tag:"sup"},bold:{key:"B"},italic:{key:"I"},underline:{tag:"u"},strikethrough:{tag:"strike"},strong:{fn:"bold",key:"B"},em:{fn:"italic",key:"I"},del:{fn:"strikethrough"},createLink:{key:"K",tag:"a"},unlink:{},insertImage:{},justifyLeft:{tag:"left",forceCss:!0},justifyCenter:{tag:"center",forceCss:!0},justifyRight:{tag:"right",forceCss:!0},justifyFull:{tag:"justify",forceCss:!0},unorderedList:{fn:"insertUnorderedList",tag:"ul"},orderedList:{fn:"insertOrderedList",tag:"ol"},horizontalRule:{fn:"insertHorizontalRule"},removeformat:{},fullscreen:{"class":"trumbowyg-not-disable"},close:{fn:"destroy","class":"trumbowyg-not-disable"},formatting:{dropdown:["p","blockquote","h1","h2","h3","h4"],ico:"p"},link:{dropdown:["createLink","unlink"]}},r.o=a.extend(!0,{},{lang:"en",fixedBtnPane:!1,fixedFullWidth:!1,autogrow:!1,prefix:"trumbowyg-",semantic:!0,resetCss:!1,removeformatPasted:!1,tagsToRemove:[],btnsGrps:{design:["bold","italic","underline","strikethrough"],semantic:["strong","em","del"],justify:["justifyLeft","justifyCenter","justifyRight","justifyFull"],lists:["unorderedList","orderedList"]},btns:[["viewHTML"],["undo","redo"],["formatting"],"btnGrp-semantic",["superscript","subscript"],["link"],["insertImage"],"btnGrp-justify","btnGrp-lists",["horizontalRule"],["removeformat"],["fullscreen"]],btnsDef:{},inlineElementsSelector:"a,abbr,acronym,b,caption,cite,code,col,dfn,dir,dt,dd,em,font,hr,i,kbd,li,q,span,strikeout,strong,sub,sup,u",pasteHandlers:[],imgDblClickHandler:function(){var e=a(this),t=e.attr("src"),n="(Base64)";return 0===t.indexOf("data:image")&&(t=n),r.openModalInsert(r.lang.insertImage,{url:{label:"URL",value:t,required:!0},alt:{label:r.lang.description,value:e.attr("alt")}},function(t){return t.src!==n&&e.attr({src:t.src}),e.attr({alt:t.alt}),!0}),!1},plugins:{}},o),r.disabled=r.o.disabled||"TEXTAREA"===e.nodeName&&e.disabled,o.btns?r.o.btns=o.btns:r.o.semantic||(r.o.btns[4]="btnGrp-design"),a.each(r.o.btnsDef,function(e,t){r.addBtnDef(e,t)}),r.keys=[],r.tagToButton={},r.tagHandlers=[],r.pasteHandlers=[].concat(r.o.pasteHandlers),r.init()};o.prototype={init:function(){var e=this;e.height=e.$ta.height(),e.initPlugins(),e.doc.execCommand("enableObjectResizing",!1,!1),e.doc.execCommand("defaultParagraphSeparator",!1,"p"),e.buildEditor(),e.buildBtnPane(),e.fixedBtnPaneEvents(),e.buildOverlay(),setTimeout(function(){e.disabled&&e.toggleDisable(!0),e.$c.trigger("tbwinit")})},addBtnDef:function(e,t){this.btnsDef[e]=t},buildEditor:function(){var e=this,n=e.o.prefix,o="";e.$box=a("<div/>",{"class":n+"box "+n+"editor-visible "+n+e.o.lang+" trumbowyg"}),e.isTextarea=e.$ta.is("textarea"),e.isTextarea?(o=e.$ta.val(),e.$ed=a("<div/>"),e.$box.insertAfter(e.$ta).append(e.$ed,e.$ta)):(e.$ed=e.$ta,o=e.$ed.html(),e.$ta=a("<textarea/>",{name:e.$ta.attr("id"),height:e.height}).val(o),e.$box.insertAfter(e.$ed).append(e.$ta,e.$ed),e.syncCode()),e.$ta.addClass(n+"textarea").attr("tabindex",-1),e.$ed.addClass(n+"editor").attr({contenteditable:!0,dir:e.lang._dir||"ltr"}).html(o),e.o.tabindex&&e.$ed.attr("tabindex",e.o.tabindex),e.$c.is("[placeholder]")&&e.$ed.attr("placeholder",e.$c.attr("placeholder")),e.o.resetCss&&e.$ed.addClass(n+"reset-css"),e.o.autogrow||e.$ta.add(e.$ed).css({height:e.height}),e.semanticCode(),e._ctrl=!1,e.$ed.on("dblclick","img",e.o.imgDblClickHandler).on("keydown",function(t){if(e._composition=229===t.which,t.ctrlKey){e._ctrl=!0;var n=e.keys[String.fromCharCode(t.which).toUpperCase()];try{return e.execCmd(n.fn,n.param),!1}catch(a){}}}).on("keyup",function(t){t.which>=37&&t.which<=40||(!t.ctrlKey||89!==t.which&&90!==t.which?e._ctrl||17===t.which||e._composition||(e.semanticCode(!1,13===t.which),e.$c.trigger("tbwchange")):e.$c.trigger("tbwchange"),setTimeout(function(){e._ctrl=!1},200))}).on("mouseup keydown keyup",function(){e.updateButtonPaneStatus()}).on("focus blur",function(t){e.$c.trigger("tbw"+t.type),"blur"===t.type&&a("."+n+"active-button",e.$btnPane).removeClass(n+"active-button "+n+"active")}).on("cut",function(){e.$c.trigger("tbwchange")}).on("paste",function(n){if(e.o.removeformatPasted){n.preventDefault();try{var o=t.clipboardData.getData("Text");try{e.doc.selection.createRange().pasteHTML(o)}catch(r){e.doc.getSelection().getRangeAt(0).insertNode(e.doc.createTextNode(o))}}catch(i){e.execCmd("insertText",(n.originalEvent||n).clipboardData.getData("text/plain"))}}a.each(e.pasteHandlers,function(e,t){t(n)}),setTimeout(function(){e.o.semantic?e.semanticCode(!1,!0):e.syncCode(),e.$c.trigger("tbwpaste",n)},0)}),e.$ta.on("keyup paste",function(){e.$c.trigger("tbwchange")}),a(e.doc).on("keydown",function(t){return 27===t.which?(e.closeModal(),!1):void 0})},buildBtnPane:function(){var e=this,t=e.o.prefix,n=e.$btnPane=a("<div/>",{"class":t+"button-pane"});a.each(e.o.btns,function(o,r){try{var i=r.split("btnGrp-");null!=i[1]&&(r=e.o.btnsGrps[i[1]])}catch(s){}a.isArray(r)||(r=[r]);var l=a("<div/>",{"class":t+"button-group "+(r.indexOf("fullscreen")>=0?t+"right":"")});a.each(r,function(t,n){try{var a;e.isSupportedBtn(n)&&(a=e.buildBtn(n)),l.append(a)}catch(o){}}),n.append(l)}),e.$box.prepend(n)},buildBtn:function(e){var t=this,n=t.o.prefix,o=t.btnsDef[e],r=o.dropdown,i=t.lang[e]||e,s=a("<button/>",{type:"button","class":n+e+"-button "+(o["class"]||""),html:t.hasSvg?'<svg><use xlink:href="'+t.svgPath+"#"+n+(o.ico||e).replace(/([A-Z]+)/g,"-$1").toLowerCase()+'"/></svg>':"",title:(o.title||o.text||i)+(o.key?" (Ctrl + "+o.key+")":""),tabindex:-1,mousedown:function(){return(!r||a("."+e+"-"+n+"dropdown",t.$box).is(":hidden"))&&a("body",t.doc).trigger("mousedown"),!t.$btnPane.hasClass(n+"disable")||a(this).hasClass(n+"active")||a(this).hasClass(n+"not-disable")?(t.execCmd((r?"dropdown":!1)||o.fn||e,o.param||e,o.forceCss||!1),!1):!1}});if(r){s.addClass(n+"open-dropdown");var l=n+"dropdown",d=a("<div/>",{"class":l+"-"+e+" "+l+" "+n+"fixed-top","data-dropdown":e});a.each(r,function(e,n){t.btnsDef[n]&&t.isSupportedBtn(n)&&d.append(t.buildSubBtn(n))}),t.$box.append(d.hide())}else o.key&&(t.keys[o.key]={fn:o.fn||e,param:o.param||e});return r||(t.tagToButton[(o.tag||e).toLowerCase()]=e),s},buildSubBtn:function(e){var t=this,n=t.o.prefix,o=t.btnsDef[e];return o.key&&(t.keys[o.key]={fn:o.fn||e,param:o.param||e}),t.tagToButton[(o.tag||e).toLowerCase()]=e,a("<button/>",{type:"button","class":n+e+"-dropdown-button"+(o.ico?" "+n+o.ico+"-button":""),html:t.hasSvg?'<svg><use xlink:href="'+t.svgPath+"#"+n+(o.ico||e).replace(/([A-Z]+)/g,"-$1").toLowerCase()+'"/></svg>'+(o.text||o.title||t.lang[e]||e):"",title:o.key?" (Ctrl + "+o.key+")":null,style:o.style||null,mousedown:function(){return a("body",t.doc).trigger("mousedown"),t.execCmd(o.fn||e,o.param||e,o.forceCss||!1),!1}})},isSupportedBtn:function(e){try{return this.btnsDef[e].isSupported()}catch(t){}return!0},buildOverlay:function(){var e=this;return e.$overlay=a("<div/>",{"class":e.o.prefix+"overlay"}).css({top:e.$btnPane.outerHeight(),height:e.$ed.outerHeight()+1+"px"}).appendTo(e.$box),e.$overlay},showOverlay:function(){var e=this;a(t).trigger("scroll"),e.$overlay.fadeIn(200),e.$box.addClass(e.o.prefix+"box-blur")},hideOverlay:function(){var e=this;e.$overlay.fadeOut(50),e.$box.removeClass(e.o.prefix+"box-blur")},fixedBtnPaneEvents:function(){var e=this,n=e.o.fixedFullWidth,o=e.$box;e.o.fixedBtnPane&&(e.isFixed=!1,a(t).on("scroll resize",function(){if(o){e.syncCode();var r=a(t).scrollTop(),i=o.offset().top+1,s=e.$btnPane,l=s.outerHeight()-2;r-i>0&&r-i-e.height<0?(e.isFixed||(e.isFixed=!0,s.css({position:"fixed",top:0,left:n?"0":"auto",zIndex:7}),a([e.$ta,e.$ed]).css({marginTop:s.height()})),s.css({width:n?"100%":o.width()-1+"px"}),a("."+e.o.prefix+"fixed-top",o).css({position:n?"fixed":"absolute",top:n?l:l+(r-i)+"px",zIndex:15})):e.isFixed&&(e.isFixed=!1,s.removeAttr("style"),a([e.$ta,e.$ed]).css({marginTop:0}),a("."+e.o.prefix+"fixed-top",o).css({position:"absolute",top:l}))}}))},toggleDisable:function(e){var t=this,n=t.o.prefix;t.disabled=e,e?t.$ta.attr("disabled",!0):t.$ta.removeAttr("disabled"),t.$box.toggleClass(n+"disabled",e),t.$ed.attr("contenteditable",!e)},destroy:function(){var e=this,t=e.o.prefix,n=e.height;e.isTextarea?e.$box.after(e.$ta.css({height:n}).val(e.html()).removeClass(t+"textarea").show()):e.$box.after(e.$ed.css({height:n}).removeClass(t+"editor").removeAttr("contenteditable").html(e.html()).show()),e.$ed.off("dblclick","img"),e.destroyPlugins(),e.$box.remove(),e.$c.removeData("trumbowyg"),a("body").removeClass(t+"body-fullscreen")},empty:function(){this.$ta.val(""),this.syncCode(!0)},toggle:function(){var e=this,t=e.o.prefix;e.semanticCode(!1,!0),setTimeout(function(){e.doc.activeElement.blur(),e.$box.toggleClass(t+"editor-hidden "+t+"editor-visible"),e.$btnPane.toggleClass(t+"disable"),a("."+t+"viewHTML-button",e.$btnPane).toggleClass(t+"active"),e.$box.hasClass(t+"editor-visible")?e.$ta.attr("tabindex",-1):e.$ta.removeAttr("tabindex")},0)},dropdown:function(e){var n=this,o=n.doc,r=n.o.prefix,i=a("[data-dropdown="+e+"]",n.$box),s=a("."+r+e+"-button",n.$btnPane),l=i.is(":hidden");if(a("body",o).trigger("mousedown"),l){var d=s.offset().left;s.addClass(r+"active"),i.css({position:"absolute",top:s.offset().top-n.$btnPane.offset().top+s.outerHeight(),left:n.o.fixedFullWidth&&n.isFixed?d+"px":d-n.$btnPane.offset().left+"px"}).show(),a(t).trigger("scroll"),a("body",o).on("mousedown",function(){a("."+r+"dropdown",o).hide(),a("."+r+"active",o).removeClass(r+"active"),a("body",o).off("mousedown")})}},html:function(e){var t=this;return null!=e?(t.$ta.val(e),t.syncCode(!0),t):t.$ta.val()},syncTextarea:function(){var e=this;e.$ta.val(e.$ed.text().trim().length>0||e.$ed.find("hr,img,embed,input").length>0?e.$ed.html():"")},syncCode:function(e){var t=this;!e&&t.$ed.is(":visible")?t.syncTextarea():t.$ed.html(t.$ta.val()),t.o.autogrow&&(t.height=t.$ed.height(),t.height!==t.$ta.css("height")&&(t.$ta.css({height:t.height}),t.$c.trigger("tbwresize")))},semanticCode:function(e,t){var n=this;if(n.saveRange(),n.syncCode(e),a(n.o.tagsToRemove.join(","),n.$ed).remove(),n.o.semantic){if(n.semanticTag("b","strong"),n.semanticTag("i","em"),n.semanticTag("strike","del"),t){var o=n.o.inlineElementsSelector,r=":not("+o+")";n.$ed.contents().filter(function(){return 3===this.nodeType&&this.nodeValue.trim().length>0}).wrap("<span data-tbw/>");var i=function(e){if(0!==e.length){var t=e.nextUntil(r).andSelf().wrapAll("<p/>").parent(),n=t.nextAll(o).first();t.next("br").remove(),i(n)}};i(n.$ed.children(o).first()),n.semanticTag("div","p",!0),n.$ed.find("p").filter(function(){return n.range&&this===n.range.startContainer?!1:0===a(this).text().trim().length&&0===a(this).children().not("br,span").length}).contents().unwrap(),a("[data-tbw]",n.$ed).contents().unwrap(),n.$ed.find("p:empty").remove()}n.restoreRange(),n.syncTextarea()}},semanticTag:function(e,t,n){a(e,this.$ed).each(function(){var e=a(this);e.wrap("<"+t+"/>"),n&&a.each(e.prop("attributes"),function(){e.parent().attr(this.name,this.value)}),e.contents().unwrap()})},createLink:function(){for(var e,t,n,o=this,r=o.doc.getSelection(),i=r.focusNode;["A","DIV"].indexOf(i.nodeName)<0;)i=i.parentNode;if(i&&"A"===i.nodeName){var s=a(i);e=s.attr("href"),t=s.attr("title"),n=s.attr("target");var l=o.doc.createRange();l.selectNode(i),r.addRange(l)}o.saveRange(),o.openModalInsert(o.lang.createLink,{url:{label:"URL",required:!0,value:e},title:{label:o.lang.title,value:t},text:{label:o.lang.text,value:o.getRangeText()},target:{label:o.lang.target,value:n}},function(e){var t=a(['<a href="',e.url,'">',e.text,"</a>"].join(""));return e.title.length>0&&t.attr("title",e.title),e.target.length>0&&t.attr("target",e.target),o.range.deleteContents(),o.range.insertNode(t[0]),!0})},unlink:function(){var e=this,t=e.doc.getSelection(),n=t.focusNode;if(t.isCollapsed){for(;["A","DIV"].indexOf(n.nodeName)<0;)n=n.parentNode;if(n&&"A"===n.nodeName){var a=e.doc.createRange();a.selectNode(n),t.addRange(a)}}e.execCmd("unlink",void 0,void 0,!0)},insertImage:function(){var e=this;e.saveRange(),e.openModalInsert(e.lang.insertImage,{url:{label:"URL",required:!0},alt:{label:e.lang.description,value:e.getRangeText()}},function(t){return e.execCmd("insertImage",t.url),a('img[src="'+t.url+'"]:not([alt])',e.$box).attr("alt",t.alt),!0})},fullscreen:function(){var e,n=this,o=n.o.prefix,r=o+"fullscreen";n.$box.toggleClass(r),e=n.$box.hasClass(r),a("body").toggleClass(o+"body-fullscreen",e),a(t).trigger("scroll"),n.$c.trigger("tbw"+(e?"open":"close")+"fullscreen")},execCmd:function(t,n,a,o){var r=this;o=!!o||"","dropdown"!==t&&r.$ed.focus(),r.doc.execCommand("styleWithCSS",!1,a||!1);try{r[t+o](n)}catch(i){try{t(n)}catch(s){"insertHorizontalRule"===t?n=void 0:"formatBlock"!==t||-1===e.userAgent.indexOf("MSIE")&&-1===e.appVersion.indexOf("Trident/")||(n="<"+n+">"),r.doc.execCommand(t,!1,n),r.syncCode(),r.semanticCode(!1,!0)}"dropdown"!==t&&(r.updateButtonPaneStatus(),r.$c.trigger("tbwchange"))}},openModal:function(e,n){var o=this,r=o.o.prefix;if(a("."+r+"modal-box",o.$box).length>0)return!1;o.saveRange(),o.showOverlay(),o.$btnPane.addClass(r+"disable");var i=a("<div/>",{"class":r+"modal "+r+"fixed-top"}).css({top:o.$btnPane.height()}).appendTo(o.$box);o.$overlay.one("click",function(){return i.trigger("tbwcancel"),!1});var s=a("<form/>",{action:"",html:n}).on("submit",function(){return i.trigger("tbwconfirm"),!1}).on("reset",function(){return i.trigger("tbwcancel"),!1}),l=a("<div/>",{"class":r+"modal-box",html:s}).css({top:"-"+o.$btnPane.outerHeight()+"px",opacity:0}).appendTo(i).animate({top:0,opacity:1},100);return a("<span/>",{text:e,"class":r+"modal-title"}).prependTo(l),i.height(l.outerHeight()+10),a("input:first",l).focus(),o.buildModalBtn("submit",l),o.buildModalBtn("reset",l),a(t).trigger("scroll"),i},buildModalBtn:function(e,t){var n=this,o=n.o.prefix;return a("<button/>",{"class":o+"modal-button "+o+"modal-"+e,type:e,text:n.lang[e]||e}).appendTo(a("form",t))},closeModal:function(){var e=this,t=e.o.prefix;e.$btnPane.removeClass(t+"disable"),e.$overlay.off();var n=a("."+t+"modal-box",e.$box);n.animate({top:"-"+n.height()},100,function(){n.parent().remove(),e.hideOverlay()}),e.restoreRange()},openModalInsert:function(e,t,n){var o=this,r=o.o.prefix,i=o.lang,s="",l="tbwconfirm";return a.each(t,function(e,t){var n=t.label,a=t.name||e;s+='<label><input type="'+(t.type||"text")+'" name="'+a+'" value="'+(t.value||"").replace(/"/g,"&quot;")+'"><span class="'+r+'input-infos"><span>'+(n?i[n]?i[n]:n:i[e]?i[e]:e)+"</span></span></label>"}),o.openModal(e,s).on(l,function(){var e=a("form",a(this)),r=!0,i={};a.each(t,function(t,n){var s=a('input[name="'+t+'"]',e);i[t]=a.trim(s.val()),n.required&&""===i[t]?(r=!1,o.addErrorOnModalField(s,o.lang.required)):n.pattern&&!n.pattern.test(i[t])&&(r=!1,o.addErrorOnModalField(s,n.patternError))}),r&&(o.restoreRange(),n(i,t)&&(o.syncCode(),o.$c.trigger("tbwchange"),o.closeModal(),a(this).off(l)))}).one("tbwcancel",function(){a(this).off(l),o.closeModal()})},addErrorOnModalField:function(e,t){var n=this.o.prefix,o=e.parent();e.on("change keyup",function(){o.removeClass(n+"input-error")}),o.addClass(n+"input-error").find("input+span").append(a("<span/>",{"class":n+"msg-error",text:t}))},saveRange:function(){var e=this,t=e.doc.getSelection();if(e.range=null,t.rangeCount){var n,a=e.range=t.getRangeAt(0),o=e.doc.createRange();o.selectNodeContents(e.$ed[0]),o.setEnd(a.startContainer,a.startOffset),n=(o+"").length,e.metaRange={start:n,end:n+(a+"").length}}},restoreRange:function(){var e,t=this,n=t.metaRange,a=t.range,o=t.doc.getSelection();if(a){if(n&&n.start!==n.end){var r,i=0,s=[t.$ed[0]],l=!1,d=!1;for(e=t.doc.createRange();!d&&(r=s.pop());)if(3===r.nodeType){var c=i+r.length;!l&&n.start>=i&&n.start<=c&&(e.setStart(r,n.start-i),l=!0),l&&n.end>=i&&n.end<=c&&(e.setEnd(r,n.end-i),d=!0),i=c}else for(var u=r.childNodes,g=u.length;g>0;)g-=1,s.push(u[g])}o.removeAllRanges(),o.addRange(e||a)}},getRangeText:function(){return this.range+""},updateButtonPaneStatus:function(){var e=this,t=e.o.prefix,n=e.getTagsRecursive(e.doc.getSelection().focusNode.parentNode),o=t+"active-button "+t+"active";a("."+t+"active-button",e.$btnPane).removeClass(o),a.each(n,function(n,r){var i=e.tagToButton[r.toLowerCase()],s=a("."+t+i+"-button",e.$btnPane);if(s.length>0)s.addClass(o);else try{s=a("."+t+"dropdown ."+t+i+"-dropdown-button",e.$box);var l=s.parent().data("dropdown");a("."+t+l+"-button",e.$box).addClass(o)}catch(d){}})},getTagsRecursive:function(e,t){var n=this;t=t||[];var o=e.tagName;return"DIV"===o?t:("P"===o&&""!==e.style.textAlign&&t.push(e.style.textAlign),a.each(n.tagHandlers,function(a,o){t=t.concat(o(e,n))}),t.push(o),n.getTagsRecursive(e.parentNode,t))},initPlugins:function(){var e=this;e.loadedPlugins=[],a.each(a.trumbowyg.plugins,function(t,n){(!n.shouldInit||n.shouldInit(e))&&(n.init(e),n.tagHandler&&e.tagHandlers.push(n.tagHandler),e.loadedPlugins.push(n))})},destroyPlugins:function(){a.each(this.loadedPlugins,function(e,t){t.destroy&&t.destroy()})}}}(navigator,window,document,jQuery);
admin/mobile_sharebar.php ADDED
@@ -0,0 +1,158 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Mobile sharebar settings page
4
+ *
5
+ **/
6
+
7
+ class wpsr_admin_mobile_sharebar{
8
+
9
+ function __construct(){
10
+
11
+ WPSR_Admin::add_tab( 'mobile_sharebar', array(
12
+ 'name' => 'Mobile sharebar',
13
+ 'page_callback' => array( $this, 'page' ),
14
+ 'banner' => WPSR_ADMIN_URL . '/images/banners/mobile-sharebar.png',
15
+ 'form' => array(
16
+ 'id' => 'mobile_sharebar_settings',
17
+ 'name' => 'mobile_sharebar_settings',
18
+ 'callback' => array( $this, 'form_fields' ),
19
+ 'validation' => array( $this, 'validation' ),
20
+ )
21
+ ));
22
+
23
+ }
24
+
25
+ function form_fields( $values ){
26
+
27
+ $values = wp_parse_args( $values, WPSR_Lists::defaults( 'mobile_sharebar' ) );
28
+
29
+ $section0 = array(
30
+ array( __( 'Select to enable or disable mobile sharebar feature', 'wpsr' ), WPSR_Admin::field( 'select', array(
31
+ 'name' => 'ft_status',
32
+ 'value' => $values[ 'ft_status' ],
33
+ 'list' => array(
34
+ 'enable' => __( 'Enable mobile sharebar', 'wpsr' ),
35
+ 'disable' => __( 'Disable mobile sharebar', 'wpsr' )
36
+ ),
37
+ )), 'class="ft_table"' ),
38
+ );
39
+
40
+ WPSR_Admin::youtube_help_icon( 'https://www.youtube.com/watch?v=icWCD2xuxjQ' );
41
+
42
+ WPSR_Admin::build_table( $section0, __( 'Enable/disable mobile sharebar', 'wpsr' ), '', false, '1' );
43
+
44
+ echo '<div class="feature_wrap">';
45
+
46
+ $sb_sites = WPSR_Lists::social_buttons();
47
+
48
+ WPSR_Admin::box_wrap( 'open', __( 'Add buttons to mobile sharebar', 'wpsr' ), __( 'Select buttons from the list below and add it to the selected list.', 'wpsr' ), '2' );
49
+ echo '<table class="form-table"><tr><td width="90%">';
50
+ echo '<select class="ssb_list widefat">';
51
+ foreach( $sb_sites as $id=>$prop ){
52
+ echo '<option value="' . $id . '">' . $prop[ 'name' ] . '</option>';
53
+ }
54
+ echo '</select>';
55
+ echo '</td><td>';
56
+ echo '<button class="button button-primary ssb_add">' . __( 'Add button', 'wpsr' ) . '</button>';
57
+ echo '</td></tr></table>';
58
+
59
+ echo '<h4>' . __( 'Selected buttons', 'wpsr' ) . '</h4>';
60
+
61
+ $decoded = base64_decode( $values[ 'template' ] );
62
+ $msb_btns = json_decode( $decoded );
63
+
64
+ if( !is_array( $msb_btns ) ){
65
+ $msb_btns = array();
66
+ }
67
+
68
+ echo '<ul class="ssb_selected_list clearfix">';
69
+ if( count( $msb_btns ) > 0 ){
70
+ foreach( $msb_btns as $msb_item ){
71
+ $sb_info = $sb_sites[ $msb_item ];
72
+ echo '<li title="' . $sb_info[ 'name' ] . '" data-id="' . $msb_item . '"><i class="fa fa-' . $sb_info[ 'icon' ] . '"></i> <span class="ssb_remove" title="' . __( 'Delete button', 'wpsr' ) . '">x</span></li>';
73
+ }
74
+ }else{
75
+ echo '<span class="ssb_empty">' . __( 'No buttons are selected for text sharebar', 'wpsr' ) . '</span>';
76
+ }
77
+ echo '</ul>';
78
+ echo '<input type="hidden" name="template" class="ssb_template" value="' . $values[ 'template' ] . '"/>';
79
+
80
+ WPSR_Admin::box_wrap( 'close' );
81
+
82
+ # Settings form
83
+ $section2 = array(
84
+
85
+ array( __( 'Button size', 'wpsr' ), WPSR_Admin::field( 'select', array(
86
+ 'name' => 'size',
87
+ 'value' => $values['size'],
88
+ 'list' => array(
89
+ '32px' => '32px',
90
+ '48px' => '48px',
91
+ '64px' => '64px',
92
+ )
93
+ ))),
94
+
95
+ array( __( 'Button background color', 'wpsr' ), WPSR_Admin::field( 'text', array(
96
+ 'name' => 'bg_color',
97
+ 'value' => $values['bg_color'],
98
+ 'class' => 'color_picker',
99
+ 'helper' => __( 'Set empty value to use automatic background color', 'wpsr' )
100
+ ))),
101
+
102
+ array( __( 'Icon color', 'wpsr' ), WPSR_Admin::field( 'text', array(
103
+ 'name' => 'icon_color',
104
+ 'value' => $values['icon_color'],
105
+ 'class' => 'color_picker'
106
+ ))),
107
+
108
+ array( __( 'Gutters', 'wpsr' ), WPSR_Admin::field( 'select', array(
109
+ 'name' => 'pad',
110
+ 'value' => $values['pad'],
111
+ 'list' => array(
112
+ '' => __( 'No', 'wpsr' ),
113
+ 'pad' => __( 'yes', 'wpsr' )
114
+ ),
115
+ 'helper' => __( 'Select to add space between buttons', 'wpsr' )
116
+ ))),
117
+
118
+ array( __( 'Show sharebar on desktops ?', 'wpsr' ), WPSR_Admin::field( 'select', array(
119
+ 'name' => 'on_desktop',
120
+ 'value' => $values['on_desktop'],
121
+ 'list' => array(
122
+ 'no' => __( 'No', 'wpsr' ),
123
+ 'yes' => __( 'yes', 'wpsr' )
124
+ ),
125
+ ))),
126
+
127
+ );
128
+ WPSR_Admin::build_table( $section2, __( 'Settings', 'wpsr' ), '', false, '3' );
129
+
130
+ // Location rules
131
+ WPSR_Admin::box_wrap( 'open', __( 'Conditions to display the mobile sharebar', 'wpsr' ), __( 'Choose the below options to select the pages which will display the mobile sharebar.', 'wpsr' ), '4' );
132
+ WPSR_Location_Rules::display_rules( "loc_rules", $values['loc_rules'] );
133
+ WPSR_Admin::box_wrap( 'close' );
134
+
135
+ echo '</div>';
136
+
137
+ echo '<script>';
138
+ echo 'var sb_sites = ' . json_encode( $sb_sites ) . ';';
139
+ echo '</script>';
140
+
141
+ }
142
+
143
+
144
+ function page(){
145
+
146
+ WPSR_Admin::settings_form( 'mobile_sharebar' );
147
+
148
+ }
149
+
150
+ function validation( $input ){
151
+ return $input;
152
+ }
153
+
154
+ }
155
+
156
+ new wpsr_admin_mobile_sharebar();
157
+
158
+ ?>
admin/sharebar.php ADDED
@@ -0,0 +1,229 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Buttons selection page
4
+ *
5
+ **/
6
+
7
+ class wpsr_admin_sharebar{
8
+
9
+ function __construct(){
10
+
11
+ WPSR_Admin::add_tab( 'sharebar', array(
12
+ 'name' => 'Floating sharebar',
13
+ 'banner' => WPSR_ADMIN_URL . '/images/banners/sharebar.png',
14
+ 'page_callback' => array( $this, 'page' ),
15
+ 'form' => array(
16
+ 'id' => 'sharebar_settings',
17
+ 'name' => 'sharebar_settings',
18
+ 'callback' => array( $this, 'form_fields' ),
19
+ 'validation' => array( $this, 'validation' ),
20
+ )
21
+ ));
22
+
23
+ }
24
+
25
+ function form_fields( $values ){
26
+
27
+ $values = wp_parse_args( $values, WPSR_Lists::defaults( 'sharebar' ) );
28
+
29
+ $feature = array(
30
+ 'name' => 'sharebar',
31
+ 'hide_services' => array()
32
+ );
33
+
34
+ $section0 = array(
35
+ array( __( 'Select to enable or disable sharebar feature', 'wpsr' ), WPSR_Admin::field( 'select', array(
36
+ 'name' => 'ft_status',
37
+ 'value' => $values[ 'ft_status' ],
38
+ 'list' => array(
39
+ 'enable' => __( 'Enable sharebar', 'wpsr' ),
40
+ 'disable' => __( 'Disable sharebar', 'wpsr' )
41
+ ),
42
+ )), 'class="ft_table"' ),
43
+ );
44
+
45
+ WPSR_Admin::youtube_help_icon( 'https://www.youtube.com/watch?v=_TVVXeyt8Gw' );
46
+
47
+ WPSR_Admin::build_table( $section0, __( 'Enable/disable sharebar', 'wpsr' ), '', false, '1' );
48
+
49
+ echo '<div class="feature_wrap">';
50
+ WPSR_Admin::box_wrap( 'open', __( 'Create buttons for sharebar', 'wpsr' ), __( 'Select a service from the list to create a new button', 'wpsr' ), '2' );
51
+ WPSR_Admin::buttons_selector( $feature );
52
+
53
+ echo '<p>' . __( 'Created buttons', 'wpsr' ) . '</p>';
54
+ $buttons = WPSR_Buttons::list_all();
55
+ WPSR_Admin::buttons_list( 'all_buttons', $feature );
56
+
57
+ echo '<p>' .__( 'Drag the buttons from the above list and drop it into the template below.', 'wpsr' ) . '</p>';
58
+ WPSR_Admin::buttons_veditor( "buttons", $values['buttons'], false, false );
59
+
60
+ WPSR_Admin::box_wrap( 'close' );
61
+
62
+ $sb_types = array(
63
+ 'vertical' => __( 'Vertical', 'wpsr' ),
64
+ 'horizontal' => __( 'Horizontal', 'wpsr' ),
65
+ );
66
+
67
+ $sb_bar_positions = array(
68
+ 'vertical' => array(
69
+ 'scontent' => __( 'Stick to content', 'wpsr' ),
70
+ 'wleft' => __( 'Left of the window', 'wpsr' ),
71
+ 'wright' => __( 'Right of the window', 'wpsr' )
72
+ ),
73
+ 'horizontal' => array(
74
+ 'wbottom' => __( 'Bottom of the window', 'wpsr' ),
75
+ 'wtop' => __( 'Top of the window', 'wpsr' )
76
+ )
77
+ );
78
+
79
+ $section1 = array(
80
+ array( __( 'Sharebar type', 'wpsr' ), WPSR_Admin::field( 'select', array(
81
+ 'name' => 'type',
82
+ 'value' => $values['type'],
83
+ 'list' => $sb_types,
84
+ 'helper' => __( 'The type of sharebar to be shown in main page', 'wpsr' ),
85
+ 'tip' => WPSR_ADMIN_URL . '/images/tips/sb-types.png'
86
+ ))),
87
+
88
+ array( __( 'Vertical sharebar position', 'wpsr' ), WPSR_Admin::field( 'select', array(
89
+ 'name' => 'vl_position',
90
+ 'value' => $values['vl_position'],
91
+ 'list' => $sb_bar_positions[ 'vertical' ],
92
+ 'helper' => __( 'The position of the vertical sharebar in the page', 'wpsr' )
93
+ )), 'data-conditioner data-condr-input="[name=type]" data-condr-value="vertical" data-condr-action="simple?show:hide" data-condr-events="click"'),
94
+
95
+ array( __( 'Horizontal sharebar position', 'wpsr' ), WPSR_Admin::field( 'select', array(
96
+ 'name' => 'hl_position',
97
+ 'value' => $values['hl_position'],
98
+ 'list' => $sb_bar_positions[ 'horizontal' ],
99
+ 'helper' => __( 'The position of the horizontal sharebar in the page', 'wpsr' )
100
+ )), 'data-conditioner data-condr-input="[name=type]" data-condr-value="horizontal" data-condr-action="simple?show:hide" data-condr-events="click"'),
101
+
102
+ array( __( 'ID or class name of the content to stick with', 'wpsr' ), WPSR_Admin::field( 'text', array(
103
+ 'name' => 'stick_element',
104
+ 'value' => $values['stick_element'],
105
+ 'placeholder' => 'Ex: #content',
106
+ 'qtip' => 'https://www.youtube.com/watch?v=GQ1YO0xZ7WA'
107
+ )), 'class="tbl_row_stick_cnt"' ),
108
+
109
+ );
110
+
111
+ WPSR_Admin::build_table( $section1, __( 'Sharebar type', 'wpsr' ), '', false, '3' );
112
+
113
+
114
+ $themes = array(
115
+ 'simple' => __( 'Simple', 'wpsr' ),
116
+ 'simple-sq' => __( 'Simple - Square edges', 'wpsr' ),
117
+ 'simple-ns' => __( 'Simple - No Shadow', 'wpsr' ),
118
+ );
119
+
120
+ $mv_sharebar = array(
121
+ 'move' => __( 'Move when page scrolls', 'wpsr' ),
122
+ 'static' => __( 'Static, no movement', 'wpsr' )
123
+ );
124
+
125
+ $section2 = array(
126
+
127
+ array( __( 'Theme', 'wpsr' ), WPSR_Admin::field( 'select', array(
128
+ 'name' => 'theme',
129
+ 'value' => $values['theme'],
130
+ 'list' => apply_filters( 'wpsr_mod_sharebar_themes', $themes ),
131
+ ))),
132
+
133
+ /*
134
+ array( 'Horizontal sharebar width', WPSR_Admin::field( 'text', array(
135
+ 'name' => 'hl_width',
136
+ 'value' => $values['hl_width'],
137
+ 'placeholder' => 'Enter width of the sharebar. Ex: 800px',
138
+ )), 'data-conditioner data-condr-input="[name=type]" data-condr-value="horizontal" data-condr-action="simple?show:hide" data-condr-events="click" '),
139
+ */
140
+
141
+ array( __( 'Sharebar movement', 'wpsr' ), WPSR_Admin::field( 'select', array(
142
+ 'name' => 'vl_movement',
143
+ 'value' => $values['vl_movement'],
144
+ 'list' => $mv_sharebar,
145
+ )), 'data-conditioner data-condr-input="[name=type]" data-condr-value="vertical" data-condr-action="simple?show:hide" data-condr-events="click" '),
146
+
147
+ array( __( 'Background color', 'wpsr' ), WPSR_Admin::field( 'text', array(
148
+ 'name' => 'bg_color',
149
+ 'value' => $values['bg_color'],
150
+ 'class' => 'color_picker',
151
+ 'helper' => __( 'Set empty value for transparency', 'wpsr' ),
152
+ ))),
153
+
154
+ array( __( 'Border color', 'wpsr' ), WPSR_Admin::field( 'text', array(
155
+ 'name' => 'border_color',
156
+ 'value' => $values['border_color'],
157
+ 'class' => 'color_picker',
158
+ ))),
159
+
160
+ array( __( 'Open, close button color', 'wpsr' ), WPSR_Admin::field( 'select', array(
161
+ 'name' => 'oc_color',
162
+ 'value' => $values['oc_color'],
163
+ 'list' => array(
164
+ 'black' => __( 'Black', 'wpsr' ),
165
+ 'white' => __( 'White', 'wpsr' )
166
+ ),
167
+ ))),
168
+
169
+ array( __( 'Additional CSS styles', 'wpsr' ), WPSR_Admin::field( 'text', array(
170
+ 'name' => 'css_class',
171
+ 'value' => $values['css_class'],
172
+ 'placeholder' => __( 'Enter CSS class name separated by comma', 'wpsr' ),
173
+ ))),
174
+
175
+ );
176
+
177
+ WPSR_Admin::build_table( $section2, __( 'Customization', 'wpsr' ), '', false, '4' );
178
+
179
+ WPSR_Admin::box_wrap( 'open', __( 'Preview and adjust the position of sharebar', 'wpsr' ), __( 'Click the button below to preview the sharebar and adjust its position in page.', 'wpsr' ), '5' );
180
+ echo '<button class="button sharebar_preview_btn" title="' . __( 'Click to show preview for sharebar', 'wpsr' ) . '">' . __( 'Open preview and adjust position', 'wpsr' ) . '</button>';
181
+ echo '<div class="sharebar_preview_iwrap"><iframe src=""></iframe></div>';
182
+ echo '<input type="hidden" class="regular-text" name="offset" value="' . $values['offset'] . '">';
183
+ WPSR_Admin::box_wrap( 'close' );
184
+
185
+ // Location rules
186
+ WPSR_Admin::box_wrap( 'open', __( 'Conditions to display the sharebar', 'wpsr' ), __( 'Choose the below options to select the pages which will display the sharebar.', 'wpsr' ), '6' );
187
+ WPSR_Location_Rules::display_rules( "loc_rules", $values['loc_rules'] );
188
+ WPSR_Admin::box_wrap( 'close' );
189
+
190
+ echo '<script>jQuery(document).ready(function(){
191
+ jQuery( ".tbl_row_stick_cnt" ).conditioner({
192
+ conditions: [
193
+ {
194
+ input: "[name=type]",
195
+ type: "simple",
196
+ value: "vertical"
197
+ },
198
+ {
199
+ input: "[name=vl_position]",
200
+ type: "simple",
201
+ value: "scontent"
202
+ }
203
+ ],
204
+ events: "click",
205
+ onTrue: function(){ jQuery(this).show(); },
206
+ onFalse: function(){ jQuery(this).hide(); }
207
+ });
208
+ });</script>';
209
+
210
+ echo '</div>';
211
+
212
+ }
213
+
214
+
215
+ function page(){
216
+
217
+ WPSR_Admin::settings_form( 'sharebar' );
218
+
219
+ }
220
+
221
+ function validation( $input ){
222
+ return $input;
223
+ }
224
+
225
+ }
226
+
227
+ new wpsr_admin_sharebar();
228
+
229
+ ?>
admin/templates/images/Thumbs.db DELETED
Binary file
admin/templates/images/template_2_compact.PNG DELETED
Binary file
admin/templates/images/template_2_large_inv.PNG DELETED
Binary file
admin/templates/images/template_addthis_compact.png DELETED
Binary file
admin/templates/images/template_addthis_large.png DELETED
Binary file
admin/templates/images/template_compact.png DELETED
Binary file
admin/templates/images/template_compact_inv.png DELETED
Binary file
admin/templates/images/template_large.png DELETED
Binary file
admin/templates/images/template_large_inv.png DELETED
Binary file
admin/templates/images/template_sharethis_compact.png DELETED
Binary file
admin/templates/images/template_sharethis_large.png DELETED
Binary file
admin/templates/images/template_socialbts_16px_1.png DELETED
Binary file
admin/templates/images/template_socialbts_32px_1.png DELETED
Binary file
admin/templates/templates.xml DELETED
@@ -1,623 +0,0 @@
1
- <items>
2
-
3
- <item name="Simple template 2 - Compact" image="/images/template_2_compact.png" desc="hhhhjhjhjh" author="Aakash Chakravarthy" version="1.0" url="http://www.aakashweb.com">
4
- <settings>wpsr_retweet_type==compact;;
5
- wpsr_retweet_service==twitter;;
6
- wpsr_facebook_btstyle==button_count;;
7
- wpsr_facebook_showfaces==0;;
8
- wpsr_facebook_width==90;;
9
-
10
- wpsr_template[1][inhome]==0;;
11
- wpsr_template[1][insingle]==1;;
12
- wpsr_template[1][inpage]==1;;
13
- wpsr_template[1][incategory]==0;;
14
- wpsr_template[1][intag]==0;;
15
- wpsr_template[1][indate]==0;;
16
- wpsr_template[1][inauthor]==0;;
17
- wpsr_template[1][insearch]==0;;
18
- wpsr_template[1][inexcerpt]==0;;
19
- wpsr_template[1][infeed]==0;;
20
- wpsr_template[1][abvcontent]==1;;
21
- wpsr_template[1][blwcontent]==0;;
22
-
23
- wpsr_template[2][inhome]==1;;
24
- wpsr_template[2][insingle]==1;;
25
- wpsr_template[2][inpage]==1;;
26
- wpsr_template[2][incategory]==1;;
27
- wpsr_template[2][intag]==1;;
28
- wpsr_template[2][indate]==1;;
29
- wpsr_template[2][inauthor]==1;;
30
- wpsr_template[2][insearch]==1;;
31
- wpsr_template[2][inexcerpt]==1;;
32
- wpsr_template[2][infeed]==1;;
33
- wpsr_template[2][abvcontent]==0;;
34
- wpsr_template[2][blwcontent]==1;;
35
-
36
- wpsr_socialbt_loadcss==1;;
37
- </settings>
38
- <template1>
39
- <![CDATA[
40
- <div class="wp-socializer-buttons clearfix">
41
- <span class="wpsr-btn">{facebook-like}</span>
42
- <span class="wpsr-btn">{retweet-bt}</span>
43
- <span class="wpsr-btn">{plusone-medium}</span>
44
- <span class="wpsr-btn">{linkedin-right}</span>
45
- <span class="wpsr-btn">{pinterest-horizontal}</span>
46
- </div>
47
- ]]>
48
- </template1>
49
-
50
- <template2>
51
- <![CDATA[
52
- <h3>Share and Enjoy</h3>
53
- {social-bts-16px}
54
- ]]>
55
- </template2>
56
-
57
- </item>
58
-
59
- <item name="Simple template 2 - Large - Inverted" image="/images/template_2_large_inv.png" desc="" author="Aakash Chakravarthy" version="1.0" url="http://www.aakashweb.com">
60
- <settings>wpsr_retweet_type==normal;;
61
- wpsr_retweet_service==twitter;;
62
- wpsr_facebook_btstyle==box_count;;
63
- wpsr_facebook_showfaces==0;;
64
- wpsr_facebook_width==55;;
65
-
66
- wpsr_template[1][inhome]==1;;
67
- wpsr_template[1][insingle]==1;;
68
- wpsr_template[1][inpage]==1;;
69
- wpsr_template[1][incategory]==1;;
70
- wpsr_template[1][intag]==1;;
71
- wpsr_template[1][indate]==1;;
72
- wpsr_template[1][inauthor]==1;;
73
- wpsr_template[1][insearch]==1;;
74
- wpsr_template[1][inexcerpt]==1;;
75
- wpsr_template[1][infeed]==1;;
76
- wpsr_template[1][abvcontent]==1;;
77
- wpsr_template[1][blwcontent]==0;;
78
-
79
- wpsr_template[2][inhome]==0;;
80
- wpsr_template[2][insingle]==1;;
81
- wpsr_template[2][inpage]==1;;
82
- wpsr_template[2][incategory]==0;;
83
- wpsr_template[2][intag]==0;;
84
- wpsr_template[2][indate]==0;;
85
- wpsr_template[2][inauthor]==0;;
86
- wpsr_template[2][insearch]==0;;
87
- wpsr_template[2][inexcerpt]==0;;
88
- wpsr_template[2][infeed]==0;;
89
- wpsr_template[2][abvcontent]==0;;
90
- wpsr_template[2][blwcontent]==1;;
91
-
92
- wpsr_socialbt_loadcss==1;;
93
- </settings>
94
- <template1>
95
- <![CDATA[
96
- {social-bts-32px}
97
- ]]>
98
- </template1>
99
-
100
- <template2>
101
- <![CDATA[
102
- <h3>Share and Enjoy</h3>
103
- <div class="wp-socializer-buttons clearfix">
104
- <span class="wpsr-btn">{facebook-like}</span>
105
- <span class="wpsr-btn">{retweet-bt}</span>
106
- <span class="wpsr-btn">{plusone-tall}</span>
107
- <span class="wpsr-btn">{linkedin-top}</span>
108
- <span class="wpsr-btn">{pinterest-vertical}</span>
109
- </div>
110
- ]]>
111
- </template2>
112
-
113
- </item>
114
-
115
- <item name="Simple template - Compact" image="/images/template_compact.png" desc="" author="Aakash Chakravarthy" version="2.0" url="http://www.aakashweb.com">
116
- <settings>wpsr_retweet_type==compact;;
117
- wpsr_retweet_service==twitter;;
118
- wpsr_facebook_btstyle==button_count;;
119
- wpsr_facebook_showfaces==0;;
120
- wpsr_facebook_width==90;;
121
-
122
- wpsr_template[1][inhome]==0;;
123
- wpsr_template[1][insingle]==1;;
124
- wpsr_template[1][inpage]==1;;
125
- wpsr_template[1][incategory]==0;;
126
- wpsr_template[1][intag]==0;;
127
- wpsr_template[1][indate]==0;;
128
- wpsr_template[1][inauthor]==0;;
129
- wpsr_template[1][insearch]==0;;
130
- wpsr_template[1][inexcerpt]==0;;
131
- wpsr_template[1][infeed]==0;;
132
- wpsr_template[1][abvcontent]==1;;
133
- wpsr_template[1][blwcontent]==0;;
134
-
135
- wpsr_template[2][inhome]==1;;
136
- wpsr_template[2][insingle]==1;;
137
- wpsr_template[2][inpage]==1;;
138
- wpsr_template[2][incategory]==1;;
139
- wpsr_template[2][intag]==1;;
140
- wpsr_template[2][indate]==1;;
141
- wpsr_template[2][inauthor]==1;;
142
- wpsr_template[2][insearch]==1;;
143
- wpsr_template[2][inexcerpt]==1;;
144
- wpsr_template[2][infeed]==1;;
145
- wpsr_template[2][abvcontent]==0;;
146
- wpsr_template[2][blwcontent]==1;;
147
-
148
- wpsr_socialbt_loadcss==1;;
149
- </settings>
150
- <template1>
151
- <![CDATA[
152
- <div class="wp-socializer-buttons clearfix">
153
- <span class="wpsr-btn">{facebook-like}</span>
154
- <span class="wpsr-btn">{retweet-bt}</span>
155
- <span class="wpsr-btn">{plusone-medium}</span>
156
- <span class="wpsr-btn">{linkedin-right}</span>
157
- <span class="wpsr-btn">{stumbleupon-1}</span>
158
- </div>
159
- ]]>
160
- </template1>
161
-
162
- <template2>
163
- <![CDATA[
164
- <h3>Share and Enjoy</h3>
165
- {social-bts-16px}
166
- ]]>
167
- </template2>
168
-
169
- </item>
170
-
171
- <item name="Simple template - Large" image="/images/template_large.png" desc="" author="Aakash Chakravarthy" version="2.0" url="http://www.aakashweb.com">
172
- <settings>wpsr_retweet_type==normal;;
173
- wpsr_retweet_service==twitter;;
174
- wpsr_facebook_btstyle==box_count;;
175
- wpsr_facebook_showfaces==0;;
176
- wpsr_facebook_width==55;;
177
-
178
- wpsr_template[1][inhome]==0;;
179
- wpsr_template[1][insingle]==1;;
180
- wpsr_template[1][inpage]==1;;
181
- wpsr_template[1][incategory]==0;;
182
- wpsr_template[1][intag]==0;;
183
- wpsr_template[1][indate]==0;;
184
- wpsr_template[1][inauthor]==0;;
185
- wpsr_template[1][insearch]==0;;
186
- wpsr_template[1][inexcerpt]==0;;
187
- wpsr_template[1][infeed]==0;;
188
- wpsr_template[1][abvcontent]==1;;
189
- wpsr_template[1][blwcontent]==0;;
190
-
191
- wpsr_template[2][inhome]==1;;
192
- wpsr_template[2][insingle]==1;;
193
- wpsr_template[2][inpage]==1;;
194
- wpsr_template[2][incategory]==1;;
195
- wpsr_template[2][intag]==1;;
196
- wpsr_template[2][indate]==1;;
197
- wpsr_template[2][inauthor]==1;;
198
- wpsr_template[2][insearch]==1;;
199
- wpsr_template[2][inexcerpt]==1;;
200
- wpsr_template[2][infeed]==1;;
201
- wpsr_template[2][abvcontent]==0;;
202
- wpsr_template[2][blwcontent]==1;;
203
-
204
- wpsr_socialbt_loadcss==1;;
205
- </settings>
206
- <template1>
207
- <![CDATA[
208
- <div class="wp-socializer-buttons clearfix">
209
- <span class="wpsr-btn">{facebook-like}</span>
210
- <span class="wpsr-btn">{retweet-bt}</span>
211
- <span class="wpsr-btn">{plusone-tall}</span>
212
- <span class="wpsr-btn">{stumbleupon-5}</span>
213
- <span class="wpsr-btn">{reddit-2}</span>
214
- <span class="wpsr-btn">{linkedin-top}</span>
215
- </div>
216
- ]]>
217
- </template1>
218
-
219
- <template2>
220
- <![CDATA[
221
- <h3>Share and Enjoy</h3>
222
- {social-bts-32px}
223
- ]]>
224
- </template2>
225
-
226
- </item>
227
-
228
- <item name="Simple template - Compact - Inverted" image="/images/template_compact_inv.png" desc="" author="Aakash Chakravarthy" version="2.1" url="http://www.aakashweb.com">
229
- <settings>wpsr_retweet_type==compact;;
230
- wpsr_retweet_service==twitter;;
231
- wpsr_facebook_btstyle==button_count;;
232
- wpsr_facebook_showfaces==0;;
233
- wpsr_facebook_width==90;;
234
-
235
- wpsr_template[1][inhome]==1;;
236
- wpsr_template[1][insingle]==1;;
237
- wpsr_template[1][inpage]==1;;
238
- wpsr_template[1][incategory]==1;;
239
- wpsr_template[1][intag]==1;;
240
- wpsr_template[1][indate]==1;;
241
- wpsr_template[1][inauthor]==1;;
242
- wpsr_template[1][insearch]==1;;
243
- wpsr_template[1][inexcerpt]==1;;
244
- wpsr_template[1][infeed]==1;;
245
- wpsr_template[1][abvcontent]==1;;
246
- wpsr_template[1][blwcontent]==0;;
247
-
248
- wpsr_template[2][inhome]==0;;
249
- wpsr_template[2][insingle]==1;;
250
- wpsr_template[2][inpage]==1;;
251
- wpsr_template[2][incategory]==0;;
252
- wpsr_template[2][intag]==0;;
253
- wpsr_template[2][indate]==0;;
254
- wpsr_template[2][inauthor]==0;;
255
- wpsr_template[2][insearch]==0;;
256
- wpsr_template[2][inexcerpt]==0;;
257
- wpsr_template[2][infeed]==0;;
258
- wpsr_template[2][abvcontent]==0;;
259
- wpsr_template[2][blwcontent]==1;;
260
-
261
- wpsr_socialbt_loadcss==1;;
262
- </settings>
263
- <template1>
264
- <![CDATA[
265
- {social-bts-16px}
266
- ]]>
267
- </template1>
268
-
269
- <template2>
270
- <![CDATA[
271
- <h3>Share and Enjoy</h3>
272
- <div class="wp-socializer-buttons clearfix">
273
- <span class="wpsr-btn">{facebook-like}</span>
274
- <span class="wpsr-btn">{retweet-bt}</span>
275
- <span class="wpsr-btn">{plusone-medium}</span>
276
- <span class="wpsr-btn">{linkedin-right}</span>
277
- <span class="wpsr-btn">{stumbleupon-1}</span>
278
- </div>
279
- ]]>
280
- </template2>
281
-
282
- </item>
283
-
284
- <item name="Simple template - Large - Inverted" image="/images/template_large_inv.png" desc="" author="Aakash Chakravarthy" version="2.1" url="http://www.aakashweb.com">
285
- <settings>wpsr_retweet_type==normal;;
286
- wpsr_retweet_service==twitter;;
287
- wpsr_facebook_btstyle==box_count;;
288
- wpsr_facebook_showfaces==0;;
289
- wpsr_facebook_width==55;;
290
-
291
- wpsr_template[1][inhome]==1;;
292
- wpsr_template[1][insingle]==1;;
293
- wpsr_template[1][inpage]==1;;
294
- wpsr_template[1][incategory]==1;;
295
- wpsr_template[1][intag]==1;;
296
- wpsr_template[1][indate]==1;;
297
- wpsr_template[1][inauthor]==1;;
298
- wpsr_template[1][insearch]==1;;
299
- wpsr_template[1][inexcerpt]==1;;
300
- wpsr_template[1][infeed]==1;;
301
- wpsr_template[1][abvcontent]==1;;
302
- wpsr_template[1][blwcontent]==0;;
303
-
304
- wpsr_template[2][inhome]==0;;
305
- wpsr_template[2][insingle]==1;;
306
- wpsr_template[2][inpage]==1;;
307
- wpsr_template[2][incategory]==0;;
308
- wpsr_template[2][intag]==0;;
309
- wpsr_template[2][indate]==0;;
310
- wpsr_template[2][inauthor]==0;;
311
- wpsr_template[2][insearch]==0;;
312
- wpsr_template[2][inexcerpt]==0;;
313
- wpsr_template[2][infeed]==0;;
314
- wpsr_template[2][abvcontent]==0;;
315
- wpsr_template[2][blwcontent]==1;;
316
-
317
- wpsr_socialbt_loadcss==1;;
318
- </settings>
319
-
320
- <template1>
321
- <![CDATA[
322
- {social-bts-32px}
323
- ]]>
324
- </template1>
325
-
326
- <template2>
327
- <![CDATA[
328
- <h3>Share and Enjoy</h3>
329
- <div class="wp-socializer-buttons clearfix">
330
- <span class="wpsr-btn">{facebook-like}</span>
331
- <span class="wpsr-btn">{retweet-bt}</span>
332
- <span class="wpsr-btn">{plusone-tall}</span>
333
- <span class="wpsr-btn">{stumbleupon-5}</span>
334
- <span class="wpsr-btn">{reddit-2}</span>
335
- <span class="wpsr-btn">{linkedin-top}</span>
336
- </div>
337
- ]]>
338
- </template2>
339
-
340
- </item>
341
-
342
- <item name="Addthis template - Compact" image="/images/template_addthis_compact.png" desc="" author="Aakash Chakravarthy" version="1.6" url="http://www.aakashweb.com">
343
- <settings>wpsr_addthis_sharecount==grouped;;
344
-
345
- wpsr_template[1][inhome]==0;;
346
- wpsr_template[1][insingle]==1;;
347
- wpsr_template[1][inpage]==1;;
348
- wpsr_template[1][incategory]==0;;
349
- wpsr_template[1][intag]==0;;
350
- wpsr_template[1][indate]==0;;
351
- wpsr_template[1][inauthor]==0;;
352
- wpsr_template[1][insearch]==0;;
353
- wpsr_template[1][inexcerpt]==0;;
354
- wpsr_template[1][infeed]==0;;
355
- wpsr_template[1][abvcontent]==1;;
356
- wpsr_template[1][blwcontent]==0;;
357
-
358
- wpsr_template[2][inhome]==1;;
359
- wpsr_template[2][insingle]==1;;
360
- wpsr_template[2][inpage]==1;;
361
- wpsr_template[2][incategory]==1;;
362
- wpsr_template[2][intag]==1;;
363
- wpsr_template[2][indate]==1;;
364
- wpsr_template[2][inauthor]==1;;
365
- wpsr_template[2][insearch]==1;;
366
- wpsr_template[2][inexcerpt]==1;;
367
- wpsr_template[2][infeed]==0;;
368
- wpsr_template[2][abvcontent]==0;;
369
- wpsr_template[2][blwcontent]==1;;
370
-
371
- wpsr_socialbt_loadcss==1;;
372
- </settings>
373
-
374
- <template1>
375
- <![CDATA[
376
- <div class="buttons-wrap">{addthis-tb-16px}</div>
377
- ]]>
378
- </template1>
379
-
380
- <template2>
381
- <![CDATA[
382
- <h3>Share and Enjoy</h3>
383
- <div class="buttons-wrap">{addthis-sc}</div>
384
- ]]>
385
- </template2>
386
-
387
- </item>
388
-
389
- <item name="Addthis template - Large" image="/images/template_addthis_large.png" desc="" author="Aakash Chakravarthy" version="1.6" url="http://www.aakashweb.com">
390
- <settings>wpsr_addthis_sharecount==grouped;;
391
-
392
- wpsr_template[1][inhome]==0;;
393
- wpsr_template[1][insingle]==1;;
394
- wpsr_template[1][inpage]==1;;
395
- wpsr_template[1][incategory]==0;;
396
- wpsr_template[1][intag]==0;;
397
- wpsr_template[1][indate]==0;;
398
- wpsr_template[1][inauthor]==0;;
399
- wpsr_template[1][insearch]==0;;
400
- wpsr_template[1][inexcerpt]==0;;
401
- wpsr_template[1][infeed]==0;;
402
- wpsr_template[1][abvcontent]==1;;
403
- wpsr_template[1][blwcontent]==0;;
404
-
405
- wpsr_template[2][inhome]==1;;
406
- wpsr_template[2][insingle]==1;;
407
- wpsr_template[2][inpage]==1;;
408
- wpsr_template[2][incategory]==1;;
409
- wpsr_template[2][intag]==1;;
410
- wpsr_template[2][indate]==1;;
411
- wpsr_template[2][inauthor]==1;;
412
- wpsr_template[2][insearch]==1;;
413
- wpsr_template[2][inexcerpt]==1;;
414
- wpsr_template[2][infeed]==0;;
415
- wpsr_template[2][abvcontent]==0;;
416
- wpsr_template[2][blwcontent]==1;;
417
-
418
- wpsr_socialbt_loadcss==1;;
419
- </settings>
420
-
421
- <template1>
422
- <![CDATA[
423
- <div class="buttons-wrap">{addthis-tb-32px}</div>
424
- ]]>
425
- </template1>
426
-
427
- <template2>
428
- <![CDATA[
429
- <h3>Share and Enjoy</h3>
430
- <div class="buttons-wrap">{addthis-sc}</div>
431
- ]]>
432
- </template2>
433
-
434
- </item>
435
-
436
- <item name="Sharethis template - Compact" image="/images/template_sharethis_compact.png" desc="" author="Aakash Chakravarthy" version="1.6" url="http://www.aakashweb.com">
437
- <settings>
438
- wpsr_template[1][inhome]==0;;
439
- wpsr_template[1][insingle]==1;;
440
- wpsr_template[1][inpage]==1;;
441
- wpsr_template[1][incategory]==0;;
442
- wpsr_template[1][intag]==0;;
443
- wpsr_template[1][indate]==0;;
444
- wpsr_template[1][inauthor]==0;;
445
- wpsr_template[1][insearch]==0;;
446
- wpsr_template[1][inexcerpt]==0;;
447
- wpsr_template[1][infeed]==0;;
448
- wpsr_template[1][abvcontent]==1;;
449
- wpsr_template[1][blwcontent]==0;;
450
-
451
- wpsr_template[2][inhome]==1;;
452
- wpsr_template[2][insingle]==1;;
453
- wpsr_template[2][inpage]==1;;
454
- wpsr_template[2][incategory]==1;;
455
- wpsr_template[2][intag]==1;;
456
- wpsr_template[2][indate]==1;;
457
- wpsr_template[2][inauthor]==1;;
458
- wpsr_template[2][insearch]==1;;
459
- wpsr_template[2][inexcerpt]==1;;
460
- wpsr_template[2][infeed]==0;;
461
- wpsr_template[2][abvcontent]==0;;
462
- wpsr_template[2][blwcontent]==1;;
463
-
464
- wpsr_socialbt_loadcss==1;;
465
- </settings>
466
-
467
- <template1>
468
- <![CDATA[
469
- <p>{sharethis-regular}</p>
470
- ]]>
471
- </template1>
472
-
473
- <template2>
474
- <![CDATA[
475
- <h3>Share and Enjoy</h3>
476
- <p>{sharethis-hcount}</p>
477
- ]]>
478
- </template2>
479
-
480
- </item>
481
-
482
- <item name="Sharethis template - Large" image="/images/template_sharethis_large.png" desc="" author="Aakash Chakravarthy" version="1.6" url="http://www.aakashweb.com">
483
-
484
- <settings>
485
- wpsr_template[1][inhome]==1;;
486
- wpsr_template[1][insingle]==1;;
487
- wpsr_template[1][inpage]==1;;
488
- wpsr_template[1][incategory]==1;;
489
- wpsr_template[1][intag]==1;;
490
- wpsr_template[1][indate]==1;;
491
- wpsr_template[1][inauthor]==1;;
492
- wpsr_template[1][insearch]==1;;
493
- wpsr_template[1][inexcerpt]==1;;
494
- wpsr_template[1][infeed]==0;;
495
- wpsr_template[1][abvcontent]==1;;
496
- wpsr_template[1][blwcontent]==0;;
497
-
498
- wpsr_template[2][inhome]==0;;
499
- wpsr_template[2][insingle]==1;;
500
- wpsr_template[2][inpage]==1;;
501
- wpsr_template[2][incategory]==0;;
502
- wpsr_template[2][intag]==0;;
503
- wpsr_template[2][indate]==0;;
504
- wpsr_template[2][inauthor]==0;;
505
- wpsr_template[2][insearch]==0;;
506
- wpsr_template[2][inexcerpt]==0;;
507
- wpsr_template[2][infeed]==0;;
508
- wpsr_template[2][abvcontent]==0;;
509
- wpsr_template[2][blwcontent]==1;;
510
- wpsr_socialbt_loadcss==1;;
511
- </settings>
512
-
513
- <template1>
514
- <![CDATA[
515
- <p>{sharethis-bt}</p>
516
- ]]>
517
- </template1>
518
-
519
- <template2>
520
- <![CDATA[
521
- <h3>Share and Enjoy</h3>
522
- <p>{sharethis-vcount}</p>
523
- ]]>
524
- </template2>
525
-
526
- </item>
527
-
528
- <item name="Social buttons 16px - 1" image="/images/template_socialbts_16px_1.png" desc="" author="Aakash Chakravarthy" version="1.6" url="http://www.aakashweb.com">
529
- <settings>wpsr_socialbt_target==1;;
530
- wpsr_socialbt_loadcss==1;;
531
- wpsr_socialbt_effect==none;;
532
- wpsr_socialbt_label==1;;
533
- wpsr_socialbt_columns==4;;
534
-
535
- wpsr_template[1][inhome]==0;;
536
- wpsr_template[1][insingle]==0;;
537
- wpsr_template[1][inpage]==0;;
538
- wpsr_template[1][incategory]==0;;
539
- wpsr_template[1][intag]==0;;
540
- wpsr_template[1][indate]==0;;
541
- wpsr_template[1][inauthor]==0;;
542
- wpsr_template[1][insearch]==0;;
543
- wpsr_template[1][inexcerpt]==0;;
544
- wpsr_template[1][infeed]==0;;
545
- wpsr_template[1][abvcontent]==0;;
546
- wpsr_template[1][blwcontent]==0;;
547
-
548
- wpsr_template[2][inhome]==0;;
549
- wpsr_template[2][insingle]==1;;
550
- wpsr_template[2][inpage]==1;;
551
- wpsr_template[2][incategory]==0;;
552
- wpsr_template[2][intag]==0;;
553
- wpsr_template[2][indate]==0;;
554
- wpsr_template[2][inauthor]==0;;
555
- wpsr_template[2][insearch]==0;;
556
- wpsr_template[2][inexcerpt]==0;;
557
- wpsr_template[2][infeed]==0;;
558
- wpsr_template[2][abvcontent]==0;;
559
- wpsr_template[2][blwcontent]==1;;
560
- </settings>
561
-
562
- <template1>
563
- <![CDATA[
564
- ]]>
565
- </template1>
566
-
567
- <template2>
568
- <![CDATA[
569
- <h2>Share this article</h2>
570
- {social-bts-16px}
571
- ]]>
572
- </template2>
573
-
574
- </item>
575
-
576
- <item name="Social buttons 32px - 1" image="/images/template_socialbts_32px_1.png" desc="" author="Aakash Chakravarthy" version="1.6" url="http://www.aakashweb.com">
577
- <settings>wpsr_socialbt_target==1;;
578
- wpsr_socialbt_loadcss==1;;
579
- wpsr_socialbt_effect==none;;
580
- wpsr_socialbt_label==1;;
581
- wpsr_socialbt_columns==4;;
582
-
583
- wpsr_template[1][inhome]==0;;
584
- wpsr_template[1][insingle]==0;;
585
- wpsr_template[1][inpage]==0;;
586
- wpsr_template[1][incategory]==0;;
587
- wpsr_template[1][intag]==0;;
588
- wpsr_template[1][indate]==0;;
589
- wpsr_template[1][inauthor]==0;;
590
- wpsr_template[1][insearch]==0;;
591
- wpsr_template[1][inexcerpt]==0;;
592
- wpsr_template[1][infeed]==0;;
593
- wpsr_template[1][abvcontent]==0;;
594
- wpsr_template[1][blwcontent]==0;;
595
-
596
- wpsr_template[2][inhome]==0;;
597
- wpsr_template[2][insingle]==1;;
598
- wpsr_template[2][inpage]==1;;
599
- wpsr_template[2][incategory]==0;;
600
- wpsr_template[2][intag]==0;;
601
- wpsr_template[2][indate]==0;;
602
- wpsr_template[2][inauthor]==0;;
603
- wpsr_template[2][insearch]==0;;
604
- wpsr_template[2][inexcerpt]==0;;
605
- wpsr_template[2][infeed]==0;;
606
- wpsr_template[2][abvcontent]==0;;
607
- wpsr_template[2][blwcontent]==1;;
608
- </settings>
609
-
610
- <template1>
611
- <![CDATA[
612
- ]]>
613
- </template1>
614
-
615
- <template2>
616
- <![CDATA[
617
- <h2>Share this article</h2>
618
- {social-bts-32px}
619
- ]]>
620
- </template2>
621
-
622
- </item>
623
- </items>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/text_sharebar.php ADDED
@@ -0,0 +1,155 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Text sharebar settings page
4
+ *
5
+ **/
6
+
7
+ class wpsr_admin_text_sharebar{
8
+
9
+ function __construct(){
10
+
11
+ WPSR_Admin::add_tab( 'text_sharebar', array(
12
+ 'name' => 'Text sharebar',
13
+ 'page_callback' => array( $this, 'page' ),
14
+ 'banner' => WPSR_ADMIN_URL . '/images/banners/text-sharebar.png',
15
+ 'form' => array(
16
+ 'id' => 'text_sharebar_settings',
17
+ 'name' => 'text_sharebar_settings',
18
+ 'callback' => array( $this, 'form_fields' ),
19
+ 'validation' => array( $this, 'validation' ),
20
+ )
21
+ ));
22
+
23
+ }
24
+
25
+ function form_fields( $values ){
26
+
27
+ $values = wp_parse_args( $values, WPSR_Lists::defaults( 'text_sharebar' ) );
28
+
29
+ $section0 = array(
30
+ array( __( 'Select to enable or disable text sharebar feature', 'wpsr' ), WPSR_Admin::field( 'select', array(
31
+ 'name' => 'ft_status',
32
+ 'value' => $values[ 'ft_status' ],
33
+ 'list' => array(
34
+ 'enable' => __( 'Enable text sharebar', 'wpsr' ),
35
+ 'disable' => __( 'Disable text sharebar', 'wpsr' )
36
+ ),
37
+ )), 'class="ft_table"' ),
38
+ );
39
+
40
+ WPSR_Admin::youtube_help_icon( 'https://www.youtube.com/watch?v=_Q4-p91mU0o' );
41
+
42
+ WPSR_Admin::build_table( $section0, __( 'Enable/disable text sharebar', 'wpsr' ), '', false, '1' );
43
+
44
+ echo '<div class="feature_wrap">';
45
+
46
+ $sb_sites = WPSR_Lists::social_buttons();
47
+
48
+ WPSR_Admin::box_wrap( 'open', __( 'Add buttons to text sharebar', 'wpsr' ), __( 'Select buttons from the list below and add it to the selected list.', 'wpsr' ), '2' );
49
+ echo '<table class="form-table"><tr><td width="90%">';
50
+ echo '<select class="ssb_list widefat">';
51
+ foreach( $sb_sites as $id=>$prop ){
52
+ if( in_array( 'for_tsb', $prop[ 'features' ] ) ){
53
+ echo '<option value="' . $id . '">' . $prop[ 'name' ] . '</option>';
54
+ }
55
+ }
56
+ echo '</select>';
57
+ echo '</td><td>';
58
+ echo '<button class="button button-primary ssb_add">' . __( 'Add button', 'wpsr' ) . '</button>';
59
+ echo '</td></tr></table>';
60
+
61
+ echo '<h4>' . __( 'Selected buttons', 'wpsr' ) . '</h4>';
62
+
63
+ $decoded = base64_decode( $values[ 'template' ] );
64
+ $tsb_btns = json_decode( $decoded );
65
+
66
+ if( !is_array( $tsb_btns ) ){
67
+ $tsb_btns = array();
68
+ }
69
+
70
+ echo '<ul class="ssb_selected_list clearfix">';
71
+ if( count( $tsb_btns ) > 0 ){
72
+ foreach( $tsb_btns as $tsb_item ){
73
+ $sb_info = $sb_sites[ $tsb_item ];
74
+ echo '<li title="' . $sb_info[ 'name' ] . '" data-id="' . $tsb_item . '"><i class="fa fa-' . $sb_info[ 'icon' ] . '"></i> <span class="ssb_remove" title="' . __( 'Delete button', 'wpsr' ) . '">x</span></li>';
75
+ }
76
+ }else{
77
+ echo '<span class="ssb_empty">' . __( 'No buttons are selected for text sharebar', 'wpsr' ) . '</span>';
78
+ }
79
+ echo '</ul>';
80
+ echo '<input type="hidden" name="template" class="ssb_template" value="' . $values[ 'template' ] . '"/>';
81
+
82
+ WPSR_Admin::box_wrap( 'close' );
83
+
84
+ # Settings form
85
+ $section2 = array(
86
+
87
+ array( __( 'ID or class name of the content to show text sharebar', 'wpsr' ), WPSR_Admin::field( 'text', array(
88
+ 'name' => 'content',
89
+ 'value' => $values['content'],
90
+ 'placeholder' => 'Ex: .entry-content',
91
+ 'qtip' => 'https://www.youtube.com/watch?v=GQ1YO0xZ7WA'
92
+ ))),
93
+
94
+ array( __( 'Button size', 'wpsr' ), WPSR_Admin::field( 'select', array(
95
+ 'name' => 'size',
96
+ 'value' => $values['size'],
97
+ 'list' => array(
98
+ '32px' => '32px',
99
+ '48px' => '48px',
100
+ '64px' => '64px',
101
+ ),
102
+ 'tip' => WPSR_ADMIN_URL . '/images/tips/tsb-sizes.png'
103
+ ))),
104
+
105
+ array( __( 'Background color', 'wpsr' ), WPSR_Admin::field( 'text', array(
106
+ 'name' => 'bg_color',
107
+ 'value' => $values['bg_color'],
108
+ 'class' => 'color_picker'
109
+ ))),
110
+
111
+ array( __( 'Icon color', 'wpsr' ), WPSR_Admin::field( 'text', array(
112
+ 'name' => 'icon_color',
113
+ 'value' => $values['icon_color'],
114
+ 'class' => 'color_picker'
115
+ ))),
116
+
117
+ array( __( 'Maximum word count to quote', 'wpsr' ), WPSR_Admin::field( 'text', array(
118
+ 'type' => 'number',
119
+ 'name' => 'text_count',
120
+ 'value' => $values['text_count'],
121
+ 'helper' => __( 'Set value to 0 to include all the selected text', 'wpsr' )
122
+ ))),
123
+
124
+ );
125
+ WPSR_Admin::build_table( $section2, __( 'Settings', 'wpsr' ), '', false, '3' );
126
+
127
+ // Location rules
128
+ WPSR_Admin::box_wrap( 'open', __( 'Conditions to display the text sharebar', 'wpsr' ), __( 'Choose the below options to select the pages which will display the text sharebar.', 'wpsr' ), '4' );
129
+ WPSR_Location_Rules::display_rules( "loc_rules", $values['loc_rules'] );
130
+ WPSR_Admin::box_wrap( 'close' );
131
+
132
+ echo '</div>';
133
+
134
+ echo '<script>';
135
+ echo 'var sb_sites = ' . json_encode( $sb_sites ) . ';';
136
+ echo '</script>';
137
+
138
+ }
139
+
140
+
141
+ function page(){
142
+
143
+ WPSR_Admin::settings_form( 'text_sharebar' );
144
+
145
+ }
146
+
147
+ function validation( $input ){
148
+ return $input;
149
+ }
150
+
151
+ }
152
+
153
+ new wpsr_admin_text_sharebar();
154
+
155
+ ?>
admin/wpsr-admin-css.css DELETED
@@ -1,794 +0,0 @@
1
- /*
2
- * Admin Page CSS for WP Socializer plugin
3
- * Author : Aakash Chakravarthy
4
- * Version : 1.7 (changed 2.4.9.9)
5
- */
6
-
7
- .wrap{
8
- margin: 15px auto 15px;
9
- width: 700px;
10
- padding: 0px;
11
- position: relative;
12
- }
13
- .wrap #content{
14
- background: #FFFFFF;
15
- padding: 15px;
16
- border: 1px solid #dfdfdf;
17
- margin: 15px 0px 0px;
18
- -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
19
- -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
20
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
21
- -moz-border-radius: 10px;
22
- border-radius: 10px;
23
- }
24
- .wrap #tabs{
25
- background: #F8F8F8 url(images/header-bg.png) repeat-x;
26
- -moz-border-radius-topleft: 10px;
27
- -moz-border-radius-topright: 10px;
28
- -moz-border-radius-bottomright: 0px;
29
- -moz-border-radius-bottomleft: 0px;
30
- -webkit-border-radius: 10px 10px 0px 0px;
31
- border-radius: 10px 10px 0px 0px;
32
- margin: -15px -15px 0px;
33
- padding: 20px;
34
- border-bottom: 1px dashed #dfdfdf;
35
- }
36
- .wrap #tabs li{
37
- float: left;
38
- margin: 0px;
39
- }
40
- .wrap #tabs li a{
41
- text-decoration: none;
42
- padding: 5px 15px;
43
- font-size: 16px;
44
- font-weight: bold;
45
- border: 1px solid transparent;
46
- }
47
- .wrap #tabs .ui-state-active a{
48
- background: #FBFBFB;
49
- -webkit-border-radius: 15px;
50
- -moz-border-radius: 15px;
51
- border-radius: 15px;
52
- border: 1px solid #CCCCCC;
53
- color: #CC3333;
54
- -webkit-box-shadow: 0px 0px 5px 0px #666;
55
- -moz-box-shadow: 0px 0px 5px 0px #666;
56
- box-shadow: 0px 0px 5px 0px #dfdfdf;
57
- }
58
- .wrap .header .subTitle{
59
- margin: -5px 0px 0px 40px;
60
- color: #666666;
61
- }
62
- .wrap h3{
63
- margin: 5px 0px 10px;
64
- border-bottom: 1px dotted #dfdfdf;
65
- padding: 10px 0px 10px;
66
- }
67
- .wrap h4{
68
- font-weight: bold;
69
- display: block;
70
- padding: 5px 0px;
71
- margin: 0px 0px 5px;
72
- border-bottom: 1px solid #e7e7e7;
73
- clear: both;
74
- }
75
- .wrap h5{
76
- margin: 10px 0px 5px;
77
- }
78
- .wrap .section{
79
- margin-bottom: 10px;
80
- }
81
- .wrap .leftCnt{
82
- float: left;
83
- width: 70%;
84
- }
85
- .wrap .rightCnt{
86
- float: right;
87
- width: 25%;
88
- }
89
- .wrap .leftCnt h2{
90
- border-bottom: 1px solid #dfdfdf;
91
- }
92
- .wrap .footer{
93
- background: #FFFFEC;
94
- margin: 10px -15px -15px;
95
- padding: 15px;
96
- border-top: 1px dashed #dfdfdf;
97
- -moz-border-radius-topleft: 0px;
98
- -moz-border-radius-topright: 0px;
99
- -moz-border-radius-bottomright: 10px;
100
- -moz-border-radius-bottomleft: 10px;
101
- -webkit-border-radius: 0px 0px 10px 10px;
102
- border-radius: 0px 0px 10px 10px;
103
- }
104
- .wrap .footer #wpsr_submit{
105
- padding: 8px 15px;
106
- font-size: 14px !important;
107
- height: 40px;
108
- }
109
-
110
- /****************************/
111
-
112
- .wrap .window{
113
- position: fixed;
114
- top: 0px;
115
- left: 0px;
116
- right: 0px;
117
- bottom: 0px;
118
- background: rgba(0,0,0,0.3);
119
- z-index: 999999;
120
- display: none;
121
- }
122
- .wrap .window .inWindow{
123
- height: 100%;
124
- overflow: auto;
125
- padding: 0px 20px;
126
- background: #FFFFFF;
127
- margin: 0px auto;
128
- width: 800px;
129
- border-right: 1px solid #dfdfdf;
130
- border-left: 1px solid #dfdfdf;
131
- -webkit-box-shadow: 0px 0px 57px -7px #000;
132
- -moz-box-shadow: 0px 0px 57px -7px #000;
133
- box-shadow: 0px 0px 57px -7px #000;
134
- display: none;
135
- }
136
- .wrap .window h2{
137
- border-bottom: 1px solid #C2C2C2;
138
- margin: 0px -20px 10px;
139
- padding: 15px 20px;
140
- background: url(images/header-bg.png) repeat-x;
141
- }
142
- /**** **/
143
-
144
- .buttonsList li{
145
- padding: 5px 10px;
146
- border: 1px solid #CCCCCC;
147
- -webkit-border-radius: 10px;
148
- -moz-border-radius: 10px;
149
- border-radius: 7px;
150
- margin: 0px 15px 15px 0px;
151
- font-size: 15px;
152
- background: url(images/menu-bg.png) repeat-x;
153
- cursor: pointer;
154
- }
155
- .buttonsList li:hover{
156
- border-color: #00CC00;
157
- }
158
- .buttonsList li:active{
159
- -moz-box-shadow: inset 0 0 7px #999;
160
- -webkit-box-shadow: inset 0 0 7px #999;
161
- box-shadow: inset 0 0 7px #999;
162
- }
163
-
164
- /********************/
165
-
166
-
167
- #subTabs{
168
- background: #EAFBFF url(images/orange-bg.png) repeat-x;
169
- padding: 25px 10px 20px 10px;
170
- margin: 0px -15px 10px;
171
- border-bottom: 1px dashed #dfdfdf;
172
- }
173
- #subTabs li{
174
- float: left;
175
- margin: 0px 5px 0px 0px;
176
- font-size: 19px;
177
- }
178
- #subTabs li a{
179
- text-decoration: none;
180
- padding: 5px 10px;
181
- }
182
- #subTabs .ui-state-active a{
183
- background: #FBFBFB;
184
- -webkit-border-radius: 15px;
185
- -moz-border-radius: 15px;
186
- border-radius: 15px;
187
- border: 1px solid #CCCCCC;
188
- color: #CC3333;
189
- -webkit-box-shadow: 0px 0px 5px 0px #666;
190
- -moz-box-shadow: 0px 0px 5px 0px #666;
191
- box-shadow: 0px 0px 5px 0px #dfdfdf;
192
- }
193
-
194
- /*************************/
195
-
196
- .toolbar{
197
- margin: 0px 0px 10px;
198
- }
199
- .tbButtons .btn{
200
- font-size: 11px !important;
201
- background: #FFFFFF url(images/header-bg.png) repeat-x 0px -30px;
202
- border: 1px solid #E1E1E1;
203
- padding: 5px 10px;
204
- float: left;
205
- cursor: pointer;
206
- margin: 0px -1px -1px 0px;
207
- }
208
- .tbButtons .parentLi ul{
209
- position: absolute;
210
- background: #FFFFFF;
211
- border: 1px solid #e1e1e1;
212
- margin: 5px 0px 0px -11px;
213
- font-size: 11px;
214
- display: none;
215
- -webkit-box-shadow: 0px 2px 3px rgba(0, 0, 0, 0.09);
216
- -moz-box-shadow: 0px 2px 3px rgba(0, 0, 0, 0.09);
217
- box-shadow: 0px 2px 3px rgba(0, 0, 0, 0.09);
218
- padding: 0px;
219
- }
220
- .tbButtons .parentLi ul li{
221
- padding: 10px;
222
- border-bottom: 1px solid #e1e1e1;
223
- margin: 0px;
224
- }
225
- .tbButtons .parentLi ul li:hover, .tbButtons .btn:hover{
226
- background: #FFFFCC;
227
- }
228
-
229
- /*********************************/
230
-
231
- .sbLeftCnt{
232
- float: left;
233
- width: 72%;
234
- }
235
- .sbRightCnt{
236
- float: right;
237
- width: 200px;
238
- margin-right: 15px;
239
- }
240
- #sbList li{
241
- padding: 4px;
242
- color: #333333;
243
- text-decoration: none;
244
- -webkit-border-radius: 5px;
245
- -moz-border-radius: 5px;
246
- border-radius: 5px;
247
- float: left;
248
- width: 150px;
249
- margin: 5px;
250
- text-transform: capitalize;
251
- background: #FFFFFF;
252
- border: 1px solid #e9e9e9;
253
- }
254
- #sbList li:hover{
255
- border-color: #999999;
256
- color: #000000;
257
- }
258
- #sbList li img{
259
- height: 16px;
260
- width: 16px;
261
- vertical-align: middle;
262
- background: url(../public/social-icons/wp-socializer-sprite-16px.png) no-repeat;
263
- padding: 0px;
264
- margin: 0px 5px 0px 0px;
265
- }
266
- #sbList .sbAdd_16px{
267
- color: #000000;
268
- background: #F8F8F8;
269
- float: right;
270
- padding: 5px 8px 5px 5px;
271
- border-left: 1px solid #e9e9e9;
272
- cursor: pointer;
273
- moz-border-radius-topleft: 0px;
274
- -moz-border-radius-topright: 5px;
275
- -moz-border-radius-bottomright: 5px;
276
- -moz-border-radius-bottomleft: 0px;
277
- -webkit-border-radius: 0px 5px 5px 0px;
278
- border-radius: 0px 5px 5px 0px;
279
- margin: -4px -4px -4px 0px;
280
- }
281
- #sbList .sbAdd_32px{
282
- color: #000000;
283
- background: #F8F8F8;
284
- float: right;
285
- padding: 5px 8px 5px 5px;
286
- border-left: 1px solid #e9e9e9;
287
- cursor: pointer;
288
- border-right: 1px solid #e9e9e9;
289
- margin: -4px -3px -4px 0px;
290
- }
291
- #sbList .sbAdd_16px:hover, #sbList .sbAdd_32px:hover{
292
- color: #FFFFFF;
293
- background: #999999;
294
- }
295
- .sbSelList li{
296
- padding: 5px;
297
- color: #fff;
298
- text-decoration: none;
299
- -moz-border-radius: 5px;
300
- -webkit-border-radius: 5px;
301
- -moz-box-shadow: 0 1px 2px #999;
302
- -webkit-box-shadow: 0 1px 2px #999;
303
- border-bottom: 1px solid #006C91;
304
- position: relative;
305
- float: left;
306
- width: 98%;
307
- margin: 5px;
308
- text-transform: capitalize;
309
- background: #0099CC;
310
- cursor: move;
311
- }
312
- .sbSelList li:hover{
313
- background: #00CC00;
314
- border-bottom: 1px solid #009900;
315
- }
316
- .sbSelList li .sbDelete{
317
- float: right;
318
- padding: 2px 4px;
319
- margin: -2px -3px -2px 0px;
320
- -moz-border-radius: 2px;
321
- -khtml-border-radius: 2px;
322
- -webkit-border-radius: 2px;
323
- text-transform: lowercase;
324
- font-weight: bold;
325
- }
326
- .sbSelList li .sbDelete:hover{
327
- cursor: pointer;
328
- color: #FF0000;
329
- }
330
- .sbSettingsBt{
331
- font-size: 18px;
332
- float: right;
333
- margin-top: -60px;
334
- margin-right: 10px;
335
- color: #fff;
336
- text-decoration: none;
337
- background: #00CC00;
338
- padding: 10px;
339
- }
340
-
341
- /************/
342
-
343
- /* Sprites */
344
- .admSprites {
345
- background: url(images/admin-sprites.png) no-repeat top left;
346
- margin: 0px 5px 0px 0px;
347
- padding: 0px 16px 0px 0px;
348
- width: 16px;
349
- }
350
-
351
- .addthisIcon{ background-position: 0 0; }
352
- .customIcon{ background-position: 0 -66px; }
353
- .documentationIcon{ background-position: 0 -132px; }
354
- .facebookIcon{ background-position: 0 -198px; }
355
- .googleplusIcon{ background-position: 0 -264px; }
356
- .helpIcon{ background-position: 0 -330px; }
357
- .linkedinIcon{ background-position: 0 -396px; }
358
- .minusIcon{ background-position: 0 -462px; }
359
- .oneclickIcon{ background-position: 0 -528px; }
360
- .pinterestIcon{ background-position: 0 -594px; }
361
- .placementIcon{ background-position: 0 -660px; }
362
- .redditIcon{ background-position: 0 -726px; }
363
- .retweetIcon{ background-position: 0 -792px; }
364
- .settingsIcon{ background-position: 0 -858px; }
365
- .sharethisIcon{ background-position: 0 -924px; }
366
- .socialButtons{ background-position: 0 -990px; }
367
- .stumbleuponIcon{ background-position: 0 -1056px; }
368
- .supportIcon{ background-position: 0 -1122px; }
369
-
370
- /* Tables */
371
-
372
- .tableClr {
373
- border: 1px solid #e7e7e7;
374
- text-align: left;
375
- margin: 0 0px 0px 0;
376
- width: 100%;
377
- }
378
- .tableClr tr th,
379
- .tableClr thead th {
380
- color: #888;
381
- font-size: 12px;
382
- font-weight: bold;
383
- padding: 5px;
384
- }
385
- .tableClr tr td {
386
- border-top: 1px solid #e7e7e7;
387
- padding: 5px;
388
- }
389
- .tableClr tr.odd td {
390
- background: #F2F7FC;
391
- }
392
-
393
-
394
- /**********************************/
395
-
396
- .tooltip{
397
- position:absolute;
398
- z-index:9999;
399
- color:#fff;
400
- font-size:11px;
401
- background: #333;
402
- background: rgba(0,0,0,0.7);
403
- padding: 5px;
404
- -moz-box-shadow: 0px 0px 7px rgba(0, 0, 0, 0.5);
405
- box-shadow: 0px 0px 7px rgba(0, 0, 0, 0.6);
406
- -moz-border-radius: 3px;
407
- border-radius: 3px;
408
- }
409
-
410
- /*************/
411
-
412
- .templatesList{
413
- margin: 10px 0px 250px;
414
- font-family: Arial, Helvetica, sans-serif;
415
- }
416
- .templateItem{
417
- border: 1px solid #e7e7e7;
418
- padding: 10px;
419
- margin: 0px 0px 10px;
420
- -moz-border-radius: 5px;
421
- border-radius: 5px;
422
- position: relative;
423
- }
424
- .templateItem:hover{
425
- border-color: #9FC54E;
426
- }
427
- .templateHead{
428
- font: 19px Arial, Helvetica, sans-serif;
429
- margin: 0px;
430
- color: #333333;
431
- padding: 0px 0px 5px;
432
- }
433
- .templateDetails{
434
- color:#888888;
435
- }
436
- .templateImg{
437
- border: 1px solid #F2F2F2;
438
- margin: 10px 0px 0px;
439
- width: 100%;
440
- height: auto;
441
- background: #FFFFFF;
442
- }
443
- .templateCont{
444
- display: none;
445
- }
446
- .templateItem .applyBt{
447
- font-size: 13px;
448
- float: right;
449
- border: 1px solid #9FC54E;
450
- padding: 5px 15px;
451
- -moz-border-radius: 10px;
452
- border-radius: 10px;
453
- font-weight: bold;
454
- color: #333333;
455
- cursor: pointer;
456
- margin: 0px 0px 0px 10px;
457
- background: #F4F9EC url(images/menu-bg.png) repeat-x;
458
- }
459
- .templateItem .applyBtYellow{
460
- border-color: #FFCC00;
461
- background: #FFFFCC;
462
- }
463
- .templateItem .applyBt:hover{
464
- opacity: 0.5;
465
- }
466
- .templateItem .applyBt:active{
467
- border-color: #999999;
468
- background: #FDFDFD;
469
- }
470
-
471
- /***************/
472
-
473
- .floatBtsList li{
474
- float: left;
475
- background: #FBFBFB url(images/menu-bg.png) repeat-x;
476
- padding: 5px 10px;
477
- border: 1px solid #CCCCCC;
478
- margin: 0px 8px 8px 0px;
479
- -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
480
- -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
481
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
482
- -moz-border-radius: 4px;
483
- border-radius: 4px;
484
- cursor: pointer;
485
- }
486
- .floatBtsList li:hover{
487
- border-color: #B420EC;
488
- }
489
- .floatBtsSel li{
490
- float: left;
491
- background: #FBFBFB url(images/menu-hover.png) repeat-x;
492
- padding: 5px 10px;
493
- border: 1px solid #CCCCCC;
494
- margin: 0px 8px 8px 0px;
495
- -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
496
- -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
497
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
498
- -moz-border-radius: 4px;
499
- border-radius: 4px;
500
- cursor: move;
501
- }
502
- .floatbts_highlight{
503
- background: none !important;
504
- height: 15px;
505
- width: 60px;
506
- border: 1px dashed #FF9900 !important;
507
- }
508
- /*************/
509
-
510
- .wpsr_content{
511
- width: 99%;
512
- font: 12px/2 "Courier New", Courier, monospace;
513
- margin: 0px;
514
- padding: 5px 10px 5px 10px;
515
- /*-webkit-box-shadow: inset 0px 0px 6px 1px rgba(0,0,0,0.1);
516
- -moz-box-shadow: inset 0px 0px 6px 1px rgba(0,0,0,0.1);
517
- box-shadow: inset 0px 0px 6px 1px rgba(0,0,0,0.1);*/
518
- border-color: lightSeaGreen;
519
- }
520
-
521
- /*******/
522
-
523
- .wpsr_share_wrap{
524
- margin-left: -65px;
525
- position: absolute;
526
- top: 20%;
527
- }
528
- .wpsr_share_wrap li{
529
- padding: 7px;
530
- background: white url(images/menu-bg.png) repeat-x bottom;
531
- border: 1px solid #dfdfdf;
532
- margin: 0px 0px 7px;
533
- -webkit-border-radius: 5px;
534
- -moz-border-radius: 5px;
535
- border-radius: 5px;
536
- cursor: pointer;
537
- }
538
- .wpsr_share_wrap a{
539
- background-repeat: no-repeat;
540
- height: 32px;
541
- width: 32px;
542
- display: block;
543
- }
544
- .wpsr_donate a{ background-image: url(images/donate.png?v=3); }
545
- .wpsr_share a{ background-image: url(images/share.png); }
546
- .wpsr_pressthis a{ background-image: url(images/pressthis.png); }
547
-
548
- .wpsr_share_iframe{
549
- background: #FFFFFF;
550
- border: 1px solid #dfdfdf;
551
- -webkit-border-radius: 5px;
552
- -moz-border-radius: 5px;
553
- border-radius: 5px;
554
- -moz-box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
555
- -webkit-box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
556
- box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
557
- }
558
-
559
- .miniWrap{
560
- background: #FFFFFF;
561
- padding: 15px;
562
- border: 1px solid #dfdfdf;
563
- -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
564
- -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
565
- box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
566
- -moz-border-radius: 10px;
567
- border-radius: 10px;
568
- margin: 15px 0px 0px;
569
- }
570
- .note{
571
- -moz-border-radius: 5px;
572
- border-radius: 5px;
573
- background: #F9F9F9;
574
- margin: 0px 0px 10px;
575
- padding: 5px;
576
- border: 1px solid #DFDFDF;
577
- }
578
-
579
- .maxMin{
580
- float: right;
581
- font-weight: bold;
582
- margin: 0px;
583
- padding: 0px 7px;
584
- cursor: pointer;
585
- }
586
- .maxMin:hover{
587
- color: #FFFFFF;
588
- background: #FF9900;
589
- -moz-border-radius: 5px;
590
- border-radius: 5px;
591
- }
592
- .nextStep{
593
- background: #F9FCF5 url(images/right-arrow.png) no-repeat 16px center;
594
- border: 1px solid #9ACA67;
595
- font-size: 13px;
596
- padding: 10px 10px 10px 50px;
597
- -moz-border-radius: 10px;
598
- border-radius: 10px;
599
- cursor: pointer;
600
- }
601
- .textSep{
602
- border-bottom: 1px solid #dfdfdf;
603
- line-height: 2px;
604
- margin: 30px 0px 30px 0px;
605
- }
606
- .textSep span{
607
- background:#fff;
608
- }
609
- .bottomInfo .credits{
610
- background: url(images/aw.png) no-repeat left top;
611
- padding-left: 23px;
612
- color: #8B8B8B;
613
- margin-left: -5px;
614
- font-size: 13px;
615
- text-decoration: none;
616
- }
617
- .subTitle{
618
- background: whiteSmoke;
619
- padding: 15px;
620
- margin-bottom: 15px;
621
- border-radius: 5px;
622
- border: 1px solid #DFDFDF;
623
- font-size: 15px;
624
- }
625
- .startBt{
626
- text-align: center;
627
- margin: 30px 0px 25px;
628
- font-size: 14px;
629
- font-weight: bold;
630
- }
631
- .startBt span{
632
- background: url(images/menu-bg.png) repeat-x;
633
- border: 1px solid #dfdfdf;
634
- margin-right: auto;
635
- margin-left: auto;
636
- padding: 10px;
637
- -webkit-box-shadow: 0px 0px 5px 0px #ccc;
638
- -moz-box-shadow: 0px 0px 5px 0px #ccc;
639
- box-shadow: 0px 0px 5px 0px #ccc;
640
- -webkit-border-radius: 10px;
641
- -moz-border-radius: 10px;
642
- border-radius: 10px;
643
- border-color: #00CC00;
644
- cursor: pointer;
645
- }
646
- .startBt span:hover{
647
- border-color: #FF9900;
648
- }
649
-
650
- .startBox{
651
- float: left;
652
- width: 43%;
653
- padding: 0 15px;
654
- margin: 20px 0;
655
- }
656
- .startBox p{
657
- font-size: 14px;
658
- line-height: 150%;
659
- }
660
- .startBox.auto{
661
- margin-right: 15px;
662
- border-right: 1px dashed #ccc;
663
- }
664
- .startBox.manual{
665
- border-color: green;
666
- }
667
-
668
- .smallText{
669
- font-size: 10px;
670
- color: #666666;
671
- }
672
- .fixedMsg{
673
- position: fixed;
674
- }
675
- .width25{
676
- width: 25%;
677
- }
678
- .width33{
679
- width: 33%;
680
- }
681
- .width50{
682
- width: 50%;
683
- }
684
- .alignright{
685
- float: right;
686
- }
687
- .redText{
688
- color: red;
689
- }
690
- .introWrap .shareList{
691
- background: #FFFDF2;
692
- padding: 10px 5px 5px 10px;
693
- border: 1px solid #FFCC66;
694
- margin: 0px;
695
- -moz-border-radius: 5px;
696
- border-radius: 5px;
697
- }
698
- .introWrap .shareList li{
699
- float: left;
700
- }
701
- .introWrap .startForm{
702
- text-align: center;
703
- padding: 20px 15px 10px;
704
- border-top: 1px dashed #dfdfdf;
705
- margin-top: 15px;
706
- }
707
- .introWrap .startForm .button-primary{
708
- /*font-size: 13px !important;
709
- padding: 8px;*/
710
- }
711
- .introWrap .infoContent{
712
- padding: 15px;
713
- border: 1px solid #dfdfdf;
714
- margin-top: 10px;
715
- -moz-border-radius: 5px;
716
- border-radius: 5px;
717
- }
718
- .introWrap .refLinks{
719
- text-align: center;
720
- }
721
-
722
- .plugin_promo{
723
- right: -95px;
724
- top: 180px;
725
- position: absolute;
726
- padding: 5px;
727
- background: white;
728
- box-shadow: 0 0 4px 0px gray;
729
- border-radius: 5px;
730
- line-height: 0;
731
- }
732
- .plugin_promo:hover .promo_show{
733
- display: block;
734
- }
735
- .promo_show{
736
- background: white;
737
- width: 450px;
738
- position: absolute;
739
- line-height: 150%;
740
- top:-100px;
741
- right: -2px;
742
- padding: 15px;
743
- background: black;
744
- color: white;
745
- box-shadow: 0 0 6px 0px black;
746
- display: none;
747
- border-radius: 5px;
748
- }
749
- .promo_show h3{
750
- padding:0 !important;
751
- border: 0px !important;
752
- }
753
- .promo_credit{
754
- color: gray;
755
- text-decoration: none;
756
- text-align: right;
757
- }
758
-
759
- .statImg{
760
- display: none;
761
- }
762
- .popClose{
763
- float: right;
764
- background: #E6DB55;
765
- padding: 0 6px 1px 6px;
766
- margin: 6px 0;
767
- -moz-border-radius: 5px;
768
- border-radius: 5px;
769
- cursor: pointer;
770
- }
771
- label img{
772
- vertical-align: middle;
773
- }
774
- .shareThisTbl input[type=text]{
775
- width: 60%;
776
- padding: 5px;
777
- }
778
-
779
- * html .clearfix{
780
- height: 1%;
781
- overflow: visible;
782
- }
783
-
784
- /* float clearing for IE7 */
785
- *+html .clearfix{
786
- min-height: 1%;
787
- }
788
-
789
- /* float clearing for everyone else */
790
- .clearfix:after{
791
- clear: both;
792
- content: " ";
793
- display: block;
794
- height: 0;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/wpsr-admin-floating-bar.php DELETED
@@ -1,205 +0,0 @@
1
- <?php
2
- /*
3
- * Floating Share bar admin Page for WP Socializer Plugin
4
- * Author : Aakash Chakravarthy
5
- */
6
-
7
- function wpsr_floatbts_reset_values(){
8
- $wpsr_floatbts['selectedbts'] = 'Facebook,Retweet,Google +1,Email,Print';
9
- $wpsr_floatbts['position'] = 'float_left';
10
- $wpsr_floatbts['theme'] = 'white';
11
-
12
- $wpsr_floatbts['insingle'] = 1;
13
- $wpsr_floatbts['inpage'] = 1;
14
- $wpsr_floatbts['disabled'] = 0;
15
- $wpsr_floatbts['mobmode'] = 0;
16
-
17
- $wpsr_floatbts['floatleft_movable'] = 1;
18
- $wpsr_floatbts['floatleft_offset'] = 25;
19
- $wpsr_floatbts['bottomfixed_width'] = 900;
20
-
21
- update_option('wpsr_template_floating_bar_data', $wpsr_floatbts);
22
- }
23
-
24
- function wpsr_admin_page_floating_bar(){
25
-
26
- if(isset($_POST["wpsr_floatbts_reset"]) && check_admin_referer('wpsr_floatbts_main_form')){
27
- wpsr_floatbts_reset_values();
28
- $reset = 1;
29
- }
30
-
31
- if (isset($_POST["wpsr_floatbts_submit"]) && check_admin_referer('wpsr_floatbts_main_form')){
32
-
33
- $wpsr_floatbts['selectedbts'] = stripslashes($_POST['wpsr_floatbts_selectedbts']);
34
- $wpsr_floatbts['position'] = $_POST['wpsr_floatbts_position'];
35
- $wpsr_floatbts['theme'] = $_POST['wpsr_floatbts_theme'];
36
-
37
- $wpsr_floatbts['insingle'] = $_POST['wpsr_floatbts_insingle'];
38
- $wpsr_floatbts['inpage'] = $_POST['wpsr_floatbts_inpage'];
39
- $wpsr_floatbts['inpage'] = $_POST['wpsr_floatbts_inpage'];
40
- $wpsr_floatbts['disabled'] = $_POST['wpsr_floatbts_disabled'];
41
- $wpsr_floatbts['mobmode'] = $_POST['wpsr_floatbts_mobmode'];
42
-
43
- $wpsr_floatbts['floatleft_movable'] = $_POST['wpsr_floatbts_floatleft_movable'];
44
- $wpsr_floatbts['floatleft_offset'] = stripslashes($_POST['wpsr_floatbts_floatleft_offset']);
45
- $wpsr_floatbts['bottomfixed_width'] = stripslashes($_POST['wpsr_floatbts_bottomfixed_width']);
46
-
47
- update_option('wpsr_template_floating_bar_data', $wpsr_floatbts);
48
- $updated = 1;
49
- }
50
-
51
- if(isset($updated) && $updated == true){
52
- echo "<div class='message updated autoHide'><p>" . __('Updated successfully', 'wpsr') . "</p></div>";
53
- }
54
-
55
- if(isset($reset) && $reset == true){
56
- echo "<div class='message updated autoHide'><p>" . __('Values are set to defaults successfully', 'wpsr') . "</p></div>";
57
- }
58
-
59
- ## Assign the defaults to temp variables
60
- $wpsr_floatbts = get_option('wpsr_template_floating_bar_data');
61
-
62
- if($wpsr_floatbts['floatleft_offset'] == ''){
63
- $wpsr_floatbts['floatleft_offset'] = '25';
64
- }
65
-
66
- ## Set the defaults to the First time users.
67
- if($wpsr_floatbts == ''){
68
- wpsr_floatbts_reset_values();
69
- }
70
- ?>
71
-
72
- <div class="wrap">
73
- <div class="header">
74
-
75
- <iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Ffacebook.com%2Faakashweb&amp;send=false&amp;layout=button_count&amp;width=450&amp;show_faces=true&amp;action=recommend&amp;colorscheme=light&amp;font=arial&amp;height=21&amp;appId=106994469342299" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width: 126px; height:21px;float: right;margin-top: 15px;" allowtransparency="true"></iframe>
76
-
77
- <h2><img width="32" height="32" src="<?php echo WPSR_ADMIN_URL; ?>images/wp-socializer.png" align="absmiddle"/>&nbsp;WP Socializer<span class="smallText"> v<?php echo WPSR_VERSION; ?></span></h2>
78
- </div><!-- Header -->
79
-
80
- <ul class="wpsr_share_wrap">
81
- <li class="wpsr_donate" data-width="300" data-height="220" data-url="<?php echo WPSR_ADMIN_URL . 'js/share.php?i=1'; ?>"><a href="#"></a></li>
82
- <li class="wpsr_share" data-width="350" data-height="85" data-url="<?php echo WPSR_ADMIN_URL . 'js/share.php?i=2'; ?>"><a href="#"></a></li>
83
- <li class="wpsr_pressthis" title="Share a small post about this plugin in your blog !"><a href="press-this.php" target="_blank"></a></li>
84
- </ul>
85
-
86
- <form id="content" method="post">
87
-
88
- <div class="subTitle">Floating Share Bar</div>
89
-
90
- <h3>Settings:</h3>
91
- <div class="section">
92
- <table width="100%" height="194" border="0">
93
- <tr>
94
- <td width="35%" height="52">Position of the Floating share bar</td>
95
- <td width="65%">
96
- <label><input type="radio" name="wpsr_floatbts_position" <?php echo $wpsr_floatbts['position'] == 'float_left' ? ' checked="checked"' : ''; ?> value="float_left"/> Left Float</label><br/>
97
- <label><input type="radio" name="wpsr_floatbts_position" <?php echo $wpsr_floatbts['position'] == 'bottom_fixed' ? ' checked="checked"' : ''; ?> value="bottom_fixed"/> Bottom Fixed</label><br/>
98
- <label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Right Float - <a href="http://bit.ly/YjD5Cv" target="_blank">Info</a></label>
99
-
100
- </td>
101
- </tr>
102
- <tr>
103
- <td height="41">Color theme </td>
104
- <td><label>
105
- <select name="wpsr_floatbts_theme">
106
- <option <?php echo $wpsr_floatbts['theme'] == 'white' ? ' selected="selected"' : ''; ?> value="white" >White</option>
107
- <option <?php echo $wpsr_floatbts['theme'] == 'dark' ? ' selected="selected"' : ''; ?> value="dark" >Dark</option>
108
- </select>
109
- </label></td>
110
- </tr>
111
- <tr>
112
- <td height="54">Show the floating bar in </td>
113
- <td><label><input name="wpsr_floatbts_insingle" id="wpsr_floatbts_insingle" type="checkbox" value="1" <?php echo $wpsr_floatbts['insingle'] == "1" ? 'checked="checked"' : ""; ?> /> In individual posts</label> <br />
114
-
115
- <label><input name="wpsr_floatbts_inpage" id="wpsr_floatbts_inpage" type="checkbox" value="1" <?php echo $wpsr_floatbts['inpage'] == "1" ? 'checked="checked"' : ""; ?> /> In Pages</label>
116
- </td>
117
- </tr>
118
-
119
- <tr>
120
- <td height="37">Disable the mobile mode for floating sharebar <small class="redText">Beta</small></td>
121
- <td><input name="wpsr_floatbts_mobmode" id="wpsr_floatbts_mobmode" type="checkbox" value="1" <?php echo $wpsr_floatbts['mobmode'] == "1" ? 'checked="checked"' : ""; ?> /></td>
122
- </tr>
123
-
124
- <tr>
125
- <td height="37">Disable the floating sharebar</td>
126
- <td><input name="wpsr_floatbts_disabled" id="wpsr_floatbts_disabled" type="checkbox" value="1" <?php echo $wpsr_floatbts['disabled'] == "1" ? 'checked="checked"' : ""; ?> /></td>
127
- </tr>
128
- </table>
129
- </div>
130
-
131
- <h3>Select the buttons</h3>
132
- <div class="section">
133
- <h4>Available buttons &nbsp; <small class="smallText">(Click to add buttons)</small></h4>
134
- <small><span class="redText">New:</span> Try out the new comments button (Beta) (<a href="http://www.aakashweb.com/wordpress-plugins/wp-socializer/" target="_blank">Feedback</a>)</small>
135
- <ul class="floatBtsList clearfix">
136
- <?php
137
- global $wpsr_floating_bar_bts;
138
- foreach($wpsr_floating_bar_bts as $k => $v){
139
- echo '<li>' . $k . '</li>';
140
- }
141
- ?>
142
- </ul>
143
-
144
- <h4>Selected buttons &nbsp; <small class="smallText">(Double click to remove button and click drag to rearrange)</small></h4>
145
- <ul class="floatBtsSel clearfix">
146
- <?php
147
- if(!empty($wpsr_floatbts['selectedbts'])){
148
- $selSplitted = explode(',', $wpsr_floatbts['selectedbts']);
149
- for($i=0; $i < count($selSplitted); $i++){
150
- echo '<li>' . $selSplitted[$i] . '</li>' . "\n";
151
- }
152
- }
153
- ?>
154
- </ul>
155
-
156
- </div>
157
-
158
- <h3>Other Settings</h3>
159
- <div class="section">
160
- <h4>For Left floating sharebar</h4>
161
-
162
- <table width="100%" border="0">
163
- <tr>
164
- <td height="38">Move the floating bar</td>
165
- <td><input name="wpsr_floatbts_floatleft_movable" id="wpsr_floatbts_floatleft_movable" type="checkbox" value="1" <?php echo $wpsr_floatbts['floatleft_movable'] == "1" ? 'checked="checked"' : ""; ?> /></td>
166
- </tr>
167
- <tr>
168
- <td height="46">Distance between post and the floating share bar</td>
169
- <td><input name="wpsr_floatbts_floatleft_offset" id="wpsr_floatbts_floatleft_offset" type="text" value="<?php echo $wpsr_floatbts['floatleft_offset']; ?>"/> px <br/>
170
- <small>Use negative values to move the floating bar to the right</small>
171
- </td>
172
- </tr>
173
- </table>
174
-
175
-
176
- <h4>For bottom fixed sharebar</h4>
177
- <table width="100%" height="54" border="0">
178
- <tr>
179
- <td>Width of the floating bar</td>
180
- <td><input name="wpsr_floatbts_bottomfixed_width" id="wpsr_floatbts_bottomfixed_width" type="text" value="<?php echo $wpsr_floatbts['bottomfixed_width']; ?>"/> px</td>
181
- </tr>
182
- </table>
183
-
184
- </div>
185
-
186
- <div class="footer">
187
- <?php wp_nonce_field('wpsr_floatbts_main_form'); ?>
188
- <input type="hidden" name="wpsr_floatbts_selectedbts" id="wpsr_floatbts_selectedbts" value="<?php echo $wpsr_floatbts['selectedbts']; ?>" />
189
- <input class="button-primary" type="submit" name="wpsr_floatbts_submit" id="wpsr_floatbts_submit" value="<?php _e('Update', 'wpsr'); ?>" />
190
- <input class="button alignright" type="submit" name="wpsr_floatbts_reset" id="wpsr_floatbts_reset" value=" <?php _e('Reset', 'wpsr'); ?> " />
191
- </div><!-- Footer -->
192
-
193
- </form>
194
-
195
- <div class="bottomInfo">
196
- <p align="center"><a href="http://bit.ly/wpsrDonation" target="_blank"><img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" /></a></p>
197
- <p align="center"><a href="https://twitter.com/vaakash" class="twitter-follow-button" data-show-count="false" data-width="130px" data-align="center">Follow @vaakash</a></p>
198
- <p align="center"><a href="http://www.aakashweb.com/" class="credits" target="_blank">a Aakash Web plugin</a></p>
199
- </div>
200
-
201
- </div>
202
-
203
- <?php
204
- }
205
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/wpsr-admin-js.js DELETED
@@ -1,430 +0,0 @@
1
- /*
2
- * WP Socializer - Admin page functions
3
- * Author: Aakash Chakravarthy
4
- * Version: 2.9
5
- *
6
- */
7
-
8
- $j = jQuery.noConflict();
9
- $j(document).ready(function(){
10
-
11
- // Tab Initializements
12
- var tabs = $j("#content").tabs({
13
- fx: {opacity: 'toggle', duration: 'fast'},
14
- /*select: function(event, ui){
15
- window.location.hash = ui.tab.hash;
16
- }*/
17
- });
18
- var subTabs = $j("#tab-3").tabs({fx: {opacity: 'toggle', duration: 'fast'} });
19
-
20
- // Sorter Initializements
21
- $j('.sbSelList').sortable({
22
- stop : wpsr_socialbt_selectedgenerator,
23
- opacity : 0.5,
24
- scroll : true,
25
- revert : true
26
- });
27
-
28
- // Toolbar
29
- $j('.parentLi').hover(function(){
30
- $j(this).children('ul').show();
31
- }, function(){
32
- $j(this).children('ul').fadeOut('fast');
33
- });
34
-
35
- $j('.parentLi li, .btn').click(function(){
36
- var id = $j('#subTabs .ui-state-active').attr('data-editor');
37
- var openTag = ($j(this).attr('openTag') == null) ? '' : $j(this).attr('openTag');
38
- var closeTag = ($j(this).attr('closeTag') == null) ? '' : $j(this).attr('closeTag');
39
- awQuickTags(id, openTag, closeTag,'');
40
- $j(this).parent('.childMenu').fadeOut('fast');
41
- });
42
-
43
- // Window
44
- $j('.window').click(function(e){
45
- if(e.target === this){
46
- $j(this).hide();
47
- $j('body').css('overflow', 'auto');
48
- }
49
- });
50
-
51
- $j('[data-win]').click(function(){
52
- $j('body').css('overflow', 'hidden');
53
- $j('.window .inWindow').hide();
54
- $j('.window').show().children('.' + $j(this).attr('data-win')).show().css('width', $j(this).attr('data-width'));
55
- $j('.window h2').text($j(this).attr('data-title'));
56
- });
57
-
58
- // Oneclick functions
59
- $j.ajax({
60
- type: "GET",
61
- url: $j('.tmplUrl').text(),
62
- dataType: "xml",
63
- success: function(xml){
64
- $j(xml).find('item').each(function(){
65
- name = $j(this).attr('name');
66
- author = $j(this).attr('author');
67
- version = $j(this).attr('version');
68
- image = $j('.tmplImg').text() + $j(this).attr('image');
69
- url = $j(this).attr('url')
70
- vars = $j(this).find('settings').text();
71
- temp1 = 'wpsr_template[1][content]==' + $j(this).find('template1').text() + ';;';
72
- temp2 = 'wpsr_template[2][content]==' + $j(this).find('template2').text() + ';;';
73
- cnt1 = 'wpsr_content1==' + $j(this).find('custom1').text() + ';;';
74
- cnt2 = 'wpsr_content2==' + $j(this).find('custom2').text() + ';;';
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;
82
- $j('.templatesList').append('<div class="templateItem" rel="' + image + '">' + itemContent + '</div>');
83
- });
84
- }
85
- });
86
-
87
- $j('.templateItem').live('mouseenter', function(e){
88
- $j(this).append('<div class="tooltip">Preview: <br/><img src="' + $j(this).attr('rel') + '"/></div>');
89
- $j('.tooltip').css({ top: '75px' });
90
- }).live('mouseleave', function(){
91
- $j(this).children('.tooltip').remove();
92
- });
93
-
94
- $j('.applyBt').live('click', function(){
95
- cnt = $j(this).next('.templateCont').text();
96
- cntSplit = cnt.split(';;');
97
-
98
- $j(this).fadeOut(500).fadeIn(500).addClass('applyBtYellow');
99
-
100
- for(i=0; i<cntSplit.length; i++){
101
- element = cntSplit[i].split('==');
102
- eleId = ConvertValue('#' + $j.trim(element[0]));
103
- eleValue = $j.trim(element[1]);
104
-
105
- if($j(eleId).attr('type') == 'checkbox'){
106
- if(eleValue == 0){
107
- $j(eleId).removeAttr('checked');
108
- }else{
109
- $j(eleId).attr('checked', 'checked');
110
- }
111
- }else if($j(eleId).attr('type') == 'radio'){
112
- $j(eleId + '[value=' + eleValue + ']').attr('checked', 'checked');
113
- }else{
114
- $j(eleId).val(eleValue);
115
- }
116
- }
117
-
118
- alert(' Template is applied. Go to "Edit templates" page and customize the arrangement or alignment if needed ' );
119
- });
120
-
121
- // Add social button
122
- $j('.sbAdd').click(function(){
123
- var text = $j(this).siblings('.sbName').text();
124
- var appendList = '<li><span class="sbName">' + text + '</span><span class="sbDelete">x</span></li>';
125
- var pixel = $j(this).attr('data-pixel');
126
-
127
- $j('#sbSelList_' + pixel + 'px' ).append(appendList);
128
- wpsr_socialbt_selectedgenerator();
129
- });
130
-
131
- // Delete social button
132
- $j('.sbDelete').live("click", function() {
133
- $j(this).parent().fadeOut('slow', function(){
134
- $j(this).remove();
135
- wpsr_socialbt_selectedgenerator();
136
- });
137
- });
138
-
139
- // Basic Admin Functions
140
- $j('h3:not(".noToggle")').append('<span class="maxMin" title="Collapse">-</span>');
141
-
142
- $j('h3 .maxMin').toggle(
143
- function(){
144
- $j(this).parent().next().slideUp();
145
- $j(this).text('+');
146
- },
147
- function(){
148
- $j(this).parent().next().slideDown();
149
- $j(this).text('-');
150
- }
151
- );
152
-
153
- $j('.inWindow').prepend('<h2></h2>');
154
- $j('.message').prepend('<span class="popClose">x</span>');
155
-
156
- $j('[data-tab]').click(function(e){
157
- e.preventDefault();
158
- tabs.tabs('option', 'active', $j(this).attr('data-tab')-1);
159
- });
160
-
161
- setTimeout(function(){
162
- $j('.autoHide').slideUp('slow', function(){ $j(this).remove(); });
163
- }, 8000);
164
-
165
- $j('.message .popClose').click(function(){
166
- $j(this).parent().slideUp();
167
- });
168
-
169
- $j('.toggleNext').live('click', function(){
170
- $j(this).next().slideToggle();
171
- });
172
-
173
- // Intro box
174
- if($j('.introWrap').length != 0){
175
- $j.ajax({
176
- type: "GET",
177
- url: 'http://query.yahooapis.com/v1/public/yql?q=' + encodeURIComponent('select * from xml where url="http://vaakash.github.io/wpsr.xml"') + '&format=xml',
178
- dataType: "xml",
179
- success: function(xml){
180
- try{
181
- ver = '[version="' + $j('.wpsrVer').text() + '"]';
182
- $j(xml).find('content' + ver).each(function(){
183
- $j('.infoContent').hide();
184
- $j('.infoContent').html($j(this).text());
185
- $j('.infoContent').fadeIn();
186
- });
187
- }
188
- catch(err){
189
- $j('.infoContent').html('<p>For more details: </p>');
190
- }
191
- },
192
- error: function(err){
193
- $j('.infoContent').html('<b>New in this version: </b> <a href="http://www.aakashweb.com/wordpress-plugins/wp-socializer/" target="_blank">Click here</a> to view the new features and changes');
194
- }
195
- });
196
- iUrl = 'http://stats.wordpress.com/g.gif?host=vaakash.kodingen.com&blog=24923956&v=ext&post=0&rand=' + Math.random() + '&ref=' + encodeURI($j('.blogUrl').text());
197
- $j('.introWrap').after('<img src="' + iUrl + '" class="statImg"/>');
198
- }
199
-
200
- //Help tab
201
- $j('.helpTab').click(function(){
202
- $j.ajax({
203
- type: "GET",
204
- url: 'http://query.yahooapis.com/v1/public/yql?q=' + encodeURIComponent('select * from xml where url="http://vaakash.github.io/wpsr-help.xml"') + '&format=xml',
205
- dataType: "xml",
206
- success: function(xml){
207
- ver = '[version="' + $j('.wpsrVer').text() + '"]';
208
-
209
- general = $j(xml).find('general').text();
210
- specific = $j(xml).find('content' + ver).text();
211
-
212
- $j('.helpBox').hide();
213
- $j('.helpBox').html(general + specific);
214
- $j('.helpBox').fadeIn();
215
-
216
- },
217
- error: function(err){
218
- $j('.helpBox').html('<p>An error occured while getting the help file.</p> For WP Socializer plugin support, use the free <a href="http://www.aakashweb.com/forum/" target="_blank">Aakash Web support forum</a>')
219
- }
220
- });
221
-
222
- });
223
-
224
- // Tooltip
225
- $j('.showTooltip').live('mouseover', function(e) {
226
- var tip = '<img src="' + $j('.wpsrAdminUrl').text() + 'images/buttons/' + $j(this).attr('data-image') + '.png" />';
227
- $j(this).append('<div class="tooltip">' + tip + '</div>');
228
- $j('.tooltip').css({
229
- 'margin-top': -$j(this).children('.tooltip').outerHeight(),
230
- 'margin-left': -($j(this).children('.tooltip').outerWidth() + 20)
231
- });
232
- }).mouseleave(function(){
233
- $j(this).children('div.tooltip').remove();
234
- });
235
-
236
- // Retweet Page
237
- $j('#wpsr_retweet_topsysettings').hide();
238
- $j('#wpsr_retweet_service').change(function(){
239
- if($j('#wpsr_retweet_service').val() == 'topsy'){
240
- $j('#wpsr_retweet_topsysettings').slideDown();
241
- }
242
- if($j('#wpsr_retweet_service').val() != 'topsy'){
243
- $j('#wpsr_retweet_topsysettings').slideUp();
244
- }
245
- });
246
- if($j('#wpsr_retweet_service').val() == 'topsy'){
247
- $j('#wpsr_retweet_topsysettings').slideDown();
248
- }
249
-
250
- $j('#wpsr_retweet_twittersettings').hide();
251
- $j('#wpsr_retweet_service').change(function(){
252
- if($j('#wpsr_retweet_service').val() == 'twitter'){
253
- $j('#wpsr_retweet_twittersettings').slideDown();
254
- }
255
- if($j('#wpsr_retweet_service').val() != 'twitter'){
256
- $j('#wpsr_retweet_twittersettings').slideUp();
257
- }
258
- });
259
- if($j('#wpsr_retweet_service').val() == 'twitter'){
260
- $j('#wpsr_retweet_twittersettings').slideDown();
261
- }
262
-
263
- // Facebook Page
264
-
265
- $j('#wpsr_facebook_counterplacement').hide();
266
- $j('#wpsr_facebook_counter').change(function(){
267
- if($j('#wpsr_facebook_counter').val() == '1'){
268
- $j('#wpsr_facebook_counterplacement').slideDown();
269
- }
270
- if($j('#wpsr_facebook_counter').val() != '1'){
271
- $j('#wpsr_facebook_counterplacement').slideUp();
272
- }
273
- });
274
- if($j('#wpsr_facebook_counter').val() == '1'){
275
- $j('#wpsr_facebook_counterplacement').slideDown();
276
- }
277
-
278
- // smartload settings
279
-
280
- $j('#wpsr_lazload_timeout').hide();
281
- $j('#wpsr_settings_smartload').change(function(){
282
- if($j(this).val() == 'timeout'){
283
- $j('#wpsr_lazload_timeout').slideDown();
284
- }
285
- if($j(this).val() != 'timeout'){
286
- $j('#wpsr_lazload_timeout').slideUp();
287
- }
288
- });
289
- if($j('#wpsr_settings_smartload').val() == 'timeout'){
290
- $j('#wpsr_lazload_timeout').slideDown();
291
- }
292
-
293
- // Live search
294
- $j('#sbFilter').keyup(function(event){
295
- var search_text = $j(this).val();
296
- var rg = new RegExp(search_text,'i');
297
- $j('#sbList li').each(function(){
298
- if($j.trim($j(this).text()).search(rg) == -1){
299
- $j(this).hide();
300
- }else{
301
- $j(this).show();
302
- }
303
- });
304
- });
305
-
306
- // Share
307
- $j('.wpsr_share_wrap li').not('.wpsr_pressthis').mouseenter(function(){
308
- $this = $j(this);
309
- $j('.wpsr_share_iframe').remove();
310
- $j('body').append('<iframe class="wpsr_share_iframe"></iframe>');
311
- $j('.wpsr_share_iframe').css({
312
- position: 'absolute',
313
- top: $this.offset()['top'],
314
- left: $this.offset()['left'] + 55,
315
- width: $this.attr('data-width'),
316
- height: $this.attr('data-height'),
317
- }).attr('src', $this.attr('data-url')).hide().fadeIn();
318
- });
319
-
320
- $j('.wpsr_share_iframe').live('mouseout', function(){
321
- $j(this).remove();
322
- });
323
-
324
- $j('.wpsr_pressthis a').click(function(e){
325
- e.preventDefault();
326
- newwindow2=window.open('press-this.php?t=WP Socializer - all in one social buttons plugin for WordPress&u=http://www.aakashweb.com/wordpress-plugins/wp-socializer/&s=WP Socializer is an advanced plugin for inserting all kinds of Social bookmarking and sharing buttons. It has super cool features to insert the buttons into posts, sidebar. It also has Floating sharebar in two modes of orientation. Custom icons can be used for social icons. Check out to know more information on this plugin.','name','height=400,width=700');
327
- });
328
-
329
- $j('#wpsr_reset').click(function(){
330
- var res = confirm('Do you want to reset the settings ?');
331
- if(res == false){
332
- return false;
333
- }
334
- });
335
-
336
- // Floating share bar
337
- $j('.floatBtsSel').sortable({
338
- stop: wpsr_floatingbt_selectedgenerator,
339
- opacity : 0.5,
340
- scroll : true,
341
- placeholder: "floatbts_highlight"
342
- //revert : true
343
- });
344
- $j('.floatBtsList li').click(function(){
345
- $j('.floatBtsSel').append($j(this).clone());
346
- wpsr_floatingbt_selectedgenerator();
347
- });
348
-
349
- $j('.floatBtsSel li').live('dblclick', function(){
350
- $j(this).remove();
351
- wpsr_floatingbt_selectedgenerator();
352
- });
353
-
354
- $j('#wpsr_floatbts_reset').click(function(){
355
- var res = confirm('Do you want to reset the settings ?');
356
- if(res == false){
357
- return false;
358
- }
359
- });
360
-
361
- // Checkbox unchecked value
362
- $j('#content input[type=checkbox]').each(function(){
363
- clone = $j(this).clone().attr('type', 'hidden').attr('value', 0);
364
- $j(this).before(clone);
365
- });
366
-
367
- // PROMO
368
- $j('.promo_p1').mouseenter(function(){
369
- $j(this).hide();
370
- $j('.promo_p2').show();
371
- });
372
- $j('.promo_p2').mouseleave(function(){
373
- $j(this).hide();
374
- $j('.promo_p1').show();
375
- });
376
- $j('.promo_p2').hide();
377
-
378
- });
379
-
380
- function wpsr_socialbt_selectedgenerator(){
381
- // 16 px
382
- var sbSel_16px = [];
383
- $j("#sbSelList_16px li .sbName").each(function(){
384
- sbSel_16px.push($j(this).text());
385
- });
386
- $j("#wpsr_socialbt_selected16px").val(sbSel_16px.join(','));
387
-
388
- // 32 px
389
- var sbSel_32px = [];
390
- $j("#sbSelList_32px li .sbName").each(function(){
391
- sbSel_32px.push($j(this).text());
392
- });
393
- $j("#wpsr_socialbt_selected32px").val(sbSel_32px.join(','));
394
- }
395
-
396
- function wpsr_floatingbt_selectedgenerator(){
397
- var floatbts_sel = [];
398
- $j(".floatBtsSel li").each(function(){
399
- floatbts_sel.push($j(this).text());
400
- });
401
-
402
- $j("#wpsr_floatbts_selectedbts").val(floatbts_sel.join(','));
403
- }
404
-
405
- function ConvertValue(id){
406
- var test = id.replace(/[[]/g,'\\[');
407
- return test.replace(/]/g,'\\]');
408
- }
409
-
410
- function openAddthis(){
411
- window.open ("http://www.addthis.com/bookmark.php?v=250&username=vaakash&title=WP Socializer - Wordpress plugin&url=http://www.aakashweb.com/wordpress-plugins/wp-socializer/", "open_window","location=0,status=0,scrollbars=1,width=500,height=600");
412
- }
413
-
414
- function openServiceSelctor(windowUrl, id){
415
- var atw = window.open(windowUrl + document.getElementById(id).value, 'wpsr_services_popup','width=620,height=660,scrollbars=1');
416
- atw.focus();
417
- return false;
418
- }
419
-
420
- function addthisSetTargetField(gotValue, targetField){
421
- document.getElementById(targetField).value = gotValue;
422
- window.focus();
423
- }
424
-
425
- var wpsr_closeiframe = function(){
426
- $j('.wpsr_share_iframe').remove();
427
- }
428
-
429
- /* AW Quick tag editor */
430
- function awQuickTags(tbField,openTg,closeTg,btType){contentBox=document.getElementById(tbField);var src;var href;var style;var divStyle;var divId;if(document.selection){contentBox.focus();sel=document.selection.createRange();if(btType==''){sel.text=insertTagsAll('',openTg,sel.text,closeTg,'');}if(btType=='a'){sel.text=insertTagLink('',openTg,sel.text,closeTg,'');}if(btType=='img'){sel.text=insertTagImage('',openTg,sel.text,closeTg,'');}if(btType=='replace'){sel.text=insertTagReplacable('',openTg,sel.text,closeTg,'');}}else if(contentBox.selectionStart||contentBox.selectionStart=='0'){var startPos=contentBox.selectionStart;var endPos=contentBox.selectionEnd;var front=(contentBox.value).substring(0,startPos);var back=(contentBox.value).substring(endPos,contentBox.value.length);var selectedText=contentBox.value.substring(startPos,endPos);if(btType==''){contentBox.value=insertTagsAll(front,openTg,selectedText,closeTg,back);contentBox.selectionStart=startPos+contentBox.value.length;contentBox.selectionEnd=startPos+openTg.length+selectedText.length;}if(btType=='a'){contentBox.value=insertTagLink(front,openTg,selectedText,closeTg,back);contentBox.selectionStart=startPos+contentBox.value.length;contentBox.selectionEnd=startPos+openTg.length+selectedText.length+8+href.length;}if(btType=='img'){contentBox.value=insertTagImage(front,openTg,selectedText,closeTg,back);contentBox.selectionStart=startPos+contentBox.value.length;contentBox.selectionEnd=startPos+openTg.length+selectedText.length+7+src.length+closeTg.length;}if(btType=='replace'){contentBox.value=insertTagReplacable(front,openTg,selectedText,closeTg,back);contentBox.selectionStart=startPos+contentBox.value.length;contentBox.selectionEnd=startPos+openTg.length;}}else{contentBox.value+=myValue;contentBox.focus();}function insertTagsAll(frontText,openTag,selectedText,closeTag,backText){return frontText+openTg+selectedText+closeTg+backText;}function insertTagLink(frontText,openTag,selectedText,closeTag,backText){href=prompt('Enter the URL of the Link','http://');if(href!='http://'&&href!=null){return frontText+openTg+'href="'+href+'">'+selectedText+closeTg+backText;}else{return frontText+selectedText+backText;}}function insertTagImage(frontText,openTag,selectedText,closeTag,backText){src=prompt('Enter the URL of the Image','http://');if(src!='http://'&&src!=null){return frontText+openTg+'src="'+src+'" '+closeTg+selectedText+backText;}else{return frontText+selectedText+backText;}}function insertTagImage(frontText,openTag,selectedText,closeTag,backText){src=prompt('Enter the URL of the Image','http://');if(src!='http://'&&src!=null){return frontText+openTg+'src="'+src+'" '+closeTg+selectedText+backText;}else{return frontText+selectedText+backText;}}function insertTagReplacable(frontText,openTag,selectedText,closeTag,backText){return frontText+openTg+backText;}}function awQuickTagsHeading(tbField,headingBox){contentBox=document.getElementById(tbField);hBox=document.getElementById(headingBox);contentBox.focus();if(document.selection){contentBox.focus();sel=document.selection.createRange();sel.text='<h'+hBox.value+'>'+sel.text+'</h'+hBox.value+'>';}else if(contentBox.selectionStart||contentBox.selectionStart=='0'){var startPos=contentBox.selectionStart;var endPos=contentBox.selectionEnd;var front=(contentBox.value).substring(0,startPos);var back=(contentBox.value).substring(endPos,contentBox.value.length);var selectedText=contentBox.value.substring(startPos,endPos);contentBox.value=front+'<h'+hBox.value+'>'+selectedText+'</h'+hBox.value+'>'+back;contentBox.selectionStart=startPos+contentBox.value.length;contentBox.selectionEnd=startPos+4+selectedText.length;}}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/wpsr-admin-mini-css.css DELETED
@@ -1,46 +0,0 @@
1
- /*
2
- * Author : Aakash Chakravarthy
3
- * Version : 1.1
4
- */
5
-
6
- *{
7
- margin: 0px;
8
- padding: 0px;
9
- }
10
- body{
11
- font: 13px Arial, Helvetica, sans-serif;
12
- background: #F9F9F9;
13
- }
14
- h2{
15
- margin: 0 0 10px 0;
16
- }
17
- small {
18
- color: #999999;
19
- margin: 0px !important;
20
- padding: 0px !important;
21
- }
22
- input{
23
- padding: 3px;
24
- }
25
- #wrapper {
26
- border: 1px solid #D4D4D4;
27
- background: #FFFFFF;
28
- padding: 20px;
29
- margin: 20px;
30
- -moz-border-radius: 6px;
31
- border-radius: 6px;
32
- -webkit-box-shadow: rgba(0, 0, 0, 0.0976563) 0px 2px 3px;
33
- }
34
-
35
- #wrapper form {
36
- border-top: 1px solid #D4D4D4;
37
- margin: 15px 0 0 0;
38
- padding: 15px 0;
39
- }
40
- #services{
41
- width: 96%;
42
- }
43
- #updateBt{
44
- padding: 5px 15px;
45
- font-size: 18px;
46
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/wpsr-admin-other.php DELETED
@@ -1,92 +0,0 @@
1
- <?php
2
- /*
3
- * Admin Page for WP Socializer Plugin - In widgets and posts
4
- * Author : Aakash Chakravarthy
5
- */
6
-
7
- function wpsr_check_hja(){
8
- if (class_exists('html_javascript_adder_widget') && HJA_VERSION >= '3.2'){
9
- return 'installed';
10
- }elseif(HJA_VERSION < '3.2'){
11
- return 'upgradable';
12
- }else{
13
- return 'not-installed';
14
- }
15
- }
16
-
17
- function wpsr_admin_page_other(){
18
- global $wpsr_shortcodes_list;
19
-
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
-
27
- <div class="message updated"><p><strong><?php _e('Note:', 'wpsr'); ?></strong> <?php _e('Inorder to use the buttons in <em>Widgets</em> and <em>Posts</em>, you need to use the below shortcodes.', 'wpsr'); ?></p>
28
- </div>
29
-
30
- <h2>Available Shortcodes</h2><br />
31
-
32
- <table class="widefat scTable">
33
- <thead>
34
- <tr>
35
- <th>Button</th>
36
- <th>Shortcode</th>
37
- </tr>
38
- </thead>
39
- <tfoot>
40
- <tr>
41
- <th>Button</th>
42
- <th>Shortcode</th>
43
- </tr>
44
- </tfoot>
45
- <tbody>
46
- <?php
47
- foreach($wpsr_shortcodes_list as $name => $shortcode){
48
- echo "<tr><td>$name</td><td>$shortcode</td></tr>";
49
- }
50
- ?>
51
- </tbody>
52
- </table>
53
-
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>
61
-
62
- <p><center>
63
- <?php
64
- $nonce = wp_create_nonce('wpsr-nonce');
65
- if (wpsr_check_hja() == 'installed'){
66
- echo '<em>' . __('HTML Javascript Adder is installed, Go to Widgets page and use the shortcodes in this widget' ,'wpsr') . '</em>';
67
- }elseif(wpsr_check_hja() == 'upgradable'){
68
- $updateUrl = 'update.php?action=upgrade-plugin&plugin=html-javascript-adder%2Fhtml-javascript-adder.php&_wpnonce=' . $nonce;
69
- echo "<a class='button-primary' href='$updateUrl'>" . __('Upgrade HTML Javascript Adder plugin' ,'wpsr') . "</a><br>";
70
- echo "<br><span class='smallText error'>" . __('The current version (' ,'wpsr') . HJA_VERSION . __(') is not compatible with WP Socializer. It is recommended to upgrade' ,'wpsr') . "</span>";
71
- }elseif(wpsr_check_hja() == 'not-installed'){
72
- $installUrl = 'update.php?action=install-plugin&plugin=html-javascript-adder&_wpnonce=' . $nonce;
73
- echo "<a class='button-primary' href='$installUrl'>" . __('Install HTML Javascript Adder plugin' ,'wpsr') . "</a>";
74
- }
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>
82
-
83
- <hr />
84
-
85
- <p class="smallText hjaNote"><strong><?php _e('Note:', 'wpsr'); ?></strong> <?php _e('HTML Javascript Adder is a wordpress plugin for inserting HTML, Javascripts in widgets with more than 60,000 downloads. This is from the same author of this plugin. The latest version of HJA can insert WP Socializer buttons in widgets.', 'wpsr'); ?></p>
86
- <a name="note" id="note"></a>
87
- </div>
88
-
89
- </div>
90
- <?php
91
- }
92
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/wpsr-admin.php DELETED
@@ -1,1374 +0,0 @@
1
- <?php
2
- /*
3
- * Main Admin Page for WP Socializer Plugin
4
- * Author : Aakash Chakravarthy
5
- */
6
-
7
- $wpsr_donate_link = 'http://bit.ly/wpsrDonation';
8
-
9
- ## Initializations
10
- function wpsr_admin_init(){
11
- global $wpsr_default_templates;
12
- $user_template = get_option('wpsr_templates');
13
-
14
- if(empty($user_template)){
15
- update_option('wpsr_templates', $wpsr_default_templates);
16
- }else{
17
- $merged_array = $wpsr_default_templates + $user_template;
18
- if($user_template != $merged_array){
19
- update_option('wpsr_templates', $merged_array);
20
- }
21
- }
22
-
23
- // Include the plugin translations
24
- // load_plugin_textdomain('wpsr', false, dirname(plugin_basename( __FILE__ )) . '/languages');
25
- }
26
- add_action('admin_init','wpsr_admin_init');
27
-
28
- // Admin menu
29
- function wpsr_admin_menu() {
30
-
31
- $icon = WPSR_ADMIN_URL .'images/wp-socializer-20.png';
32
-
33
- add_menu_page('WP Socializer - Admin page', 'WP Socializer', 'manage_options', 'wp_socializer', 'wpsr_admin_page', $icon);
34
- add_submenu_page('wp_socializer', 'WP Socializer - Admin page', 'WP Socializer', 'manage_options', 'wp_socializer', 'wpsr_admin_page');
35
- add_submenu_page('wp_socializer', 'WP Socializer - Floating Share bar', 'Floating Share bar', 'manage_options', 'wp_socializer_floating_bar', 'wpsr_admin_page_floating_bar');
36
- add_submenu_page('wp_socializer', 'WP Socializer - Shortcodes', 'Shortcodes', 'manage_options', 'wp_socializer_other', 'wpsr_admin_page_other');
37
- }
38
- add_action('admin_menu', 'wpsr_admin_menu');
39
-
40
- ## Load the Javascripts
41
- function wpsr_admin_js() {
42
- wp_register_script('wpsr-admin-js', WPSR_ADMIN_URL . 'wpsr-admin-js.js?v=' . WPSR_VERSION);
43
- $pages = array('wp_socializer', 'wp_socializer_other', 'wp_socializer_floating_bar');
44
-
45
- if (isset($_GET['page']) && (in_array($_GET['page'], $pages))){
46
- wp_enqueue_script(array(
47
- 'jquery',
48
- 'jquery-ui-core',
49
- 'jquery-ui-sortable',
50
- 'jquery-ui-tabs',
51
- 'wpsr-admin-js'
52
- ));
53
- }
54
- }
55
- add_action('admin_print_scripts', 'wpsr_admin_js');
56
-
57
- ## Load the CSS
58
- function wpsr_admin_css() {
59
- $pages = array('wp_socializer', 'wp_socializer_other', 'wp_socializer_floating_bar');
60
-
61
- if (isset($_GET['page']) && (in_array($_GET['page'], $pages))){
62
- wp_enqueue_style('wp-socializer-admin-css', WPSR_ADMIN_URL . 'wpsr-admin-css.css?v=' . WPSR_VERSION);
63
- }
64
- }
65
- add_action('admin_print_styles', 'wpsr_admin_css');
66
-
67
- ## The toolbar
68
- function wpsr_addtoolbar(){
69
- echo
70
- '<div class="toolbar">
71
- <ul class="tbButtons">
72
- <li class="parentLi btn">
73
- <span class="admSprites socialButtons"></span>Social buttons
74
- <ul class="childMenu">
75
- <li openTag="{social-bts-16px}">Social buttons 16px</li>
76
- <li openTag="{social-bts-32px}">Social buttons 32px</li>
77
- </ul>
78
- </li>
79
-
80
- <li class="parentLi btn">
81
- <span class="admSprites addthisIcon"></span>Addthis
82
- <ul class="childMenu">
83
- <li class="showTooltip" openTag="{addthis-tb-16px}" data-image="addthis-tb-16px">Toolbox 16px</li>
84
- <li class="showTooltip" openTag="{addthis-tb-32px}" data-image="addthis-tb-32px">Toolbox 32px</li>
85
- <li class="showTooltip" openTag="{addthis-sc}" data-image="adthis-sharecount">Sharecount</li>
86
- <li class="showTooltip" openTag="{addthis-bt}" data-image="addthis-buttons">Buttons</li>
87
- </ul>
88
- </li>
89
-
90
- <li class="parentLi btn">
91
- <span class="admSprites sharethisIcon"></span>Sharethis
92
- <ul class="childMenu">
93
- <li class="showTooltip" openTag="{sharethis-vcount}" data-image="sharethis-vcount">Vertical Count</li>
94
- <li class="showTooltip" openTag="{sharethis-hcount}" data-image="sharethis-hcount">Horizontal Count</li>
95
- <li class="showTooltip" openTag="{sharethis-large}" data-image="sharethis-large">Large Buttons</li>
96
- <li class="showTooltip" openTag="{sharethis-regular}" data-image="sharethis-regular">Regular Buttons</li>
97
- <li class="showTooltip" openTag="{sharethis-regular2}" data-image="sharethis-regular-notext">Regular Buttons (no-text)</li>
98
- <li class="showTooltip" openTag="{sharethis-bt}" data-image="sharethis-buttons">Buttons</li>
99
- <li class="showTooltip" openTag="{sharethis-classic}" data-image="sharethis-classic">Classic</li>
100
- </ul>
101
- </li>
102
-
103
- <li class="parentLi btn">
104
- <span class="admSprites facebookIcon"></span>Facebook
105
- <ul class="childMenu">
106
- <li openTag="{facebook-like}">Like button</li>
107
- <li openTag="{facebook-send}">Like button + Send button</li>
108
- </ul>
109
- </li>
110
-
111
- <li class="parentLi btn">
112
- <span class="admSprites googleplusIcon"></span>Google
113
- <ul class="childMenu">
114
- <li openTag="{plusone-small}">+1 - Small</li>
115
- <li openTag="{plusone-medium}">+1 - Medium</li>
116
- <li openTag="{plusone-standard}">+1 - Standard</li>
117
- <li openTag="{plusone-tall}">+1 - Tall</li>
118
- </ul>
119
- </li>
120
-
121
- <li class="parentLi btn">
122
- <span class="admSprites retweetIcon"></span>Twitter
123
- <ul class="childMenu">
124
- <li openTag="{retweet-bt}">Twitter button</li>
125
- </ul>
126
- </li>
127
-
128
- <li class="parentLi btn">
129
- <span class="admSprites stumbleuponIcon"></span>StumbleUpon
130
- <ul class="childMenu">
131
- <li class="showTooltip" openTag="{stumbleupon-1}" data-image="stumbleupon-bts">Type 1</li>
132
- <li class="showTooltip" openTag="{stumbleupon-2}" data-image="stumbleupon-bts">Type 2</li>
133
- <li class="showTooltip" openTag="{stumbleupon-3}" data-image="stumbleupon-bts">Type 3</li>
134
- <li class="showTooltip" openTag="{stumbleupon-5}" data-image="stumbleupon-bts">Type 5</li>
135
- </ul>
136
- </li>
137
-
138
- <li class="parentLi btn">
139
- <span class="admSprites redditIcon"></span>Reddit
140
- <ul class="childMenu">
141
- <li class="showTooltip" openTag="{reddit-1}" data-image="reddit-bts">Type 1</li>
142
- <li class="showTooltip" openTag="{reddit-2}" data-image="reddit-bts">Type 2</li>
143
- <li class="showTooltip" openTag="{reddit-3}" data-image="reddit-bts">Type 3</li>
144
- </ul>
145
- </li>
146
-
147
- <li class="parentLi btn">
148
- <span class="admSprites linkedinIcon"></span>LinkedIn
149
- <ul class="childMenu">
150
- <li class="showTooltip" openTag="{linkedin-standard}" data-image="linkedin-bts">Type 1</li>
151
- <li class="showTooltip" openTag="{linkedin-right}" data-image="linkedin-bts">Type 2</li>
152
- <li class="showTooltip" openTag="{linkedin-top}" data-image="linkedin-bts">Type 3</li>
153
- </ul>
154
- </li>
155
-
156
- <li class="parentLi btn">
157
- <span class="admSprites pinterestIcon"></span>Pinterest
158
- <ul class="childMenu">
159
- <li class="showTooltip" openTag="{pinterest-nocount}" data-image="pinterest-bts">Type 1</li>
160
- <li class="showTooltip" openTag="{pinterest-horizontal}" data-image="pinterest-bts">Type 2</li>
161
- <li class="showTooltip" openTag="{pinterest-vertical}" data-image="pinterest-bts">Type 3</li>
162
- </ul>
163
- </li>
164
-
165
- <li class="parentLi btn">
166
- <span class="admSprites customIcon"></span>Other buttons
167
- <ul class="childMenu">
168
- <li openTag="{custom-1}">Custom 1</li>
169
- <li openTag="{custom-2}">Custom 2</li>
170
- </ul>
171
- </li>
172
-
173
- </ul>
174
-
175
- </div>';
176
- }
177
-
178
- ## Default values
179
- function wpsr_reset_values(){
180
- $wpsr_temp1_def = '<div class="wp-socializer-buttons clearfix">
181
- <span class="wpsr-btn">{facebook-like}</span>
182
- <span class="wpsr-btn">{retweet-bt}</span>
183
- <span class="wpsr-btn">{plusone-medium}</span>
184
- <span class="wpsr-btn">{linkedin-right}</span>
185
- <span class="wpsr-btn">{stumbleupon-1}</span>
186
- </div>';
187
-
188
- $wpsr_temp2_def = '<h3>' . __('Share and Enjoy' ,'wpsr') . '</h3>
189
- {social-bts-32px}';
190
-
191
- ## Addthis defaults
192
- $wpsr_addthis['username'] = '';
193
- $wpsr_addthis['language'] = 'en';
194
- $wpsr_addthis['button'] = 'lg-share-';
195
-
196
- $wpsr_addthis['tb_16pxservices'] = $wpsr_addthis['tb_32pxservices'] = 'facebook,twitter,digg,delicious,email,compact';
197
- $wpsr_addthis['sharecount'] = 'normal';
198
-
199
- $wpsr_addthis['btbrand'] = '';
200
- $wpsr_addthis['clickback'] = 1;
201
-
202
- update_option("wpsr_addthis_data", $wpsr_addthis);
203
-
204
- ## Sharethis defaults
205
- $wpsr_sharethis['vcount_order'] = 'facebook,twitter,email,sharethis';
206
- $wpsr_sharethis['hcount_order'] = 'facebook,twitter,email,sharethis';
207
- $wpsr_sharethis['buttons_order'] = 'facebook,twitter,email,sharethis';
208
- $wpsr_sharethis['large_order'] = 'facebook,twitter,email,sharethis';
209
- $wpsr_sharethis['regular_order'] = 'facebook,twitter,email,sharethis';
210
- $wpsr_sharethis['regular2_order'] = 'facebook,twitter,email,sharethis';
211
- $wpsr_sharethis['pubkey'] = '';
212
- $wpsr_sharethis['copynshare'] = 0;
213
- $wpsr_sharethis['addp'] = 1;
214
-
215
- update_option("wpsr_sharethis_data", $wpsr_sharethis);
216
-
217
- ## Retweet Defaults
218
- $wpsr_retweet['username'] = '';
219
- $wpsr_retweet['type'] = 'compact';
220
- $wpsr_retweet['service'] = 'twitter';
221
- $wpsr_retweet['topsytheme'] = 'blue';
222
- $wpsr_retweet['twitter_recacc'] = '';
223
- $wpsr_retweet['twitter_lang'] = 'en';
224
-
225
- update_option("wpsr_retweet_data", $wpsr_retweet);
226
-
227
- ## Digg Defaults
228
- $wpsr_digg['type'] = 'DiggCompact';
229
-
230
- update_option("wpsr_digg_data", $wpsr_digg);
231
-
232
- ## Facebook Defaults
233
- $wpsr_facebook['btstyle'] = 'button_count';
234
- $wpsr_facebook['showfaces'] = 0;
235
- $wpsr_facebook['verb'] = 'like';
236
- $wpsr_facebook['color'] = 'light';
237
- $wpsr_facebook['appid'] = '';
238
- $wpsr_facebook['locale'] = 'en_US';
239
-
240
- update_option("wpsr_facebook_data", $wpsr_facebook);
241
-
242
- ## Social Button Defaults
243
- $wpsr_socialbt['selected16px'] = 'facebook,twitter,delicious,linkedin,stumbleupon,addtofavorites,email,rss';
244
- $wpsr_socialbt['selected32px'] = 'facebook,twitter,delicious,linkedin,stumbleupon,addtofavorites,email,rss';
245
- $wpsr_socialbt['target'] = 0;
246
- $wpsr_socialbt['target'] = 1;
247
- $wpsr_socialbt['loadcss'] = 1;
248
- $wpsr_socialbt['effect'] = 'opacity';
249
- $wpsr_socialbt['label'] = 0;
250
- $wpsr_socialbt['columns'] = 'no';
251
- $wpsr_socialbt['imgpath16px'] = WPSR_SOCIALBT_IMGPATH . '16/';
252
- $wpsr_socialbt['imgpath32px'] = WPSR_SOCIALBT_IMGPATH . '32/';
253
- $wpsr_socialbt['usesprites'] = 1;
254
-
255
- update_option('wpsr_socialbt_data', $wpsr_socialbt);
256
-
257
- ## Custom Defaults
258
- $wpsr_custom['custom1'] = '';
259
- $wpsr_custom['custom2'] = '';
260
-
261
- update_option("wpsr_custom_data", $wpsr_custom);
262
-
263
- ## Placement Defaults | Template 1
264
- $wpsr_template1['content'] = $wpsr_temp1_def;
265
- $wpsr_template1['inhome'] = 0;
266
- $wpsr_template1['insingle'] = 1;
267
- $wpsr_template1['inpage'] = 1;
268
- $wpsr_template1['incategory'] = 0;
269
- $wpsr_template1['intag'] = 0;
270
- $wpsr_template1['indate'] = 0;
271
- $wpsr_template1['inauthor'] = 0;
272
- $wpsr_template1['insearch'] = 0;
273
- $wpsr_template1['inexcerpt'] = 0;
274
- $wpsr_template1['infeed'] = 0;
275
- $wpsr_template1['abvcontent'] = 1;
276
- $wpsr_template1['blwcontent'] = 0;
277
-
278
- update_option("wpsr_template1_data", $wpsr_template1);
279
-
280
- ## Placement Defaults | Template 2
281
- $wpsr_template2['content'] = $wpsr_temp2_def;
282
- $wpsr_template2['inhome'] = 1;
283
- $wpsr_template2['insingle'] = 1;
284
- $wpsr_template2['inpage'] = 1;
285
- $wpsr_template2['incategory'] = 1;
286
- $wpsr_template2['intag'] = 1;
287
- $wpsr_template2['indate'] = 1;
288
- $wpsr_template2['inauthor'] = 1;
289
- $wpsr_template2['insearch'] = 1;
290
- $wpsr_template2['inexcerpt'] = 1;
291
- $wpsr_template2['infeed'] = 1;
292
- $wpsr_template2['abvcontent'] = 0;
293
- $wpsr_template2['blwcontent'] = 1;
294
- $wpsr_template2['addp'] = 0;
295
-
296
- update_option("wpsr_template2_data", $wpsr_template2);
297
-
298
- ## Settings Defaults
299
- $wpsr_settings['smartload'] = 'normal';
300
- $wpsr_settings['smartload_timeout'] = '1';
301
- $wpsr_settings['rssoutput'] = '';
302
- $wpsr_settings['bitlyusername'] = '';
303
- $wpsr_settings['bitlyapi'] = '';
304
- $wpsr_settings['disablewpsr'] = 0;
305
- $wpsr_settings['scriptsplace'] = 'header';
306
-
307
- update_option("wpsr_settings_data", $wpsr_settings);
308
- }
309
-
310
- ## Check what to show in the admin
311
- function wpsr_show_admin(){
312
- if(get_option('wpsr_version') == WPSR_VERSION){
313
- return 1;
314
- }else{
315
- return 0;
316
- }
317
- }
318
-
319
- ## Fix version 1.0 settings
320
- function wpsr_version1_fix(){
321
- $wpsr_socialbt['selected16px'] = 'facebook,twitter,delicious,digg,stumbleupon,addtofavorites,email,rss';
322
- $wpsr_socialbt['selected32px'] = 'facebook,twitter,delicious,digg,stumbleupon,addtofavorites,email,rss';
323
- $wpsr_socialbt['imgpath16px'] = WPSR_SOCIALBT_IMGPATH . '16/';
324
- $wpsr_socialbt['imgpath32px'] = WPSR_SOCIALBT_IMGPATH . '32/';
325
- update_option('wpsr_socialbt_data', $wpsr_socialbt);
326
- }
327
-
328
- ## Admin Menu
329
- function wpsr_admin_page(){
330
-
331
- $wpsr_updated = false;
332
-
333
- ## Get the global variables
334
- global $wpsr_socialsites_list, $wpsr_addthis_lang_array, $wpsr_button_code_list, $wpsr_donate_link;
335
-
336
- if (function_exists('current_user_can') && !current_user_can('manage_options'))
337
- die(__('Sorry you do not have enough previliges to access this page.'));
338
-
339
- ## Reset form on submit
340
- if (isset($_POST['wpsr_reset']) && check_admin_referer('wpsr_main_form')){
341
- wpsr_reset_values();
342
- $wpsr_reseted = true;
343
- }
344
-
345
- ## Version intro form on submit
346
- if (isset($_POST['wpsr_intro_submit']) && check_admin_referer('wpsr_intro_form')){
347
- update_option("wpsr_version", WPSR_VERSION);
348
- }
349
-
350
- ## Main form on submit
351
- if (isset($_POST["wpsr_submit"]) && check_admin_referer('wpsr_main_form')) {
352
- ## Addthis options
353
- $wpsr_addthis['username'] = $_POST['wpsr_addthis_username'];
354
- $wpsr_addthis['language'] = $_POST['wpsr_addthis_lang'];
355
- $wpsr_addthis['button'] = $_POST['wpsr_addthis_button'];
356
-
357
- $wpsr_addthis['tb_16pxservices'] = $_POST['wpsr_addthis_tb_16pxservices'];
358
- $wpsr_addthis['tb_32pxservices'] = $_POST['wpsr_addthis_tb_32pxservices'];
359
- $wpsr_addthis['sharecount'] = $_POST['wpsr_addthis_sharecount'];
360
-
361
- $wpsr_addthis['btbrand'] = $_POST['wpsr_addthis_btbrand'];
362
- $wpsr_addthis['clickback'] = $_POST['wpsr_addthis_clickback'];
363
-
364
- update_option("wpsr_addthis_data", $wpsr_addthis);
365
-
366
- ## Sharethis Options
367
- $wpsr_sharethis['vcount_order'] = $_POST['wpsr_sharethis_vcount_order'];
368
- $wpsr_sharethis['hcount_order'] = $_POST['wpsr_sharethis_hcount_order'];
369
- $wpsr_sharethis['buttons_order'] = $_POST['wpsr_sharethis_buttons_order'];
370
- $wpsr_sharethis['large_order'] = $_POST['wpsr_sharethis_large_order'];
371
- $wpsr_sharethis['regular_order'] = $_POST['wpsr_sharethis_regular_order'];
372
- $wpsr_sharethis['regular2_order'] = $_POST['wpsr_sharethis_regular2_order'];
373
- $wpsr_sharethis['pubkey'] = $_POST['wpsr_sharethis_pubkey'];
374
- $wpsr_sharethis['copynshare'] = $_POST['wpsr_sharethis_copynshare'];
375
- $wpsr_sharethis['addp'] = $_POST['wpsr_sharethis_addp'];
376
-
377
- update_option("wpsr_sharethis_data", $wpsr_sharethis);
378
-
379
- ## Retweet Options
380
- $wpsr_retweet['username'] = $_POST['wpsr_retweet_username'];
381
- $wpsr_retweet['type'] = $_POST['wpsr_retweet_type'];
382
- $wpsr_retweet['service'] = $_POST['wpsr_retweet_service'];
383
- $wpsr_retweet['topsytheme'] = $_POST['wpsr_retweet_topsytheme'];
384
- $wpsr_retweet['twitter_recacc'] = $_POST['wpsr_retweet_twitter_recacc'];
385
- $wpsr_retweet['twitter_lang'] = $_POST['wpsr_retweet_twitter_lang'];
386
-
387
- update_option("wpsr_retweet_data", $wpsr_retweet);
388
-
389
- ## Digg Options
390
- $wpsr_digg['type'] = $_POST['wpsr_digg_type'];
391
-
392
- update_option("wpsr_digg_data", $wpsr_digg);
393
-
394
- ## Facebook Options
395
- $wpsr_facebook['btstyle'] = $_POST['wpsr_facebook_btstyle'];
396
- $wpsr_facebook['showfaces'] = $_POST['wpsr_facebook_showfaces'];
397
- $wpsr_facebook['verb'] = $_POST['wpsr_facebook_verb'];
398
- $wpsr_facebook['color'] = $_POST['wpsr_facebook_color'];
399
- $wpsr_facebook['appid'] = $_POST['wpsr_facebook_appid'];
400
- $wpsr_facebook['locale'] = $_POST['wpsr_facebook_locale'];
401
-
402
- update_option("wpsr_facebook_data", $wpsr_facebook);
403
-
404
- ## Social Button Options
405
- $wpsr_socialbt['target'] = $_POST['wpsr_socialbt_target'];
406
- $wpsr_socialbt['nofollow'] = $_POST['wpsr_socialbt_nofollow'];
407
- $wpsr_socialbt['loadcss'] = $_POST['wpsr_socialbt_loadcss'];
408
- $wpsr_socialbt['effect'] = $_POST['wpsr_socialbt_effect'];
409
- $wpsr_socialbt['label'] = $_POST['wpsr_socialbt_label'];
410
- $wpsr_socialbt['columns'] = $_POST['wpsr_socialbt_columns'];
411
- $wpsr_socialbt['selected16px'] = $_POST['wpsr_socialbt_selected16px'];
412
- $wpsr_socialbt['selected32px'] = $_POST['wpsr_socialbt_selected32px'];
413
- $wpsr_socialbt['imgpath16px'] = $_POST['wpsr_socialbt_imgpath16px'];
414
- $wpsr_socialbt['imgpath32px'] = $_POST['wpsr_socialbt_imgpath32px'];
415
- $wpsr_socialbt['usesprites'] = $_POST['wpsr_socialbt_usesprites'];
416
-
417
- update_option('wpsr_socialbt_data', $wpsr_socialbt);
418
-
419
- ## Custom Options
420
- $wpsr_custom['custom1'] = stripslashes($_POST['wpsr_custom1']);
421
- $wpsr_custom['custom2'] = stripslashes($_POST['wpsr_custom2']);
422
-
423
- update_option("wpsr_custom_data", $wpsr_custom);
424
-
425
- ## Placement Options
426
- $wpsr_templates = $_POST['wpsr_template'];
427
- $templates = get_option('wpsr_templates'); // Get the list of templates defined
428
-
429
- foreach($templates as $k => $v){
430
- $wpsr_template_temp['content'] = stripslashes($wpsr_templates[$k]['content']);
431
- $wpsr_template_temp['inhome'] = $wpsr_templates[$k]['inhome'];
432
- $wpsr_template_temp['insingle'] = $wpsr_templates[$k]['insingle'];
433
- $wpsr_template_temp['inpage'] = $wpsr_templates[$k]['inpage'];
434
- $wpsr_template_temp['incategory'] = $wpsr_templates[$k]['incategory'];
435
- $wpsr_template_temp['intag'] = $wpsr_templates[$k]['intag'];
436
- $wpsr_template_temp['indate'] = $wpsr_templates[$k]['indate'];
437
- $wpsr_template_temp['inauthor'] = $wpsr_templates[$k]['inauthor'];
438
- $wpsr_template_temp['insearch'] = $wpsr_templates[$k]['insearch'];
439
- $wpsr_template_temp['inexcerpt'] = $wpsr_templates[$k]['inexcerpt'];
440
- $wpsr_template_temp['infeed'] = $wpsr_templates[$k]['infeed'];
441
- $wpsr_template_temp['abvcontent'] = $wpsr_templates[$k]['abvcontent'];
442
- $wpsr_template_temp['blwcontent'] = $wpsr_templates[$k]['blwcontent'];
443
- $wpsr_template_temp['addp'] = 0;
444
-
445
- update_option("wpsr_template" . $k . "_data", $wpsr_template_temp);
446
- }
447
-
448
- ## Settings options
449
- $wpsr_settings['smartload'] = $_POST['wpsr_settings_smartload'];
450
- $wpsr_settings['smartload_timeout'] = $_POST['wpsr_settings_smartload_timeout'];
451
- $wpsr_settings['rssurl'] = $_POST['wpsr_settings_rssurl'];
452
- $wpsr_settings['bitlyusername'] = $_POST['wpsr_settings_bitlyusername'];
453
- $wpsr_settings['bitlyapi'] = $_POST['wpsr_settings_bitlyapi'];
454
- $wpsr_settings['disablewpsr'] = $_POST['wpsr_settings_disablewpsr'];
455
- $wpsr_settings['disablecredits'] = $_POST['wpsr_settings_disablecredits'];
456
- $wpsr_settings['scriptsplace'] = $_POST['wpsr_settings_scriptsplace'];
457
-
458
- update_option("wpsr_settings_data", $wpsr_settings);
459
-
460
- $wpsr_updated = true;
461
- }
462
-
463
- if(isset($wpsr_updated) && $wpsr_updated == true){
464
- echo "<div class='message updated autoHide'><p>" . __('Updated successfully', 'wpsr') . "</p></div>";
465
- }
466
-
467
- if(isset($wpsr_reseted) && $wpsr_reseted == true){
468
- echo "<div class='message updated autoHide'><p>" . __('Values are set to defaults successfully', 'wpsr') . "</p></div>";
469
- }
470
-
471
- if(isset($wpsr_v1fix) && $wpsr_v1fix == true){
472
- 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>";
473
- }
474
-
475
- ## Assign the defaults to temp variables
476
- $wpsr_addthis = get_option('wpsr_addthis_data');
477
- $wpsr_sharethis = get_option('wpsr_sharethis_data');
478
- $wpsr_retweet = get_option('wpsr_retweet_data');
479
- $wpsr_digg = get_option('wpsr_digg_data');
480
- $wpsr_facebook = get_option('wpsr_facebook_data');
481
- $wpsr_socialbt = get_option('wpsr_socialbt_data');
482
- $wpsr_custom = get_option('wpsr_custom_data');
483
- $wpsr_settings = get_option('wpsr_settings_data');
484
-
485
- ## Assign the values of the template temporary
486
- $templates = get_option('wpsr_templates');
487
- foreach($templates as $k => $v){
488
- $wpsr_template[$k] = get_option('wpsr_template' . $k . '_data');
489
- }
490
-
491
- if($wpsr_socialbt['imgpath16px'] == WPSR_URL . 'social-icons/16/'){
492
- wpsr_version1_fix();
493
- $wpsr_v1fix = true;
494
- }
495
-
496
- if($wpsr_settings['disablewpsr']){
497
- $wpsr_is_disabled = ' | <span class="redText">' . __('Disabled', 'wpsr') . '</span>';
498
- }else{
499
- $wpsr_is_disabled = '';
500
- }
501
-
502
- ?>
503
-
504
- <!-- Hidden fields -->
505
- <div style="display:none">
506
- <span class="wpsrAdminUrl"><?php echo WPSR_ADMIN_URL; ?></span>
507
- <span class="tmplUrl"><?php echo WPSR_ADMIN_URL . 'templates/templates.xml'; ?></span>
508
- <span class="tmplImg"><?php echo WPSR_ADMIN_URL . 'templates/'; ?></span>
509
- <span class="wpsrVer" style="display:none"><?php echo WPSR_VERSION; ?></span>
510
- </div>
511
-
512
- <?php if(wpsr_show_admin() == 1): ?>
513
- <!-- Main ADMIN page -->
514
- <div class="wrap">
515
- <div class="header">
516
-
517
- <iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Ffacebook.com%2Faakashweb&amp;send=false&amp;layout=button_count&amp;width=450&amp;show_faces=true&amp;action=recommend&amp;colorscheme=light&amp;font=arial&amp;height=21&amp;appId=106994469342299" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width: 126px; height:21px;float: right;margin-top: 15px;" allowtransparency="true"></iframe>
518
-
519
- <h2><img width="32" height="32" src="<?php echo WPSR_ADMIN_URL; ?>images/wp-socializer.png" align="absmiddle"/>&nbsp;WP Socializer<span class="smallText"> v<?php echo WPSR_VERSION; ?><?php echo $wpsr_is_disabled; ?></span></h2>
520
- </div><!-- Header -->
521
-
522
- <ul class="wpsr_share_wrap">
523
- <li class="wpsr_donate" data-width="300" data-height="220" data-url="<?php echo WPSR_ADMIN_URL . 'js/share.php?i=1'; ?>"><a href="#"></a></li>
524
- <li class="wpsr_share" data-width="350" data-height="85" data-url="<?php echo WPSR_ADMIN_URL . 'js/share.php?i=2'; ?>"><a href="#"></a></li>
525
- <li class="wpsr_pressthis" title="Share a small post about this plugin in your blog !"><a href="press-this.php" target="_blank"></a></li>
526
- </ul>
527
-
528
- <div class="plugin_promo">
529
- <img src="<?php echo WPSR_ADMIN_URL; ?>images/anpn-thumb.png" width="60" height="60" />
530
- <div class="promo_show">
531
- <h3>Advanced Post Navigator - WordPress plugin</h3>
532
- <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>
533
- <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>
534
- <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>
535
- <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>
536
- <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>
537
- </div>
538
- </div>
539
-
540
- <form id="content" method="post">
541
- <ul id="tabs" class="clearfix">
542
- <li><a href="#tab-1">Start</a></li>
543
- <li><a href="#tab-2">Button Settings</a></li>
544
- <li><a href="#tab-3" title="Placement">Edit templates</a></li>
545
-
546
- <li style="float:right"><a href="#tab-5" class="helpTab">Help</a></li>
547
- <li style="float:right"><a href="#tab-4">Global Settings</a></li>
548
- </ul>
549
-
550
- <div id="tab-1" class="clearfix">
551
- <br/>
552
- <h4>Next version of WP Socializer</h4>
553
- <p>After nearly 2 years of design and development the next version of WP Socializer 3.x is about get released in a couple of months. It is rewritten from scratch and has a brand new UI, cool new features. WP Socializer is in active development only. Please follow my <a href="https://twitter.com/vaakash" target="_blank">twitter account</a> or <a href="http://www.aakashweb.com/" target"_blank">subscribe here</a> if you want to get latst updates on the next brand new version.</p>
554
-
555
- <div class="clearfix">
556
-
557
- <div class="startBox auto">
558
- <h2>Automatic setup</h2>
559
- <p>Start using WP Socializer by selecting pre-made set of button templates for your site.</p>
560
- <p>Just select the template style you like to use and "Save the settings".</p>
561
- <div class="startBt"><span data-win="winTemplates" data-title="Select a template">Select an Inbuilt template</span></div>
562
- </div>
563
-
564
- <div class="startBox manual">
565
- <h2>Manual setup</h2>
566
- <p>If you want to create your own button arrangement, then edit the individual button settings if needed.</p>
567
- <p>Then use the <b>Edit templates</b> section to place the buttons in the template</p>
568
- <div class="startBt" data-tab="2"><span>Manual customization</span></div>
569
- </div>
570
-
571
- </div>
572
-
573
- <h5>Give 5 star rating</h5>
574
- <p class="note">If you like this plugin then please give <a href="http://wordpress.org/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>
575
-
576
- <h5>Report bugs</h5>
577
- <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>
578
-
579
- </div>
580
-
581
- <div id="tab-2" class="clearfix">
582
- <div class="leftCnt">
583
- <h3 class="noToggle">Edit button properties: </h3>
584
- <p>Click to edit the button properties.</p>
585
- <ul class="buttonsList clearfix">
586
- <li data-win="winSocialBts" data-width="85%" data-title="Social Buttons"><span class="admSprites socialButtons"></span> Social button settings</li>
587
- <li data-win="winAddthis" data-title="Addthis"><span class="admSprites addthisIcon"></span> Addthis</li>
588
- <li data-win="winSharethis" data-title="Sharethis"><span class="admSprites sharethisIcon"></span> Sharethis settings</li>
589
- <li data-win="winTwitter" data-title="Twitter settings"><img src="https://twitter.com/favicon.ico" /> Twitter settings</li>
590
- <li data-win="winFacebook" data-title="Facebook"><span class="admSprites facebookIcon"></span> Facebook settings <small class="redText">New</small></li>
591
- <li data-win="winCustom" data-title="Custom buttons"><span class="admSprites customIcon"></span> Add a custom button <small class="redText">Note</small></li>
592
- </ul>
593
-
594
- <p class="nextStep" data-tab="3">Next step: Insert these customized buttons in the template</p>
595
-
596
- </div><!-- Left content -->
597
-
598
- <div class="rightCnt">
599
- <h5>Note</h5>
600
- <p class="note">Other buttons like Google +1, StumbleUpon, Reddit, Pinterest do not have settings to be customized. <br/> <br/> Just use them directly in the template.</p>
601
- </div>
602
-
603
- </div><!-- Tab - 2-->
604
-
605
- <div id="tab-3">
606
- <ul id="subTabs" class="clearfix">
607
- <?php
608
- $templates = get_option('wpsr_templates');
609
- foreach($templates as $k => $v){
610
- echo '<li data-editor="wpsr_template[' . $k . '][content]">
611
- <a href="#sub-tab-' . $k . '">' . $v['name'] . '</a>
612
- </li>';
613
- }
614
- ?>
615
- </ul>
616
-
617
- <div class="toolbar clearfix">
618
- <?php wpsr_addtoolbar(); ?>
619
- </div>
620
-
621
- <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>
622
-
623
- <?php foreach($templates as $k => $v): ?>
624
-
625
- <div id="sub-tab-<?php echo $k; ?>">
626
- <div class="section">
627
- <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>
628
- </div>
629
-
630
- <h3>Where to show this template ?</h3>
631
- <div class="section">
632
- <table width="100%" border="0">
633
- <tr>
634
- <td><label><input name="wpsr_template[<?php echo $k; ?>][inhome]" id="wpsr_template[<?php echo $k; ?>][inhome]" type="checkbox" value="1" <?php echo $wpsr_template[$k]['inhome'] == "1" ? 'checked="checked"' : ""; ?> /> <?php _e('Show in front page', 'wpsr'); ?></label> <br />
635
-
636
- <label><input name="wpsr_template[<?php echo $k; ?>][insingle]" id="wpsr_template[<?php echo $k; ?>][insingle]" type="checkbox" value="1" <?php echo $wpsr_template[$k]['insingle'] == "1" ? 'checked="checked"' : ""; ?> /> <?php _e('Show in individual posts', 'wpsr'); ?></label> <br />
637
-
638
- <label><input name="wpsr_template[<?php echo $k; ?>][inpage]" id="wpsr_template[<?php echo $k; ?>][inpage]" type="checkbox" value="1" <?php echo $wpsr_template[$k]['inpage'] == "1" ? 'checked="checked"' : ""; ?> /> <?php _e('Show in pages', 'wpsr'); ?></label> <br />
639
-
640
- <label><input name="wpsr_template[<?php echo $k; ?>][incategory]" id="wpsr_template[<?php echo $k; ?>][incategory]" type="checkbox" value="1" <?php echo $wpsr_template[$k]['incategory'] == "1" ? 'checked="checked"' : ""; ?> /> <?php _e('Show in Category pages', 'wpsr'); ?></label> <br />
641
-
642
- <label><input name="wpsr_template[<?php echo $k; ?>][intag]" id="wpsr_template[<?php echo $k; ?>][intag]" type="checkbox" value="1" <?php echo $wpsr_template[$k]['intag'] == "1" ? 'checked="checked"' : ""; ?> /> <?php _e('Show in Tag pages', 'wpsr'); ?></label></td>
643
- <td><label><input name="wpsr_template[<?php echo $k; ?>][indate]" id="wpsr_template[<?php echo $k; ?>][indate]" type="checkbox" value="1" <?php echo $wpsr_template[$k]['indate'] == "1" ? 'checked="checked"' : ""; ?> /> <?php _e('Show in date archives', 'wpsr'); ?></label> <br />
644
-
645
- <label><input name="wpsr_template[<?php echo $k; ?>][inauthor]" id="wpsr_template[<?php echo $k; ?>][inauthor]" type="checkbox" value="1" <?php echo $wpsr_template[$k]['inauthor'] == "1" ? 'checked="checked"' : ""; ?> /> <?php _e('Show in author pages', 'wpsr'); ?></label> <br />
646
-
647
- <label><input name="wpsr_template[<?php echo $k; ?>][insearch]" id="wpsr_template[<?php echo $k; ?>][insearch]" type="checkbox" value="1" <?php echo $wpsr_template[$k]['insearch'] == "1" ? 'checked="checked"' : ""; ?> /> <?php _e('Show in search pages', 'wpsr'); ?></label> <br />
648
-
649
- <label><input name="wpsr_template[<?php echo $k; ?>][inexcerpt]" id="wpsr_template[<?php echo $k; ?>][inexcerpt]" type="checkbox" value="1" <?php echo $wpsr_template[$k]['inexcerpt'] == "1" ? 'checked="checked"' : ""; ?> /> <?php _e('Show in Excerpt', 'wpsr'); ?></label> <br />
650
-
651
- <label><input name="wpsr_template[<?php echo $k; ?>][infeed]" id="wpsr_template[<?php echo $k; ?>][infeed]" type="checkbox" value="1" <?php echo $wpsr_template[$k]['infeed'] == "1" ? 'checked="checked"' : ""; ?> /> <?php _e('Show in RSS feeds', 'wpsr'); ?></label></td>
652
- </tr>
653
- </table>
654
- </div>
655
-
656
- <h3>Where to position this template ?</h3>
657
- <div class="section">
658
- <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"' : ""; ?> />
659
- <?php _e('Above content', 'wpsr'); ?></label>
660
-
661
- <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"' : ""; ?> />
662
- <?php _e('Below content', 'wpsr'); ?></label>
663
- </div>
664
-
665
- </div>
666
- <?php endforeach; ?>
667
-
668
- </div><!-- Tab - 3-->
669
-
670
- <div id="tab-4">
671
- <h3>Smart load <small class="redText">New !</small></h3>
672
- <div class="section">
673
- <table width="100%" height="39" border="0">
674
- <tr>
675
- <td width="49%" height="35">Load the button scripts</td>
676
- <td width="51%"><select id="wpsr_settings_smartload" name="wpsr_settings_smartload">
677
- <option <?php echo $wpsr_settings['smartload'] == 'normal' ? ' selected="selected"' : ''; ?> value="normal">Normally (Async)</option>
678
- <!--<option <?php echo $wpsr_settings['smartload'] == 'window' ? ' selected="selected"' : ''; ?> value="window">After window load</option>-->
679
- <option <?php echo $wpsr_settings['smartload'] == 'timeout' ? ' selected="selected"' : ''; ?> value="timeout">After specific time</option>
680
- </select>
681
- <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>
682
- </td>
683
- </tr>
684
- </table>
685
- <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>
686
- </div>
687
-
688
- <h3>RSS <?php _e('Settings', 'wpsr'); ?></h3>
689
- <div class="section">
690
- <table width="100%" height="39" border="0">
691
- <tr>
692
- <td width="49%" height="35">RSS <?php _e('URL', 'wpsr'); ?><br />
693
- <span class="smallText"><?php _e('Leave blank to use default Wordpress RSS feed.', 'wpsr'); ?> <br/><?php _e('You can use Feedburner feed URL also', 'wpsr'); ?></span></td>
694
- <td width="51%"><input name="wpsr_settings_rssurl" type="text" id="wpsr_settings_rssurl" value="<?php echo $wpsr_settings['rssurl']; ?>" size="60"/>
695
- </td>
696
- </tr>
697
- </table>
698
- </div>
699
-
700
- <h3><s>Bit.ly <?php _e('Integration', 'wpsr'); ?></s></h3>
701
- <div class="section">
702
- <p>Bitly URL shortening feature is disabled in this version</p>
703
- </div>
704
-
705
- <h3><?php _e('WP Socializer Settings', 'wpsr'); ?></h3>
706
- <div class="section">
707
- <table width="100%" height="84" border="0">
708
- <tr>
709
- <td width="49%" height="40"><label for="wpsr_settings_scriptsplace"><?php _e('Load button scripts in ', 'wpsr'); ?></label></td>
710
- <td width="51%"><select id="wpsr_settings_scriptsplace" name="wpsr_settings_scriptsplace">
711
- <option <?php echo $wpsr_settings['scriptsplace'] == 'header' ? ' selected="selected"' : ''; ?> value="header"><?php _e('Header (recommended)', 'wpsr'); ?></option>
712
- <option <?php echo $wpsr_settings['scriptsplace'] == 'footer' ? ' selected="selected"' : ''; ?> value="footer"><?php _e('Footer', 'wpsr'); ?></option>
713
- </select></td>
714
- </tr>
715
- <tr>
716
- <td height="34"><?php _e('Load WP Socializer CSS', 'wpsr'); ?>
717
- <br /><span class="smallText"><?php _e('Note: templates, hover effects &amp; column will not work', 'wpsr'); ?></span></td>
718
- <td><select id="wpsr_socialbt_loadcss" name="wpsr_socialbt_loadcss">
719
- <option <?php echo $wpsr_socialbt['loadcss'] == '1' ? ' selected="selected"' : ''; ?> value="1">
720
- <?php _e('Yes', 'wpsr'); ?>
721
- </option>
722
- <option <?php echo $wpsr_socialbt['loadcss'] == '0' ? ' selected="selected"' : ''; ?> value="0">
723
- <?php _e('No', 'wpsr'); ?>
724
- </option>
725
- </select></td>
726
- </tr>
727
- </table>
728
- </div>
729
-
730
- <div style="display: none">
731
- <h3><?php _e('Hide credit links', 'wpsr'); ?></h3>
732
- <div class="section">
733
- <table width="100%" height="39" border="0">
734
- <tr>
735
- <td width="49%" height="35"><?php _e('Hide the credit links which appear below the floating share bar', 'wpsr'); ?><br />
736
- <span class="smallText"><?php _e('Credit links are added below the floating sharebar to show the support and increase the knowledge of the plugin to other WordPress users.', 'wpsr'); ?></span></td>
737
- <td width="51%"><select id="wpsr_settings_disablecredits" name="wpsr_settings_disablecredits">
738
- <option <?php echo $wpsr_settings['disablecredits'] == '0' ? ' selected="selected"' : ''; ?> value="0"><?php _e('No', 'wpsr'); ?></option>
739
- <option <?php echo $wpsr_settings['disablecredits'] == '1' ? ' selected="selected"' : ''; ?> value="1"><?php _e('Yes', 'wpsr'); ?></option>
740
- </select>
741
- </td>
742
- </tr>
743
- </table>
744
- </div>
745
- </div>
746
-
747
- <h3><?php _e('Disable WP Socializer', 'wpsr'); ?></h3>
748
- <div class="section">
749
- <table width="100%" height="39" border="0">
750
- <tr>
751
- <td width="49%" height="35"><?php _e('Temporarily disable all WP-Socializer buttons ', 'wpsr'); ?><br />
752
- <span class="smallText"><?php _e('Disabling will stop displaying all buttons, templates', 'wpsr'); ?></span></td>
753
- <td width="51%"><select id="wpsr_settings_disablewpsr" name="wpsr_settings_disablewpsr">
754
- <option <?php echo $wpsr_settings['disablewpsr'] == '0' ? ' selected="selected"' : ''; ?> value="0"><?php _e('No', 'wpsr'); ?></option>
755
- <option <?php echo $wpsr_settings['disablewpsr'] == '1' ? ' selected="selected"' : ''; ?> value="1"><?php _e('Yes', 'wpsr'); ?></option>
756
- </select>
757
- </td>
758
- </tr>
759
- </table>
760
- </div>
761
-
762
- </div><!-- Tab - 4 -->
763
-
764
- <div id="tab-5">
765
- <h3>Help</h3>
766
- <div class="section helpBox">
767
- <p>Click the "Help" tab to load the help file.</p>
768
- </div>
769
- </div>
770
-
771
- <div class="footer">
772
- <?php wp_nonce_field('wpsr_main_form'); ?>
773
- <input class="button-primary" type="submit" name="wpsr_submit" id="wpsr_submit" value="<?php _e('Update', 'wpsr'); ?>" />
774
- <input class="button alignright" type="submit" name="wpsr_reset" id="wpsr_reset" value=" <?php _e('Reset', 'wpsr'); ?> " />
775
- </div>
776
-
777
-
778
-
779
- <!-- Button settings -->
780
- <div class="window">
781
-
782
- <!-- SOCIAL BTS -->
783
- <div class="inWindow winSocialBts">
784
- <input type="hidden" id="wpsr_socialbt_selected16px" name="wpsr_socialbt_selected16px" value="<?php echo $wpsr_socialbt['selected16px']; ?>" />
785
- <input type="hidden" id="wpsr_socialbt_selected32px" name="wpsr_socialbt_selected32px" value="<?php echo $wpsr_socialbt['selected32px']; ?>" />
786
- <a href="#settings" class="sbSettingsBt">Settings</a>
787
-
788
- <h3>Select the required social bookmarking buttons</h3>
789
-
790
- <div class="section clearfix">
791
-
792
- <span class="smallText"><?php _e('Click the icon size to select and "x" button to remove selected. Click and drag to reorder selected sites', 'wpsr'); ?></span>
793
-
794
- <div class="sbLeftCnt">
795
- <h5><?php _e('Available buttons', 'wpsr'); ?> <input type="text" placeholder="Filter..." id="sbFilter" title="<?php _e('Filter buttons', 'wpsr'); ?>"/></h5>
796
-
797
- <?php
798
- $spriteImage16px = WPSR_SOCIALBT_IMGPATH . 'wp-socializer-sprite-16px.png';
799
- $spriteMaskImage16px = WPSR_SOCIALBT_IMGPATH . 'wp-socializer-sprite-mask-16px.gif';
800
-
801
- echo '<ul id="sbList">';
802
- foreach ($wpsr_socialsites_list as $sitename => $property) {
803
-
804
- $spritesYCoord = get_sprite_coord($sitename, $wpsr_socialsites_list, '16px');
805
- $finalSprites = '0px -' . $spritesYCoord . 'px'; 'wp-socializer-sprite-mask-16px.gif';
806
-
807
- echo
808
- "\n<li>" .
809
- '<img src="' . $spriteMaskImage16px . '" alt="' . $sitename . '" style="background-position:' . $finalSprites . '" />' .
810
- '<span class="sbName">' . $sitename . '</span>' .
811
- '<span class="sbAdd sbAdd_16px" data-pixel="16">16</span>';
812
-
813
- if(isset($property['support32px']) && $property['support32px'] == 1){
814
- echo '<span class="sbAdd sbAdd_32px" data-pixel="32">32</span>';
815
- }
816
- echo "</li>\n";
817
- }
818
- echo '</ul>';
819
- ?>
820
- </div>
821
-
822
- <div class="sbRightCnt">
823
- <h4><?php _e('Selected buttons', 'wpsr'); ?> | 16px </h4>
824
- <ul class="sbSelList" id="sbSelList_16px">
825
- <?php
826
- $wpsr_socialbt_splited16px = explode(',', $wpsr_socialbt['selected16px']);
827
- for($i=0; $i < count($wpsr_socialbt_splited16px); $i++){
828
- echo '<li><span class="sbName">' . $wpsr_socialbt_splited16px[$i] . '</span><span class="sbDelete">x</span></li>' . "\n";
829
- }
830
- ?>
831
- </ul>
832
-
833
- <h4><?php _e('Selected buttons', 'wpsr'); ?> | 32px</h4>
834
- <ul class="sbSelList" id="sbSelList_32px">
835
- <?php
836
- $wpsr_socialbt_splited32px = explode(',', $wpsr_socialbt['selected32px']);
837
- for($i=0; $i < count($wpsr_socialbt_splited32px); $i++){
838
- echo '<li><span class="sbName">' . $wpsr_socialbt_splited32px[$i] . '</span><span class="sbDelete">x</span></li>';
839
- }
840
- ?>
841
- </ul>
842
- </div>
843
-
844
- </div>
845
- <a id="settings"></a>
846
- <h3><?php _e('Settings', 'wpsr'); ?></h3>
847
- <div class="section">
848
- <table width="100%" border="0">
849
- <tr>
850
- <td height="35"><?php _e('Open links in new tab/window', 'wpsr'); ?></td>
851
- <td><select id="wpsr_socialbt_target" name="wpsr_socialbt_target">
852
- <option <?php echo $wpsr_socialbt['target'] == '1' ? ' selected="selected"' : ''; ?> value="1"><?php _e('Yes', 'wpsr'); ?></option>
853
- <option <?php echo $wpsr_socialbt['target'] == '0' ? ' selected="selected"' : ''; ?> value="0"><?php _e('No', 'wpsr'); ?></option>
854
- </select></td>
855
- </tr>
856
-
857
- <tr>
858
- <td height="35"><?php _e('Add <code>rel="nofollow"</code> attribute to links', 'wpsr'); ?></td>
859
- <td><select id="wpsr_socialbt_nofollow" name="wpsr_socialbt_nofollow">
860
- <option <?php echo $wpsr_socialbt['nofollow'] == '1' ? ' selected="selected"' : ''; ?> value="1"><?php _e('Yes', 'wpsr'); ?></option>
861
- <option <?php echo $wpsr_socialbt['nofollow'] == '0' ? ' selected="selected"' : ''; ?> value="0"><?php _e('No', 'wpsr'); ?></option>
862
- </select></td>
863
- </tr>
864
-
865
- <tr>
866
- <td height="35"><?php _e('Image on Hover effect', 'wpsr'); ?> <small class="redText">New effects</small></td>
867
- <td><select id="wpsr_socialbt_effect" name="wpsr_socialbt_effect">
868
- <option <?php echo $wpsr_socialbt['effect'] == 'magnify' ? ' selected="selected"' : ''; ?> value="magnify">Magnify Effect (New)</option>
869
- <option <?php echo $wpsr_socialbt['effect'] == 'jump' ? ' selected="selected"' : ''; ?> value="jump">Jump Effect (Updated)</option>
870
- <option <?php echo $wpsr_socialbt['effect'] == 'opacity' ? ' selected="selected"' : ''; ?> value="opacity">Transparency Effect</option>
871
- <option <?php echo $wpsr_socialbt['effect'] == 'none' ? ' selected="selected"' : ''; ?> value="none"><?php _e('No Effect', 'wpsr'); ?></option>
872
- </select></td>
873
- </tr>
874
- <tr>
875
- <td height="40"><?php _e('Show Label for buttons', 'wpsr'); ?> </td>
876
- <td><select id="wpsr_socialbt_label" name="wpsr_socialbt_label">
877
- <option <?php echo $wpsr_socialbt['label'] == '1' ? ' selected="selected"' : ''; ?> value="1"><?php _e('Yes', 'wpsr'); ?></option>
878
- <option <?php echo $wpsr_socialbt['label'] == '0' ? ' selected="selected"' : ''; ?> value="0"><?php _e('No', 'wpsr'); ?></option>
879
- </select></td>
880
- </tr>
881
- <tr>
882
- <td height="53"><?php _e('Show Icons in', 'wpsr'); ?> <br />
883
- <span class="smallText"><?php _e('Very very effective when labels are enabled (try it)', 'wpsr'); ?></span> </td>
884
- <td><select id="wpsr_socialbt_columns" name="wpsr_socialbt_columns">
885
- <option <?php echo $wpsr_socialbt['columns'] == 'no' ? ' selected="selected"' : ''; ?> value="no">No Column</option>
886
- <option <?php echo $wpsr_socialbt['columns'] == '5' ? ' selected="selected"' : ''; ?> value="5">5 Columns</option>
887
- <option <?php echo $wpsr_socialbt['columns'] == '4' ? ' selected="selected"' : ''; ?> value="4">4 Columns</option>
888
- <option <?php echo $wpsr_socialbt['columns'] == '3' ? ' selected="selected"' : ''; ?> value="3">3 Columns</option>
889
- <option <?php echo $wpsr_socialbt['columns'] == '2' ? ' selected="selected"' : ''; ?> value="2">2 Columns</option>
890
- </select></td>
891
- </tr>
892
- <tr>
893
- <td height="53"><?php _e('Image folder', 'wpsr'); ?><br />
894
- <span class="smallText"><?php _e('Leave blank to use default', 'wpsr'); ?></span> </td>
895
- <td>
896
- <input name="wpsr_socialbt_imgpath16px" type="text" id="wpsr_socialbt_imgpath16px" value="<?php echo (empty($wpsr_socialbt['imgpath16px'])) ? WPSR_SOCIALBT_IMGPATH . '16/' : $wpsr_socialbt['imgpath16px']; ?>" size="40" />
897
- (16px)<br />
898
-
899
- <input name="wpsr_socialbt_imgpath32px" type="text" id="wpsr_socialbt_imgpath32px" value="<?php echo (empty($wpsr_socialbt['imgpath32px'])) ? WPSR_SOCIALBT_IMGPATH . '32/' : $wpsr_socialbt['imgpath32px']; ?>" size="40" />
900
- (32px)</td>
901
- </tr>
902
- <tr>
903
- <td height="35"><?php _e('Use Sprites', 'wpsr'); ?></td>
904
- <td><select id="wpsr_socialbt_usesprites" name="wpsr_socialbt_usesprites">
905
- <option <?php echo $wpsr_socialbt['usesprites'] == '1' ? ' selected="selected"' : ''; ?> value="1"><?php _e('Yes', 'wpsr'); ?></option>
906
- <option <?php echo $wpsr_socialbt['usesprites'] == '0' ? ' selected="selected"' : ''; ?> value="0"><?php _e('No', 'wpsr'); ?></option>
907
- </select></td>
908
- </tr>
909
- </table>
910
- </div>
911
- </div><!-- Social bts -->
912
-
913
-
914
- <div class="inWindow winAddthis">
915
- <h3>Toolbox</h3>
916
- <div class="section">
917
- <table width="100%" height="139" border="0" class="tableClr">
918
- <tr>
919
- <th height="30">Toolbox type </th>
920
- <th><?php _e('Services', 'wpsr'); ?></th>
921
- </tr>
922
- <tr>
923
- <td width="35%" height="53"><label for="wpsr_addthis_tb_16pxservices"><img src="<?php echo WPSR_ADMIN_URL; ?>images/buttons/addthis-tb-16px.png" title="16px Icons"/></label></td>
924
- <td width="65%"><input name="wpsr_addthis_tb_16pxservices" type="text" id="wpsr_addthis_tb_16pxservices" value="<?php echo $wpsr_addthis['tb_16pxservices']; ?>" size="35" /> <input class="submit button" type="button" value="Select services" onclick="openServiceSelctor('<?php echo WPSR_ADMIN_URL; ?>wpsr-services-selector.php?id=wpsr_addthis_tb_16pxservices&bt=addthis&val=', 'wpsr_addthis_tb_16pxservices');" />
925
- <br /><span class="smallText"><?php _e('Leave blank to use default', 'wpsr'); ?></span>
926
- </td>
927
- </tr>
928
- <tr>
929
- <td height="48"><label for="wpsr_addthis_tb_32pxservices"><img src="<?php echo WPSR_ADMIN_URL; ?>images/buttons/addthis-tb-32px.png" title="32px Icons"/></label></td>
930
- <td><input name="wpsr_addthis_tb_32pxservices" type="text" id="wpsr_addthis_tb_32pxservices" value="<?php echo $wpsr_addthis['tb_32pxservices']; ?>" size="35" /> <input class="button" type="button" value="Select services" onclick="openServiceSelctor('<?php echo WPSR_ADMIN_URL; ?>wpsr-services-selector.php?id=wpsr_addthis_tb_32pxservices&bt=addthis&val=', 'wpsr_addthis_tb_32pxservices');"/>
931
- <br /><span class="smallText"><?php _e('Leave blank to use default', 'wpsr'); ?></span>
932
- </td>
933
- </tr>
934
- </table>
935
- </div>
936
-
937
- <h3>Sharecount</h3>
938
- <div class="section">
939
- <table width="100%">
940
- <tr>
941
- <td><label><input name="wpsr_addthis_sharecount" id="wpsr_addthis_sharecount" type="radio" value="normal" <?php echo $wpsr_addthis['sharecount'] == 'normal' ? ' checked="checked"' : ''; ?> /> <img src="http://cache.addthiscdn.com/www/q0197/images/sharecount-vertical.png" title="Sharecount - Large"/></label></td>
942
- <td><label><input name="wpsr_addthis_sharecount" id="wpsr_addthis_sharecount" type="radio" value="pill" <?php echo $wpsr_addthis['sharecount'] == 'pill' ? ' checked="checked"' : ''; ?> /> <img src="http://cache.addthiscdn.com/www/q0197/images/sharecount-horizontal.png" title="Sharecount - Pill style"/></label></td>
943
- <td> <label><input name="wpsr_addthis_sharecount" id="wpsr_addthis_sharecount" type="radio" value="grouped" <?php echo $wpsr_addthis['sharecount'] == 'grouped' ? ' checked="checked"' : ''; ?> /> <img src="http://cache.addthiscdn.com/www/q0197/images/gtc-like-tweet-share.png" title="Sharecount - grouped"/></label></td>
944
- </tr>
945
- </table>
946
- </div>
947
-
948
- <h3><?php _e('Buttons', 'wpsr'); ?></h3>
949
- <div class="section">
950
- <table width="100%">
951
- <tr>
952
- <td><label><input name="wpsr_addthis_button" id="wpsr_addthis_button" type="radio" value="lg-share-" <?php echo $wpsr_addthis['button'] == 'lg-share-' ? ' checked="checked"' : ''; ?> /> <img src="http://s7.addthis.com/static/btn/v2/lg-share-<?php echo $wpsr_addthis['language']; ?>.gif" alt="Share button - Large"/></label></td>
953
- <td><label><input name="wpsr_addthis_button" id="wpsr_addthis_button" type="radio" value="sm-share-" <?php echo $wpsr_addthis['button'] == 'sm-share-' ? ' checked="checked"' : ''; ?> /> <img src="http://s7.addthis.com/static/btn/v2/sm-share-en.gif" alt="Share button - Small"/></label></td>
954
- </tr>
955
- </table>
956
- </div>
957
-
958
- <h3><?php _e('Optional button Settings', 'wpsr'); ?></h3>
959
- <div class="section">
960
- <table width="100%" border="0">
961
- <tr>
962
- <td height="52"><label for="wpsr_addthis_username"><?php _e('AddThis PubID', 'wpsr'); ?></label></td>
963
- <td><input type="text" id="wpsr_addthis_username" name="wpsr_addthis_username" value="<?php echo $wpsr_addthis['username']; ?>" /><br /><span class="smallText"> <?php _e('If available', 'wpsr'); ?></span></td>
964
- <td><label for="wpsr_addthis_lang"><?php _e('Language', 'wpsr'); ?></label></td>
965
- <td><select name="wpsr_addthis_lang" id="wpsr_addthis_lang">
966
- <?php foreach ($wpsr_addthis_lang_array as $lang=>$name){echo "<option value=\"$lang\"". ($lang == $wpsr_addthis['language'] ? " selected":"") . ">$name</option>";}?>
967
- </select></td>
968
- </tr>
969
- <tr>
970
- <td width="13%" height="52"><label for="wpsr_addthis_btbrand"><?php _e('Brand Name', 'wpsr'); ?></label></td>
971
- <td width="30%"><input name="wpsr_addthis_btbrand" id="wpsr_addthis_btbrand" type="text" value="<?php echo $wpsr_addthis['btbrand']; ?>"/><br /><span class="smallText"><?php _e('Leave blank to use default', 'wpsr'); ?></span></td>
972
-
973
- <td width="14%"><label for="wpsr_addthis_clickback"><?php _e('Track Clickback', 'wpsr'); ?></label></td>
974
- <td width="43%"><select id="wpsr_addthis_clickback" name="wpsr_addthis_clickback">
975
- <option <?php echo $wpsr_addthis['clickback'] == '1' ? ' selected="selected"' : ''; ?> value="1"><?php _e('Yes', 'wpsr'); ?></option>
976
- <option <?php echo $wpsr_addthis['clickback'] == '0' ? ' selected="selected"' : ''; ?> value="0"><?php _e('No', 'wpsr'); ?></option>
977
- </select></td>
978
- </tr>
979
- </table>
980
- </div>
981
- </div><!-- Addthis -->
982
-
983
-
984
- <div class="inWindow winSharethis">
985
- <h3>Customize the buttons</h3>
986
- <div class="section">
987
- <table width="100%" height="517" border="0" class="tableClr shareThisTbl">
988
- <tr>
989
- <th width="50%" height="21"><?php _e('Buttons', 'wpsr'); ?><br />
990
- <span class="smallText"><?php _e('Button type', 'wpsr'); ?></span></th>
991
- <th width="50%"><?php _e('Button Order', 'wpsr'); ?><br />
992
- <span class="smallText"><?php _e('Reorder, remove or add social buttons', 'wpsr'); ?></span></th>
993
- </tr>
994
- <tr>
995
- <td width="50%" height="69"><img src="<?php echo WPSR_ADMIN_URL; ?>images/buttons/sharethis-vcount.png" /></td>
996
- <td width="50%"><input name="wpsr_sharethis_vcount_order" id="wpsr_sharethis_vcount_order" type="text" value="<?php echo $wpsr_sharethis['vcount_order']; ?>"/>
997
- <input class="submit button" type="button" value="Select services" onclick="openServiceSelctor('<?php echo WPSR_ADMIN_URL; ?>wpsr-services-selector.php?id=wpsr_sharethis_vcount_order&bt=sharethis&val=', 'wpsr_sharethis_vcount_order');" /></td>
998
- </tr>
999
- <tr>
1000
- <td height="64"><img src="<?php echo WPSR_ADMIN_URL; ?>images/buttons/sharethis-hcount.png" /></td>
1001
- <td><input name="wpsr_sharethis_hcount_order" id="wpsr_sharethis_hcount_order" type="text" value="<?php echo $wpsr_sharethis['hcount_order']; ?>"/>
1002
- <input class="submit button" type="button" value="Select services" onclick="openServiceSelctor('<?php echo WPSR_ADMIN_URL; ?>wpsr-services-selector.php?id=wpsr_sharethis_hcount_order&bt=sharethis&val=', 'wpsr_sharethis_hcount_order');" /></td>
1003
- </tr>
1004
- <tr>
1005
- <td height="65"><img src="<?php echo WPSR_ADMIN_URL; ?>images/buttons/sharethis-buttons.png" /></td>
1006
- <td><input name="wpsr_sharethis_buttons_order" id="wpsr_sharethis_buttons_order" type="text" value="<?php echo $wpsr_sharethis['buttons_order']; ?>"/>
1007
- <input class="submit button" type="button" value="Select services" onclick="openServiceSelctor('<?php echo WPSR_ADMIN_URL; ?>wpsr-services-selector.php?id=wpsr_sharethis_buttons_order&bt=sharethis&val=', 'wpsr_sharethis_buttons_order');" /></td>
1008
- </tr>
1009
- <tr>
1010
- <td height="67"><img src="<?php echo WPSR_ADMIN_URL; ?>images/buttons/sharethis-large.png" /></td>
1011
- <td><input name="wpsr_sharethis_large_order" id="wpsr_sharethis_large_order" type="text" value="<?php echo $wpsr_sharethis['large_order']; ?>"/>
1012
- <input class="submit button" type="button" value="Select services" onclick="openServiceSelctor('<?php echo WPSR_ADMIN_URL; ?>wpsr-services-selector.php?id=wpsr_sharethis_large_order&bt=sharethis&val=', 'wpsr_sharethis_large_order');" /></td>
1013
- </tr>
1014
- <tr>
1015
- <td height="70"><img src="<?php echo WPSR_ADMIN_URL; ?>images/buttons/sharethis-regular.png" /></td>
1016
- <td><input name="wpsr_sharethis_regular_order" id="wpsr_sharethis_regular_order" type="text" value="<?php echo $wpsr_sharethis['regular_order']; ?>"/>
1017
- <input class="submit button" type="button" value="Select services" onclick="openServiceSelctor('<?php echo WPSR_ADMIN_URL; ?>wpsr-services-selector.php?id=wpsr_sharethis_regular_order&bt=sharethis&val=', 'wpsr_sharethis_regular_order');" /></td>
1018
- </tr>
1019
- <tr>
1020
- <td height="75"><img src="<?php echo WPSR_ADMIN_URL; ?>images/buttons/sharethis-regular-notext.png" /></td>
1021
- <td><input name="wpsr_sharethis_regular2_order" id="wpsr_sharethis_regular2_order" type="text" value="<?php echo $wpsr_sharethis['regular2_order']; ?>"/>
1022
- <input class="submit button" type="button" value="Select services" onclick="openServiceSelctor('<?php echo WPSR_ADMIN_URL; ?>wpsr-services-selector.php?id=wpsr_sharethis_regular2_order&bt=sharethis&val=', 'wpsr_sharethis_regular2_order');" /></td>
1023
- </tr>
1024
- <tr>
1025
- <td><img src="<?php echo WPSR_ADMIN_URL; ?>images/buttons/sharethis-classic.png" /></td>
1026
- <td></td>
1027
- </tr>
1028
- </table>
1029
- </div>
1030
-
1031
- <h3><?php _e('Settings', 'wpsr'); ?></h3>
1032
- <div class="section">
1033
- <table width="100%" height="100" border="0">
1034
- <tr>
1035
- <td width="31%" height="49"><label for="wpsr_sharethis_pubkey">Sharethis Publisher Key</label></td>
1036
- <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>
1037
- </tr>
1038
-
1039
- <tr>
1040
- <td width="31%" height="49"><label for="wpsr_sharethis_copynshare">Disable Sharethis CopyNShare feature</label></td>
1041
- <td width="69%"><select id="wpsr_sharethis_copynshare" name="wpsr_sharethis_copynshare">
1042
- <option <?php echo $wpsr_sharethis['copynshare'] == '1' ? ' selected="selected"' : ''; ?> value="1"><?php _e('Yes', 'wpsr'); ?></option>
1043
- <option <?php echo $wpsr_sharethis['copynshare'] == '0' ? ' selected="selected"' : ''; ?> value="0"><?php _e('No', 'wpsr'); ?></option>
1044
- </select></td>
1045
- </tr>
1046
-
1047
- <tr>
1048
- <td><label for="wpsr_sharethis_addp">Automatically wrap with paragraph</label></td>
1049
- <td><select id="wpsr_sharethis_addp" name="wpsr_sharethis_addp">
1050
- <option <?php echo $wpsr_sharethis['addp'] == '1' ? ' selected="selected"' : ''; ?> value="1"><?php _e('Yes', 'wpsr'); ?></option>
1051
- <option <?php echo $wpsr_sharethis['addp'] == '0' ? ' selected="selected"' : ''; ?> value="0"><?php _e('No', 'wpsr'); ?></option>
1052
- </select></td>
1053
- </tr>
1054
- </table>
1055
- </div>
1056
- </div><!-- Sharethis -->
1057
-
1058
-
1059
- <div class="inWindow winTwitter">
1060
- <h3><?php _e('General', 'wpsr'); ?></h3>
1061
- <div class="section">
1062
- <table width="100%" height="76" border="0">
1063
- <tr>
1064
- <td width="30%" height="37"><label for="wpsr_retweet_username"><?php _e('Twitter Username', 'wpsr'); ?></label></td>
1065
- <td width="70%">@<input name="wpsr_retweet_username" id="wpsr_retweet_username" type="text" value="<?php echo $wpsr_retweet['username']; ?>"/></td>
1066
- </tr>
1067
- <tr>
1068
- <td><label for="wpsr_retweet_type"><?php _e('Retweet Button Type', 'wpsr'); ?></label></td>
1069
- <td><select id="wpsr_retweet_type" name="wpsr_retweet_type">
1070
- <option <?php echo $wpsr_retweet['type'] == 'normal' ? ' selected="selected"' : ''; ?> value="normal"><?php _e('Normal (Big)', 'wpsr'); ?></option>
1071
- <option <?php echo $wpsr_retweet['type'] == 'compact' ? ' selected="selected"' : ''; ?> value="compact"><?php _e('Compact', 'wpsr'); ?></option>
1072
- <option <?php echo $wpsr_retweet['type'] == 'nocount' ? ' selected="selected"' : ''; ?> value="nocount"><?php _e('No Count (only for Twitter\'s Official Button)', 'wpsr'); ?></option>
1073
- </select></td>
1074
- </tr>
1075
- </table>
1076
- </div>
1077
-
1078
- <h3><?php _e('Choose a service', 'wpsr'); ?></h3>
1079
- <div class="section">
1080
- <table width="100%" border="0">
1081
- <tr>
1082
- <td width="30%"><label for="wpsr_retweet_service"><?php _e('Retweet Service', 'wpsr'); ?></label></td>
1083
- <td width="70%"><select id="wpsr_retweet_service" name="wpsr_retweet_service">
1084
- <option <?php echo $wpsr_retweet['service'] == 'twitter' ? ' selected="selected"' : ''; ?> value="twitter"><?php _e('Twitter\'s Official Button', 'wpsr'); ?></option>
1085
- <option <?php echo $wpsr_retweet['service'] == 'tweetmeme' ? ' selected="selected"' : ''; ?> value="tweetmeme">TweetMeme</option>
1086
- <option <?php echo $wpsr_retweet['service'] == 'topsy' ? ' selected="selected"' : ''; ?> value="topsy">Topsy</option>
1087
- </select>
1088
-
1089
- <div id="wpsr_retweet_topsysettings">
1090
- <table width="100%" border="0">
1091
- <tr>
1092
- <td width="32%"><?php _e('Select a theme for topsy', 'wpsr'); ?></td>
1093
- <td width="68%">
1094
- <select id="wpsr_retweet_topsytheme" name="wpsr_retweet_topsytheme">
1095
- <option value="blue" <?php echo $wpsr_retweet['topsytheme'] == 'blue' ? ' selected="selected"' : ''; ?> >blue</option>
1096
- <option value="brown" <?php echo $wpsr_retweet['topsytheme'] == 'brown' ? ' selected="selected"' : ''; ?>>brown</option>
1097
- <option value="jade" <?php echo $wpsr_retweet['topsytheme'] == 'jade' ? ' selected="selected"' : ''; ?>>jade</option>
1098
- <option value="brick-red" <?php echo $wpsr_retweet['topsytheme'] == 'brick-red' ? ' selected="selected"' : ''; ?>>brick-red</option>
1099
- <option value="sea-foam" <?php echo $wpsr_retweet['topsytheme'] == 'sea-foam' ? ' selected="selected"' : ''; ?>>sea-foam</option>
1100
- <option value="mustard" <?php echo $wpsr_retweet['topsytheme'] == 'mustard' ? ' selected="selected"' : ''; ?>>mustard</option>
1101
- <option value="hot-pink" <?php echo $wpsr_retweet['topsytheme'] == 'hot-pink' ? ' selected="selected"' : ''; ?>>hot-pink</option>
1102
- </select>
1103
- </td>
1104
- </tr>
1105
- </table>
1106
- </div>
1107
-
1108
- <div id="wpsr_retweet_twittersettings">
1109
- <table width="100%" height="75" border="0">
1110
- <tr>
1111
- <td width="32%" height="34"><?php _e('Recommend people', 'wpsr'); ?> </td>
1112
- <td width="68%"><input name="wpsr_retweet_twitter_recacc" type="text" id="wpsr_retweet_twitter_recacc" value="<?php echo $wpsr_retweet['twitter_recacc']; ?>" size="40"/><br />
1113
- <span class="smallText"><?php _e('Twitter Username: Description (Optional)', 'wpsr'); ?></span>
1114
- </td>
1115
- </tr>
1116
- <tr>
1117
- <td><?php _e('Language', 'wpsr'); ?></td>
1118
- <td><select id="wpsr_retweet_twitter_lang" name="wpsr_retweet_twitter_lang">
1119
- <option value="en" <?php echo $wpsr_retweet['twitter_lang'] == 'en' ? ' selected="selected"' : ''; ?>>English</option>
1120
- <option value="fr" <?php echo $wpsr_retweet['twitter_lang'] == 'fr' ? ' selected="selected"' : ''; ?>>French</option>
1121
- <option value="de" <?php echo $wpsr_retweet['twitter_lang'] == 'de' ? ' selected="selected"' : ''; ?>>German</option>
1122
- <option value="es" <?php echo $wpsr_retweet['twitter_lang'] == 'es' ? ' selected="selected"' : ''; ?>>Spanish</option>
1123
- <option value="ja" <?php echo $wpsr_retweet['twitter_lang'] == 'ja' ? ' selected="selected"' : ''; ?>>Japanese</option>
1124
- </select></td>
1125
- </tr>
1126
- </table>
1127
- </div>
1128
-
1129
- </td>
1130
- </tr>
1131
- </table>
1132
- </div>
1133
-
1134
- <!-- Digg button options removed -->
1135
-
1136
- </div> <!-- Retweet and digg -->
1137
-
1138
-
1139
- <div class="inWindow winFacebook">
1140
- <h3><?php _e('Like Button', 'wpsr'); ?></h3>
1141
- <div class="section">
1142
- <table width="100%" border="0">
1143
- <tr>
1144
- <td width="30%" height="31"><label for="wpsr_facebook_btstyle"><?php _e('Button Style', 'wpsr'); ?></label></td>
1145
- <td width="70%"><select id="wpsr_facebook_btstyle" name="wpsr_facebook_btstyle">
1146
- <option <?php echo $wpsr_facebook['btstyle'] == 'standard' ? ' selected="selected"' : ''; ?> value="standard"><?php _e('Standard', 'wpsr'); ?></option>
1147
- <option <?php echo $wpsr_facebook['btstyle'] == 'button_count' ? ' selected="selected"' : ''; ?> value="button_count"><?php _e('Button count', 'wpsr'); ?></option>
1148
- <option <?php echo $wpsr_facebook['btstyle'] == 'box_count' ? ' selected="selected"' : ''; ?> value="box_count"><?php _e('Box count', 'wpsr'); ?></option>
1149
- </select></td>
1150
- </tr>
1151
- <tr>
1152
- <td height="35"><label for="wpsr_facebook_showfaces"><?php _e('Show Faces', 'wpsr'); ?></label></td>
1153
- <td><select id="wpsr_facebook_showfaces" name="wpsr_facebook_showfaces">
1154
- <option <?php echo $wpsr_facebook['showfaces'] == '1' ? ' selected="selected"' : ''; ?> value="1"><?php _e('Yes', 'wpsr'); ?></option>
1155
- <option <?php echo $wpsr_facebook['showfaces'] == '0' ? ' selected="selected"' : ''; ?> value="0"><?php _e('No', 'wpsr'); ?></option>
1156
- </select></td>
1157
- </tr>
1158
-
1159
- <!-- removed button width option v2.4.9.8 -->
1160
-
1161
- <tr>
1162
- <td height="35"><label for="wpsr_facebook_verb"><?php _e('Verb to Display', 'wpsr'); ?></label></td>
1163
- <td><select id="wpsr_facebook_verb" name="wpsr_facebook_verb">
1164
- <option <?php echo $wpsr_facebook['verb'] == 'like' ? ' selected="selected"' : ''; ?> value="like"><?php _e('Like', 'wpsr'); ?></option>
1165
- <option <?php echo $wpsr_facebook['verb'] == 'recommend' ? ' selected="selected"' : ''; ?> value="recommend"><?php _e('Recommend', 'wpsr'); ?></option>
1166
- </select></td>
1167
- </tr>
1168
-
1169
- <!-- removed font option v2.4.9.8 -->
1170
-
1171
- <tr>
1172
- <td height="38"><label for="wpsr_facebook_color"><?php _e('Color scheme', 'wpsr'); ?></label></td>
1173
- <td><select id="wpsr_facebook_color" name="wpsr_facebook_color">
1174
- <option <?php echo $wpsr_facebook['color'] == 'light' ? ' selected="selected"' : ''; ?> value="light"><?php _e('Light', 'wpsr'); ?></option>
1175
- <option <?php echo $wpsr_facebook['color'] == 'dark' ? ' selected="selected"' : ''; ?> value="dark"><?php _e('Dark', 'wpsr'); ?></option>
1176
- </select></td>
1177
- </tr>
1178
- </table>
1179
- </div>
1180
-
1181
- <h3><?php _e('General Settings', 'wpsr'); ?></h3>
1182
- <div class="section">
1183
- <table width="100%" border="0">
1184
- <tr>
1185
- <td height="38"><label for="wpsr_facebook_appid"><?php _e('Application ID', 'wpsr'); ?></label></td>
1186
- <td><input name="wpsr_facebook_appid" id="wpsr_facebook_appid" type="text" value="<?php echo $wpsr_facebook['appid']; ?>"/><br /><span class="smallText"><?php _e('Useful in analytics', 'wpsr'); ?>. Enter a <b>valid</b> ID or else leave blank.</span></td>
1187
- </tr>
1188
-
1189
- <tr>
1190
- <td height="38"><label for="wpsr_facebook_locale"><?php _e('Like Button language / locale', 'wpsr'); ?></label></td>
1191
- <td><input name="wpsr_facebook_locale" id="wpsr_facebook_locale" type="text" value="<?php echo $wpsr_facebook['locale']; ?>"/><br /><span class="smallText">Language of the like button. <br/>Get the code for your <a href="http://bit.ly/LxvUk4" target="_blank">language from this page</a> and paste here. Leave empty for en_US</span></td>
1192
- </tr>
1193
-
1194
- </table>
1195
- </div>
1196
- </div><!-- Facebook -->
1197
-
1198
- <div class="inWindow winCustom">
1199
- <h3><?php _e('Custom 1', 'wpsr'); ?></h3>
1200
- <div class="section">
1201
- <textarea name="wpsr_custom1" id="wpsr_custom1" style="width:99%" rows="8" class="custom_box"><?php echo $wpsr_custom['custom1']; ?></textarea>
1202
- </div>
1203
-
1204
- <h3><?php _e('Custom 2', 'wpsr'); ?></h3>
1205
- <div class="section">
1206
- <textarea name="wpsr_custom2" id="wpsr_custom2" style="width:99%" rows="8" class="custom_box"><?php echo $wpsr_custom['custom2']; ?></textarea>
1207
- </div>
1208
-
1209
- <h3>Help</h3>
1210
- <div class="section"><p>Enter any share button code. Use <code>{url}</code> for the page url and <code>{title}</code> for page title</p>
1211
- <p><a href="#" target="_blank">Check this small tutorial</a> on using custom buttons and for some examples.</p></div>
1212
-
1213
- </div><!-- Custom -->
1214
-
1215
- <div class="inWindow winTemplates">
1216
- <p class="note"><strong>Note:</strong> Selecting a template will overwrite the current template and button settings.</p>
1217
- <div class="templatesList">
1218
- </div>
1219
- <a href="http://www.aakashweb.com/docs/wp-socializer-docs/creating-a-custom-template/" target="_blank"><?php _e('Create a template', 'wpsr'); ?></a> | <a href="http://www.aakashweb.com/docs/wp-socializer-docs/creating-a-custom-template/" target="_blank"><?php _e('Submit a template', 'wpsr'); ?></a>
1220
- </div><!-- One click - templates -->
1221
-
1222
- </div><!-- Window -->
1223
-
1224
- </form><!-- Content -->
1225
-
1226
- <div class="bottomInfo">
1227
- <p align="center"><a href="http://bit.ly/wpsrDonation" target="_blank"><img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif" /></a></p>
1228
- <p align="center"><a href="http://youtu.be/1uimAE8rFYE" target="_blank">(Demo video)</a></p>
1229
- <p align="center"><a href="https://twitter.com/vaakash" target="_blank">Follow @vaakash</a></p>
1230
- <p align="center"><a href="http://www.aakashweb.com/" class="credits" target="_blank">a plugin from Aakash Web</a></p>
1231
- </div>
1232
-
1233
- </div><!-- Wrap -->
1234
- <?php endif; ?>
1235
-
1236
- <?php if(wpsr_show_admin() == 0): ?>
1237
- <!-- Version Intro -->
1238
-
1239
- <span class="blogUrl" style="display:none"><?php echo get_option('siteurl'); ?></span>
1240
-
1241
- <div class="wrap">
1242
-
1243
- <h2><img width="32" height="32" src="<?php echo WPSR_ADMIN_URL; ?>images/wp-socializer.png" align="absmiddle"/> WP Socializer <span class="smallText">v<?php echo WPSR_VERSION; ?></span></h2>
1244
-
1245
- <p><strong>NOTE: Please refresh the page to load the new Stylesheets and Javascripts of the admin page.</strong></p>
1246
-
1247
- <div class="miniWrap introWrap">
1248
-
1249
- <!-- AddThis Button BEGIN -->
1250
- <div class="shareList addthis_toolbox addthis_default_style">
1251
- <a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
1252
- <a class="addthis_button_tweet" tw:text="Check out: WP Socializer - the best social sharing plugin for WordPress with cool all in one features," tw:via="vaakash"></a>
1253
- <a class="addthis_button_google_plusone" g:plusone:size="medium"></a>
1254
- <a class="addthis_counter addthis_pill_style"></a>
1255
- <a class="button alignright" href="http://bit.ly/wpsrDonation" target="_blank">Donate</a>
1256
- </div>
1257
- <script type="text/javascript">
1258
- var addthis_share = {
1259
- url: 'http://www.aakashweb.com/wordpress-plugins/wp-socializer/',
1260
- title: 'WP Socializer - the best social sharing plugin for WordPress with cool all in one features',
1261
- 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.',
1262
- }
1263
- var addthis_config = { data_track_clickback: false }
1264
- </script>
1265
- <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=vaakash"></script>
1266
- <!-- AddThis Button END -->
1267
-
1268
- <div class="infoContent"></div>
1269
-
1270
- <p class="refLinks"><b><a href="http://www.aakashweb.com/wordpress-plugins/wp-socializer/" target="_blank"><?php _e('Full Features', 'wpsr'); ?></a> | <a href="http://www.aakashweb.com/docs/wp-socializer-docs/" target="_blank"><?php _e('Documentation', 'wpsr'); ?></a> | <a href="http://www.aakashweb.com/forum/" target="_blank"><?php _e('Support', 'wpsr'); ?></a> | <a href="http://www.aakashweb.com/forum/" target="_blank"><?php _e('Bug Report', 'wpsr'); ?></a> | <a href="http://www.aakashweb.com/wordpress-plugins/wp-socializer/#videos" target="_blank"><?php _e('Video Demo & Tutorials', 'wpsr'); ?></a></b></p>
1271
-
1272
- <form class="startForm" method="post">
1273
- <?php wp_nonce_field('wpsr_intro_form'); ?>
1274
- <input class="button-primary" type="submit" name="wpsr_intro_submit" id="wpsr_intro_submit" value=" <?php _e('Start using WP Socializer', 'wpsr'); echo ' v' . WPSR_VERSION; ?> " />
1275
- </form>
1276
- </div>
1277
- </div>
1278
- <?php endif; ?>
1279
-
1280
- <?php
1281
- }
1282
-
1283
- function wpsr_meta_box(){
1284
- global $post;
1285
-
1286
- $wpsr_post_disabletemplate1 = 0;
1287
- $wpsr_post_disabletemplate2 = 0;
1288
-
1289
- if (get_post_meta($post->ID,'_wpsr-disable-template1', true)) {
1290
- $wpsr_post_disabletemplate1 = 1;
1291
- }
1292
-
1293
- if (get_post_meta($post->ID,'_wpsr-disable-template2', true)) {
1294
- $wpsr_post_disabletemplate2 = 1;
1295
- }
1296
-
1297
- ?>
1298
- <a name="wp_socializer" id="wp_socializer"></a>
1299
-
1300
- <table width="100%" border="0">
1301
- <tr>
1302
- <td><label><input name="wpsr_post_disabletemplate1" id="wpsr_post_disabletemplate1" type="checkbox" value="1" <?php echo $wpsr_post_disabletemplate1 == "1" ? 'checked="checked"' : ""; ?> /> <?php _e('Disable template 1', 'wpsr'); ?></label></td>
1303
- </tr>
1304
- <tr>
1305
- <td><label><input name="wpsr_post_disabletemplate2" id="wpsr_post_disabletemplate2" type="checkbox" value="1" <?php echo $wpsr_post_disabletemplate2 == "1" ? 'checked="checked"' : ""; ?> /> <?php _e('Disable template 2', 'wpsr'); ?></label></td>
1306
- </tr>
1307
- <tr>
1308
- <td height="28"><small><a href="http://www.aakashweb.com/wordpress-plugins/wp-socializer/" target="_blank"><?php _e('Help', 'wpsr'); ?></a> | <a href="admin.php?page=wp_socializer" target="_blank"><?php _e('Settings', 'wpsr'); ?></a></small></td>
1309
- </tr>
1310
- </table>
1311
-
1312
- <?php
1313
- }
1314
-
1315
- ## Add the meta box to post editing page
1316
- function wpsr_add_meta_box() {
1317
- add_meta_box('wp-socializer','WP Socializer','wpsr_meta_box','post','side');
1318
- add_meta_box('wp-socializer','WP Socializer','wpsr_meta_box','page','side');
1319
- }
1320
- add_action('admin_menu', 'wpsr_add_meta_box');
1321
-
1322
- function wpsr_insert_post($post_id) {
1323
- if (isset($_POST['wpsr_post_disabletemplate1']) && $_POST['wpsr_post_disabletemplate1'] == 1) {
1324
- add_post_meta($post_id, '_wpsr-disable-template1', 1, true);
1325
- }else{
1326
- delete_post_meta($post_id, '_wpsr-disable-template1');
1327
- }
1328
-
1329
- if (isset($_POST['wpsr_post_disabletemplate2']) && $_POST['wpsr_post_disabletemplate2'] == 1) {
1330
- add_post_meta($post_id, '_wpsr-disable-template2', 1, true);
1331
- }else{
1332
- delete_post_meta($post_id, '_wpsr-disable-template2');
1333
- }
1334
- }
1335
- add_action('wp_insert_post', 'wpsr_insert_post');
1336
-
1337
- ## Add notification to the dashboard right now
1338
- function wpsr_dashboard_rightnow(){
1339
- $wpsr_settings = get_option('wpsr_settings_data');
1340
- $wpsr_settings_disablewpsr = $wpsr_settings['disablewpsr'];
1341
-
1342
- if($wpsr_settings_disablewpsr == 1){
1343
- echo '<p class="message">' . __('WP Socializer is <span style="color:red;"><b>disabled</b></span>', 'wpsr') . '</p>';
1344
- }
1345
- }
1346
- add_action('rightnow_end','wpsr_dashboard_rightnow');
1347
-
1348
- ## Add the "WP Socializer" menu to the admin bar.
1349
- function wpsr_adminbar() {
1350
- global $wp_admin_bar, $wpdb, $post;
1351
-
1352
- $pages = array('wp_socializer', 'wp_socializer_other', 'wp_socializer_floating_bar');
1353
-
1354
- if ( !is_super_admin() || !is_admin_bar_showing() || (isset($_GET['page']) && (in_array($_GET['page'], $pages))) ){
1355
- return;
1356
- }
1357
-
1358
- $adminPage = get_option('home') . '/wp-admin/admin.php?page=wp_socializer'; // Broken link fix v2.1
1359
-
1360
- $wp_admin_bar->add_menu( array( 'id' => 'wpsr_adminbar_menu', 'title' => 'WP Socializer', 'href' => $adminPage));
1361
- $wp_admin_bar->add_menu( array( 'id' => 'wpsr_adminbar_edittemplates', 'parent' => 'wpsr_adminbar_menu', 'title' => __('Edit the templates', 'wpsr'), 'href' => $adminPage . '#tab-3'));
1362
-
1363
- if(is_single() || is_page()){
1364
- $current_object = get_queried_object();
1365
- $postEdit = get_option('home') . '/wp-admin/post.php?action=edit&post=' . $post->ID;
1366
- $wp_admin_bar->add_menu( array( 'id' => 'wpsr_adminbar_disabletemplates', 'parent' => 'wpsr_adminbar_menu', 'title' => __('Disable WP Socializer in this page', 'wpsr'), 'href' => get_edit_post_link($current_object->ID) . '#wp_socializer' ));
1367
- }
1368
-
1369
- $wp_admin_bar->add_menu( array( 'id' => 'wpsr_adminbar_help', 'parent' => 'wpsr_adminbar_menu', 'title' => __('Help', 'wpsr'), 'href' => 'http://www.aakashweb.com/wordpress-plugins/wp-socializer/'));
1370
-
1371
- }
1372
- add_action('admin_bar_menu', 'wpsr_adminbar', 1000);
1373
-
1374
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/wpsr-services-selector.php DELETED
@@ -1,223 +0,0 @@
1
- <?php
2
-
3
- if(empty($_GET['id']) || empty($_GET['bt'])) die('<!-- Empty parameters -->');
4
-
5
- $id = sanitize($_GET['id']);
6
- $val = sanitize($_GET['val']);
7
- $bt = sanitize($_GET['bt']);
8
-
9
- $addthis_services = array("100zakladok", "2tag", "2linkme", "a1webmarks", "addio", "menu", "adfty", "adifni", "aerosocial", "allmyfaves", "amazonwishlist", "amenme", "aim", "aolmail", "arto", "aviary", "baang", "baidu", "bebo", "bentio", "biggerpockets", "bitly", "bizsugar", "bleetbox", "blinklist", "blip", "blogger", "bloggy", "blogmarks", "blogtrottr", "blurpalicious", "boardlite", "bobrdobr", "bonzobox", "bookmarkedbyus", "socialbookmarkingnet", "bookmarkycz", "bookmerkende", "bordom", "box", "brainify", "bryderi", "buddymarks", "buzzzy", "camyoo", "care2", "chiq", "cirip", "citeulike", "classicalplace", "clickazoo", "clply", "cndig", "colivia", "technerd", "connotea", "cosmiq", "delicious", "designbump", "designmoo", "digthiswebhost", "digaculturanet", "digg", "diggita", "diglog", "digo", "digzign", "diigo", "dipdive", "domelhor", "dosti", "dotnetkicks", "dotnetshoutout", "woscc", "douban", "drimio", "dropjack", "dwellicious", "dzone", "edelight", "efactor", "ekudos", "elefantapl", "email", "mailto", "embarkons", "eucliquei", "evernote", "extraplay", "ezyspot", "fabulously40", "facebook", "informazione", "fark", "farkinda", "fashiolista", "fashionburner", "favable", "faves", "favlogde", "favoritende", "favorites", "favoritus", "flaker", "flosspro", "folkd", "followtags", "forceindya", "thefreedictionary", "fresqui", "friendfeed", "friendster", "funp", "fwisp", "gabbr", "gacetilla", "gamekicker", "givealink", "globalgrind", "gmail", "goodnoows", "google", "googlebuzz", "googlereader", "googletranslate", "gravee", "greaterdebater", "grono", "grumper", "habergentr", "hackernews", "hadashhot", "hatena", "hazarkor", "gluvsnap", "hedgehogs", "hellotxt", "hipstr", "hitmarks", "hotbookmark", "hotklix", "hotmail", "w3validator", "hyves", "idearef", "identica", "igoogle", "ihavegot", "instapaper", "investorlinks", "iorbix", "isociety", "iwiw", "jamespot", "jisko", "joliprint", "jumptags", "zooloo", "kaboodle", "kaevur", "kipup", "kirtsy", "kledy", "kommenting", "latafaneracat", "laaikit", "ladenzeile", "librerio", "linkninja", "linkagogo", "linkedin", "linksgutter", "linkshares", "linkuj", "livefavoris", "livejournal", "lockerblogger", "logger24", "lynki", "mymailru", "markme", "mashbord", "mawindo", "meccho", "meinvz", "mekusharim", "memori", "meneame", "live", "mindbodygreen", "misterwong", "misterwong_de", "mixx", "moemesto", "mototagz", "mrcnetworkit", "multiply", "myaol", "mylinkvault", "myspace", "n4g", "netlog", "netvibes", "netvouz", "newsmeback");
10
-
11
- $sharethis_services = array("adfty", "allvoices", "amazon_wishlist", "arto", "baidu", "bebo", "blinklist", "blip", "blogmarks", "blogger", "brainify", "buddymarks", "buffer", "bus_exchange", "care2", "chiq", "citeulike", "connotea", "corank", "corkboard", "current", "dealsplus", "delicious", "digg", "diigo", "dotnetshoutout", "dzone", "edmodo", "evernote", "email", "facebook", "fblike", "fbrec", "fbsend", "fark", "fashiolista", "folkd", "formspring", "fresqui", "friendfeed", "funp", "fwisp", "google", "googleplus", "google_bmarks", "google_reader", "google_translate", "hatena", "hyves", "identi", "instapaper", "jumptags", "kaboodle", "linkagogo", "linkedin", "livejournal", "mail_ru", "meneame", "messenger", "mister_wong", "mixx", "moshare", "myspace", "n4g", "netlog", "netvouz", "newsvine", "nujij", "odnoklassniki", "oknotizie", "orkut", "plusone", "pinterest", "raise_your_voice", "reddit", "segnalo", "sharethis", "sina", "slashdot", "sonico", "speedtile", "startaid", "startlap", "stumbleupon", "stumpedia", "technorati", "typepad", "tumblr", "twitter", "viadeo", "virb", "vkontakte", "voxopolis", "wordpress", "xanga", "xerpi", "xing", "yammer", "yigg");
12
-
13
- // Clean the GET variables.
14
- function sanitize($input) {
15
- $search = array(
16
- '@<script[^>]*?>.*?</script>@si', // Strip out javascript
17
- '@<[\/\!]*?[^<>]*?>@si', // Strip out HTML tags
18
- '@<style[^>]*?>.*?</style>@siU', // Strip style tags properly
19
- '@<![\s\S]*?--[ \t\n\r]*>@' // Strip multi-line comments
20
- );
21
-
22
- $output = htmlspecialchars(preg_replace($search, '', $input));
23
- return $output;
24
- } // Thanks to CSS Tricks
25
-
26
- ?>
27
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
28
- <html xmlns="http://www.w3.org/1999/xhtml">
29
- <head>
30
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
31
- <title>Select the services</title>
32
- <link rel="stylesheet" href="wpsr-admin-mini-css.css" type="text/css" media="all" />
33
-
34
- <script language="JavaScript" type="text/javascript">
35
- <!--
36
-
37
- var NS4 = (navigator.appName == "Netscape" && parseInt(navigator.appVersion) < 5);
38
-
39
- function updateAndClose(val, id){
40
- opener.document.getElementById(id).value = val;
41
- window.close();
42
- }
43
-
44
- function addOption(theSel, theText, theValue){
45
- var newOpt = new Option(theText, theValue);
46
- var selLength = theSel.length;
47
- theSel.options[selLength] = newOpt;
48
- loopSelected();
49
- }
50
-
51
- function deleteOption(theSel, theIndex){
52
- var selLength = theSel.length;
53
- if(selLength>0){
54
- theSel.options[theIndex] = null;
55
- }
56
- loopSelected();
57
- }
58
-
59
- function moveOptions(theSelFrom, theSelTo){
60
-
61
- var selLength = theSelFrom.length;
62
- var selectedText = new Array();
63
- var selectedValues = new Array();
64
- var selectedCount = 0;
65
-
66
- var i;
67
-
68
- // Find the selected Options in reverse order
69
- // and delete them from the 'from' Select.
70
- for(i=selLength-1; i>=0; i--){
71
- if(theSelFrom.options[i].selected){
72
- selectedText[selectedCount] = theSelFrom.options[i].text;
73
- selectedValues[selectedCount] = theSelFrom.options[i].value;
74
- deleteOption(theSelFrom, i);
75
- selectedCount++;
76
- }
77
- }
78
-
79
- // Add the selected text/values in reverse order.
80
- // This will add the Options to the 'to' Select
81
- // in the same order as they were in the 'from' Select.
82
- for(i=selectedCount-1; i>=0; i--){
83
- addOption(theSelTo, selectedText[i], selectedValues[i]);
84
- }
85
-
86
- loopSelected();
87
- }
88
-
89
- function moveUp(lst){
90
- if(lst.selectedIndex == -1){
91
- alert('Please select an Item to move up.');
92
- }else{
93
- if(lst.selectedIndex == 0){
94
- alert('First element cannot be moved up');
95
- return false
96
- }else{
97
- var tempValue = lst.options[lst.selectedIndex].value;
98
- var tempIndex = lst.selectedIndex-1;
99
- lst.options[lst.selectedIndex].value = lst.options[lst.selectedIndex-1].value;
100
- lst.options[lst.selectedIndex-1].value = tempValue;
101
- var tempText = lst.options[lst.selectedIndex].text;
102
- lst.options[lst.selectedIndex].text = lst.options[lst.selectedIndex-1].text;
103
- lst.options[lst.selectedIndex-1].text = tempText;
104
- lst.selectedIndex = tempIndex;
105
- loopSelected();
106
- }
107
- }
108
- return false;
109
- }
110
-
111
- function moveDown(lst){
112
- if(lst.selectedIndex == -1){
113
- alert('Please select an Item to move down');
114
- }else{
115
- if(lst.selectedIndex == lst.options.length-1){
116
- alert('Last element cannot be moved down');
117
- }else{
118
- var tempValue = lst.options[lst.selectedIndex].value;
119
- var tempIndex = lst.selectedIndex+1;
120
- lst.options[lst.selectedIndex].value = lst.options[lst.selectedIndex+1].value;
121
- lst.options[lst.selectedIndex+1].value = tempValue;
122
- var tempText = lst.options[lst.selectedIndex].text;
123
- lst.options[lst.selectedIndex].text = lst.options[lst.selectedIndex+1].text;
124
- lst.options[lst.selectedIndex+1].text = tempText;
125
- lst.selectedIndex = tempIndex;
126
- loopSelected();
127
- }
128
- }
129
- return false;
130
- }
131
-
132
- function loopSelected(){
133
- var txtSelectedValuesObj = document.getElementById('services');
134
- var selectedArray = new Array();
135
- var selObj = document.getElementById('sel2');
136
- var i;
137
- var count = 0;
138
- for (i=0; i<selObj.options.length; i++) {
139
- if (selObj.options[i].value) {
140
- selectedArray[count] = selObj.options[i].value;
141
- count++;
142
- }
143
- }
144
- txtSelectedValuesObj.value = selectedArray;
145
- }
146
-
147
- //http://www.mredkj.com/tutorials/tutorial004.html-->
148
- </script>
149
-
150
- </head>
151
-
152
- <body>
153
- <div id="wrapper">
154
- <h2>Select the services</h2>
155
- <small>Use Control key to select multiple services.</small>
156
- <form>
157
- <table width="100%" border="0">
158
- <tr>
159
- <td width="44%">
160
- <select name="sel1" id="sel1" size="20" multiple="multiple" style="width:100%">
161
- <?php
162
- switch($bt){
163
- case 'addthis':
164
- foreach($addthis_services as $srvc){
165
- echo "<option value='$srvc'>$srvc</option>";
166
- }
167
- break;
168
-
169
- case 'sharethis':
170
- foreach($sharethis_services as $srvc){
171
- echo "<option value='$srvc'>$srvc</option>";
172
- }
173
- break;
174
- }
175
- ?>
176
- </select> </td>
177
- <td width="11%" align="center" valign="middle">
178
- <p>
179
- <input type="button" value="--&gt;" onclick="moveOptions(this.form.sel1, this.form.sel2);" title="Add" />
180
- <br />
181
- <input type="button" value="&lt;--" onclick="moveOptions(this.form.sel2, this.form.sel1);" title="Remove" />
182
- </p>
183
- <br />
184
- <p>
185
- <input type="button" value=" Up " onclick="moveUp(this.form.sel2);" title="Up" />
186
- <br />
187
- <input type="button" value="Down" onclick="moveDown(this.form.sel2);" title="Down" />
188
- </p>
189
- </td>
190
- <td width="45%">
191
- <select name="sel2" id="sel2" size="20" multiple="multiple" style="width:100%">
192
- <?php
193
- $selVal = $val;
194
- if($selVal != ''){
195
- $expSel = explode(',', $selVal);
196
- foreach ($expSel as $eSel){
197
- echo "<option value='$eSel'>$eSel</option>";
198
- }
199
- }
200
-
201
- ?>
202
- </select>
203
- </td>
204
- </tr>
205
- </table>
206
-
207
- <br/>
208
-
209
- <h3>Selected services:</h3><br/>
210
- <p><input name="services" type="text" id="services" value="<?php echo $val; ?>" size="40"/>
211
- <input type="hidden" id="targetId" name="targetId" value="<?php echo $id; ?>"/></p>
212
-
213
- </form>
214
-
215
- <p align="center">
216
- <input type="button" id="updateBt" onclick="updateAndClose(document.getElementById('services').value, document.getElementById('targetId').value);" value="Update" /><br/><br/>
217
- <a href="http://www.aakashweb.com/" target="_blank">Aakash Web</a> | <a href="http://bit.ly/wpsrDonation" target="_blank">Donate</a> | <a href="http://www.aakashweb.com/wordpress-plugins/wp-socializer/" target="_blank">Help</a>
218
- </p>
219
-
220
- </div>
221
-
222
- </body>
223
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
core/buttons.php ADDED
@@ -0,0 +1,289 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Contains core functions for the working of the buttons
4
+ *
5
+ */
6
+
7
+ class WPSR_Buttons{
8
+
9
+ public static function init(){
10
+
11
+ // Register all services ajax action
12
+ add_action( 'wp_ajax_wpsr_service', array( __CLASS__, 'service_action' ) );
13
+
14
+ // Register filter to get the button for given ID
15
+ add_action( 'wpsr_print_button', array( __CLASS__, 'print_button' ), 10, 2 );
16
+
17
+ // Add the common shortcode for the service
18
+ add_shortcode( 'wpsr_button', array( __CLASS__, 'add_shortcode' ) );
19
+
20
+ // Return empty value for v2.x shortcodes
21
+ self::old_shortcodes();
22
+
23
+ }
24
+
25
+ public static function service_action(){
26
+
27
+ $get = self::clean_get();
28
+ $services = WPSR_Services::list_all();
29
+ $service_id = $get[ 'service_id' ];
30
+ $buttons = WPSR_Buttons::list_all();
31
+ $do = $get[ 'do' ];
32
+
33
+ if( !array_key_exists( $service_id, $services ) )
34
+ die( 'Invalid WP Socializer service !' );
35
+
36
+ switch( $do ){
37
+
38
+ // Create a new button
39
+ case 'new':
40
+
41
+ // Generate a new button id
42
+ $button_id = self::generate_button_id( $service_id );
43
+
44
+ $buttons[ $button_id ] = array(
45
+ 'service' => $service_id,
46
+ 'feature' => $get[ 'feature' ],
47
+ 'settings' => array()
48
+ );
49
+
50
+ update_option( 'wpsr_buttons', $buttons );
51
+
52
+ // Create compiled array of details
53
+ $temp = $buttons[ $button_id ];
54
+ $temp[ 'id' ] = $button_id;
55
+ $temp[ 'settings_size' ] = $button_id;
56
+ $html = '';
57
+
58
+ $service = $services[ $service_id ];
59
+ $html .= '<li data-service="' . esc_attr( $service_id ) . '" data-id="' . esc_attr( $button_id ) . '" class="ui_btn">';
60
+ $html .= '<span class="btn_icon"><img src="' . esc_attr( $service['icons'] ) . '" /></span>';
61
+ $html .= '<span class="btn_name">' . $service['name'] . '</span>';
62
+ $html .= '<span class="btn_action btn_delete dashicons dashicons-no-alt" title="' . __( 'Delete button', 'wpsr' ) . '"></span>';
63
+ $html .= '<span class="btn_action btn_edit dashicons dashicons-admin-generic" title="' . __( 'Settings', 'wpsr') . '"></span>';
64
+ $html .= '</li>';
65
+ $temp[ 'html' ] = $html;
66
+
67
+ header('Content-Type: application/json');
68
+ echo json_encode( $temp );
69
+
70
+ break;
71
+
72
+ // Edit existing button
73
+ case 'edit':
74
+
75
+ // Get the button ID from request
76
+ $button_id = $get[ 'button_id' ];
77
+
78
+ // Update Section
79
+ if( $_POST && check_admin_referer( 'wpsr_nonce_service_submit' ) ){
80
+
81
+ $post = self::clean_post();
82
+
83
+ $buttons[ $button_id ] = array(
84
+ 'service' => $service_id,
85
+ 'feature' => $post[ 'feature' ],
86
+ 'settings' => apply_filters( 'wpsr_service_validation_' . $service_id, $post[ 'o' ] )
87
+ );
88
+
89
+ update_option( 'wpsr_buttons', $buttons );
90
+
91
+ }
92
+
93
+ // View Section
94
+ if( !empty( $button_id ) && array_key_exists( $button_id, $buttons ) ){
95
+
96
+ $button = array(
97
+ 'id' => $button_id,
98
+ 'values' => $buttons[ $button_id ][ 'settings' ],
99
+ 'feature' => $buttons[ $button_id ][ 'feature' ]
100
+ );
101
+
102
+ }else{
103
+
104
+ die( 'Invalid button ID !');
105
+
106
+ }
107
+
108
+ // Display the service settings HTML
109
+ self::settings_html( $service_id, $button );
110
+
111
+ break;
112
+
113
+ // Delete button
114
+ case 'delete':
115
+
116
+ // Get the button ID from request
117
+ $button_id = $get[ 'button_id' ];
118
+
119
+ if( !empty( $button_id ) && array_key_exists( $button_id, $buttons ) ){
120
+
121
+ unset( $buttons [ $button_id ] );
122
+
123
+ update_option( 'wpsr_buttons', $buttons );
124
+
125
+ // Print the success character
126
+ echo '1';
127
+
128
+ }else{
129
+
130
+ die( 'Invalid button ID !');
131
+
132
+ }
133
+
134
+ break;
135
+
136
+ }
137
+
138
+ die(0);
139
+
140
+ }
141
+
142
+ public static function settings_html( $service_id, $button ){
143
+
144
+ if( empty( $button[ 'id' ] ) ){
145
+ $save_button = __( 'Create button', 'wpsr' );
146
+ }else{
147
+ $save_button = __( 'Save button settings', 'wpsr' );
148
+ }
149
+
150
+ $form_action = get_admin_url() . "admin-ajax.php?action=wpsr_service&do=edit&service_id=$service_id&button_id=$button[id]&feature=$button[feature]";
151
+
152
+ // Inject feature to view
153
+ $button[ 'values' ][ '_feature' ] = $button[ 'feature' ];
154
+
155
+ // Start HTML output for settings
156
+ echo '<form method="post" action="' . $form_action . '" class="btn_settings_form">';
157
+
158
+ // The title for every button
159
+ echo '<input type="text" placeholder="' . __( 'Name the button for identification', 'wpsr' ) . '" title="' . __( 'Click to edit title', 'wpsr' ) . '" name="o[title]" class="tt_name" value="' . ( isset ( $button[ 'values' ][ 'title' ] ) ? esc_attr( $button[ 'values' ][ 'title' ] ) : '' ). '" />';
160
+
161
+ WPSR_Services::settings( $service_id, $button[ 'values' ] );
162
+
163
+ echo '<input type="hidden" name="button_id" value="' . $button[ 'id' ] . '" />';
164
+ echo '<input type="hidden" name="feature" value="' . $button[ 'feature' ] . '" />';
165
+
166
+ echo '<div class="btn_settings_footer">
167
+ <input class="btn_shortcode" title="' . __( 'Copy shortcode', 'wpsr' ) . '" type="text" value=\'[wpsr_button id="' . $button[ 'id' ] . '"]\' />
168
+ <span class="btn_settings_status">' . __( 'Button settings saved !', 'wpsr' ) . '</span>
169
+ <input type="submit" name="submit" value="' . $save_button .'" class="button button-primary btn_settings_save" />
170
+ </div>';
171
+
172
+ wp_nonce_field( 'wpsr_nonce_service_submit' );
173
+
174
+ echo '</form>';
175
+ }
176
+
177
+ public static function get_button( $id = '', $page_info = array() ){
178
+
179
+ if( empty( $id ) )
180
+ return '';
181
+
182
+ $services = WPSR_Services::list_all();
183
+ $buttons = WPSR_Buttons::list_all();
184
+
185
+ if( !array_key_exists( $id, $buttons ) ){
186
+ return '';
187
+ }
188
+
189
+ $button = $buttons[ $id ];
190
+ $service_id = $button[ 'service' ];
191
+ $service = $services[ $service_id ];
192
+
193
+ // Inject feature name for processing
194
+ $button[ 'settings' ][ '_feature' ] = $button[ 'feature' ];
195
+
196
+ // Get the page info
197
+ $page_info = empty( $page_info ) ? WPSR_Metadata::metadata() : $page_info;
198
+
199
+ // Call the service output function
200
+ $out = WPSR_Services::output( $service_id, $button[ 'settings' ], $page_info );
201
+
202
+ // Apply filters on the output includes and html
203
+ $out = apply_filters( 'wpsr_mod_service_output', $out );
204
+
205
+ // Add to active services list
206
+ WPSR_Services::add_active_service( $service_id );
207
+
208
+ // Add to includes as active
209
+ WPSR_Includes::add_active_includes( $out[ 'includes' ] );
210
+
211
+ return $out[ 'html' ];
212
+
213
+ }
214
+
215
+ public static function print_button( $id, $page_info = array() ){
216
+
217
+ echo self::get_button( $id, $page_info );
218
+
219
+ }
220
+
221
+ public static function add_shortcode( $atts ){
222
+
223
+ $att = shortcode_atts( array(
224
+ 'id' => ''
225
+ ), $atts );
226
+
227
+ if ( empty( $att[ 'id' ] ) ){
228
+ return '';
229
+ }
230
+
231
+ return self::get_button( $att[ 'id' ], '' );
232
+ }
233
+
234
+ public static function list_all(){
235
+ return get_option( 'wpsr_buttons', array() );
236
+ }
237
+
238
+ public static function generate_button_id( $service_id ){
239
+
240
+ $digits = 4;
241
+ $randId = rand( pow( 10, $digits-1 ), pow( 10, $digits ) - 1 );
242
+ return $randId;
243
+
244
+ }
245
+
246
+ public static function clean_get(){
247
+
248
+ foreach( $_GET as $k=>$v ){
249
+ $_GET[$k] = sanitize_text_field( $v );
250
+ }
251
+
252
+ return $_GET;
253
+ }
254
+
255
+ public static function clean_post(){
256
+
257
+ return stripslashes_deep( $_POST );
258
+
259
+ }
260
+
261
+ public static function old_shortcodes(){
262
+
263
+ // Returning empty for the old v2.x shortcodes
264
+
265
+ add_shortcode( 'wpsr_socialbts', array( __CLASS__, 'old_buttons' ) );
266
+ add_shortcode( 'wpsr_addthis', array( __CLASS__, 'old_buttons' ) );
267
+ add_shortcode( 'wpsr_sharethis', array( __CLASS__, 'old_buttons' ));
268
+ add_shortcode( 'wpsr_retweet', array( __CLASS__, 'old_buttons' ) );
269
+ add_shortcode( 'wpsr_buzz', array( __CLASS__, 'old_buttons' ) );
270
+ add_shortcode( 'wpsr_plusone', array( __CLASS__, 'old_buttons' ) );
271
+ add_shortcode( 'wpsr_digg', array( __CLASS__, 'old_buttons' ) );
272
+ add_shortcode( 'wpsr_facebook', array( __CLASS__, 'old_buttons' ) );
273
+ add_shortcode( 'wpsr_stumbleupon', array( __CLASS__, 'old_buttons' ) );
274
+ add_shortcode( 'wpsr_reddit', array( __CLASS__, 'old_buttons' ) );
275
+ add_shortcode( 'wpsr_linkedin', array( __CLASS__, 'old_buttons' ) );
276
+ add_shortcode( 'wpsr_pinterest', array( __CLASS__, 'old_buttons' ) );
277
+ add_shortcode( 'wpsr_commentsbt', array( __CLASS__, 'old_buttons' ) );
278
+
279
+ }
280
+
281
+ public static function old_buttons(){
282
+ return '';
283
+ }
284
+
285
+ }
286
+
287
+ WPSR_Buttons::init();
288
+
289
+ ?>
core/includes.php ADDED
@@ -0,0 +1,194 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Controls the script and styles to be printed on page
4
+ *
5
+ */
6
+
7
+ class WPSR_Includes{
8
+
9
+ private static $all_includes = array();
10
+ private static $active_includes = array();
11
+
12
+ public static function init(){
13
+
14
+ // The default includes for template
15
+ self::register( array(
16
+ 'main_css' => array(
17
+ 'type' => 'css',
18
+ 'link' => WPSR_URL . 'public/css/wp-socializer.min.css',
19
+ 'deps' => array()
20
+ ),
21
+
22
+ 'main_js' => array(
23
+ 'type' => 'js',
24
+ 'link' => WPSR_URL . 'public/js/wp-socializer.min.js',
25
+ 'deps' => array()
26
+ )
27
+
28
+ ));
29
+
30
+ self::add_active_includes( array( 'main_css', 'main_js' ) );
31
+
32
+ // Print CSS in header
33
+ add_action( 'wp_enqueue_scripts' , array( __CLASS__, 'print_styles' ) );
34
+
35
+ // Print scripts in footer
36
+ add_action( 'wp_footer', array( __CLASS__, 'print_scripts' ) );
37
+
38
+ }
39
+
40
+ public static function register( $includes ){
41
+
42
+ if( is_array( $includes ) ){
43
+ foreach( $includes as $inc_id => $inc_info ){
44
+ if( !array_key_exists( $inc_id, self::$all_includes ) ){
45
+
46
+ self::$all_includes[ $inc_id ] = $inc_info;
47
+
48
+ $deps = array();
49
+ if( isset( $inc_info[ 'deps' ] ) ){
50
+ $deps = $inc_info[ 'deps' ];
51
+ }
52
+
53
+ if( $inc_info[ 'type' ] == 'js' ){
54
+ if( isset( $inc_info[ 'link' ] ) ){
55
+ wp_register_script( 'wpsr_' . $inc_id, $inc_info[ 'link' ], $deps );
56
+ }
57
+ }elseif( $inc_info[ 'type' ] == 'css' ){
58
+ if( isset( $inc_info[ 'link' ] ) ){
59
+ wp_register_style( 'wpsr_' . $inc_id, $inc_info[ 'link' ], $deps );
60
+ }
61
+ }
62
+ }
63
+ }
64
+ }
65
+
66
+ }
67
+
68
+ public static function list_all(){
69
+
70
+ return apply_filters( 'wpsr_mod_includes_list', self::$all_includes );
71
+
72
+ }
73
+
74
+ public static function add_active_includes( $include_ids ){
75
+
76
+ $includes = self::list_all();
77
+
78
+ foreach( $include_ids as $inc_id ){
79
+ if( array_key_exists( $inc_id, $includes ) && !in_array( $inc_id, self::$active_includes ) ){
80
+ array_push( self::$active_includes, $inc_id );
81
+ }
82
+ }
83
+
84
+ }
85
+
86
+ public static function active_includes(){
87
+
88
+ return apply_filters( 'wpsr_mod_includes_active', self::$active_includes );
89
+
90
+ }
91
+
92
+ public static function print_scripts(){
93
+
94
+ $includes = self::list_all();
95
+ $active_includes = self::active_includes();
96
+
97
+ echo "\n<!-- WP Socializer " . WPSR_VERSION . " - JS - Start -->\n";
98
+ foreach( $active_includes as $a_inc ){
99
+ if( array_key_exists( $a_inc, $includes ) ){
100
+ $inc_info = $includes[ $a_inc ];
101
+ if( $inc_info[ 'type' ] == 'js' ){
102
+
103
+ if( array_key_exists( 'link', $inc_info ) ){
104
+ wp_enqueue_script( 'wpsr_' . $a_inc );
105
+ }elseif( array_key_exists( 'code', $inc_info ) ){
106
+
107
+ if( isset( $inc_info[ 'deps' ] ) ){
108
+ foreach( $inc_info[ 'deps' ] as $dep_handle ){
109
+ wp_enqueue_script( $inc_info[ 'deps' ] );
110
+ }
111
+ }
112
+
113
+ echo $inc_info[ 'code' ];
114
+ }
115
+
116
+ }
117
+ }
118
+ }
119
+ echo "\n<!-- WP Socializer - JS - End -->\n";
120
+
121
+ $gs = get_option( 'wpsr_general_settings' );
122
+ $gs = wp_parse_args( $gs, WPSR_Lists::defaults( 'gsettings_misc' ) );
123
+
124
+ if( trim( $gs[ 'misc_additional_css' ] ) != '' ){
125
+ echo "<!-- WP Socializer - Custom CSS rules - Start --><style>" . $gs[ 'misc_additional_css' ] . "</style><!-- WP Socializer - Custom CSS rules - End -->\n";
126
+ }
127
+
128
+ }
129
+
130
+ public static function print_styles(){
131
+
132
+ // Forcefully include all CSS includes
133
+ $includes = self::list_all();
134
+
135
+ foreach( $includes as $inc_id => $inc_info ){
136
+
137
+ if( $inc_info[ 'type' ] == 'css' ){
138
+
139
+ if( isset( $inc_info[ 'link' ] ) ){
140
+ wp_enqueue_style( 'wpsr_' . $inc_id, $inc_info[ 'link' ] );
141
+ }
142
+
143
+ if( isset( $inc_info[ 'code' ] ) ){
144
+ echo '<style type="text/css">' . wp_strip_all_tags( $inc_info[ 'code' ] ) . '</style>';
145
+ }
146
+
147
+ }
148
+ }
149
+
150
+ }
151
+
152
+ public static function preview_print_includes(){
153
+
154
+ $includes = self::list_all();
155
+ $active_includes = self::active_includes();
156
+
157
+ // Include all CSS forcefully
158
+ foreach( $includes as $inc_id => $inc_info ){
159
+
160
+ if( $inc_info[ 'type' ] == 'css' ){
161
+
162
+ if( isset( $inc_info[ 'link' ] ) ){
163
+ echo '<link rel="stylesheet" id="' . $inc_id . '" href="' . $inc_info[ 'link' ] . '" type="text/css"/>'. "\n";
164
+ }
165
+
166
+ if( isset( $inc_info[ 'code' ] ) ){
167
+ echo '<style type="text/css">' . wp_strip_all_tags( $inc_info[ 'code' ] ) . '</style>';
168
+ }
169
+
170
+ }
171
+ }
172
+
173
+ foreach( $active_includes as $a_inc ){
174
+ if( array_key_exists( $a_inc, $includes ) ){
175
+ $inc_info = $includes[ $a_inc ];
176
+ if( $inc_info[ 'type' ] == 'js' ){
177
+
178
+ if( array_key_exists( 'link', $inc_info ) ){
179
+ echo '<script src="' . $inc_info[ 'link' ] . '"></script>' . "\n";
180
+ }elseif( array_key_exists( 'code', $inc_info ) ){
181
+ echo $inc_info[ 'code' ];
182
+ }
183
+
184
+ }
185
+ }
186
+ }
187
+
188
+ }
189
+
190
+ }
191
+
192
+ WPSR_Includes::init();
193
+
194
+ ?>
core/lists.php ADDED
@@ -0,0 +1,915 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * List of social media sites for social buttons, sharethis, default values for admin pages and list of external resoruces
4
+ *
5
+ */
6
+
7
+ class WPSR_Lists{
8
+
9
+ public static function init(){
10
+ // Nothing to Init
11
+ }
12
+
13
+ public static function ext_res( $name = 'all' ){
14
+
15
+ $res = array(
16
+ 'font-awesome' => 'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css',
17
+ 'socializer-css' => 'https://cdn.rawgit.com/vaakash/socializer/01252dd4/css/socializer.min.css',
18
+ 'socializer-js' => 'https://cdn.rawgit.com/vaakash/socializer/01252dd4/js/socializer.min.js',
19
+ 'socializer-api' => 'https://cdn.rawgit.com/vaakash/socializer/01252dd4/misc/api.json',
20
+ 'wp-socializer-cl' => 'https://raw.githubusercontent.com/vaakash/aakash-web/master/misc/wp-socializer/changelog/',
21
+ 'jquery' => 'https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js',
22
+ 'help' => 'https://raw.githubusercontent.com/vaakash/aakash-web/master/misc/wp-socializer/help.html'
23
+ );
24
+
25
+ if( array_key_exists( $name, $res ) ){
26
+ return $res[ $name ];
27
+ }elseif( $name == 'all' ){
28
+ return $res;
29
+ }else{
30
+ return '';
31
+ }
32
+
33
+ }
34
+
35
+ public static function social_buttons(){
36
+
37
+ $g_settings = get_option( 'wpsr_general_settings' );
38
+ $g_settings = wp_parse_args( $g_settings, self::defaults( 'gsettings_socialbuttons' ) );
39
+
40
+ return apply_filters( 'wpsr_mod_social_buttons_list', array(
41
+ 'addtofavorites' => array(
42
+ 'name' => 'Add to favorites',
43
+ 'title' => 'Add to favorites',
44
+ 'icon' => 'star',
45
+ 'link' => '#',
46
+ 'onclick' => 'socializer_addbookmark(event)',
47
+ 'options' => array(),
48
+ 'features' => array( 'for_share', 'requires_js' ),
49
+ 'colors' => array( '#F9A600' ),
50
+ ),
51
+
52
+ 'behance' => array(
53
+ 'name' => 'Behance',
54
+ 'title' => __('', 'wpsr') . 'Behance',
55
+ 'icon' => 'behance',
56
+ 'link' => 'https://www.behance.net/',
57
+ 'options' => array(),
58
+ 'features' => array( 'for_profile' ),
59
+ 'colors' => array( '#1769ff' ),
60
+ ),
61
+
62
+ 'bitbucket' => array(
63
+ 'name' => 'Bitbucket',
64
+ 'title' => __('', 'wpsr') . 'Bitbucket',
65
+ 'icon' => 'bitbucket',
66
+ 'link' => 'https://bitbucket.org/',
67
+ 'options' => array(),
68
+ 'features' => array( 'for_profile' ),
69
+ 'colors' => array( '#205081' ),
70
+ ),
71
+
72
+ 'blogger' => array(
73
+ 'name' => 'Blogger',
74
+ 'title' => __('Post this on ', 'wpsr') . 'Blogger',
75
+ 'icon' => 'rss-square',
76
+ 'link' => 'https://www.blogger.com/blog-this.g?u={url}&n={title}&t={excerpt}',
77
+ 'options' => array(),
78
+ 'features' => array( 'for_share', 'for_tsb' ),
79
+ 'colors' => array( '#FF6501' ),
80
+ ),
81
+
82
+ 'codepen' => array(
83
+ 'name' => 'CodePen',
84
+ 'title' => __('', 'wpsr') . 'CodePen',
85
+ 'icon' => 'codepen',
86
+ 'link' => 'https://codepen.io/',
87
+ 'options' => array(),
88
+ 'features' => array( 'for_profile' ),
89
+ 'colors' => array( '#000' ),
90
+ ),
91
+
92
+ 'comments' => array(
93
+ 'name' => 'Comments',
94
+ 'title' => __('', 'wpsr') . 'Comments',
95
+ 'icon' => 'comments',
96
+ 'link' => '#',
97
+ 'onclick' => 'document.querySelector(\'' . $g_settings[ 'sb_comment_sec' ] . '\').scrollIntoView(true);',
98
+ 'options' => array(),
99
+ 'features' => array( 'internal', 'for_tsb' ),
100
+ 'colors' => array( '#333' ),
101
+ ),
102
+
103
+ 'delicious' => array(
104
+ 'name' => 'Delicious',
105
+ 'title' => __('Post this on ', 'wpsr') . 'Delicious',
106
+ 'icon' => 'delicious',
107
+ 'link' => 'https://delicious.com/post?url={url}&title={title}&notes={excerpt}',
108
+ 'options' => array(),
109
+ 'features' => array( 'for_share' ),
110
+ 'colors' => array( '#3274D1' ),
111
+ ),
112
+
113
+ 'deviantart' => array(
114
+ 'name' => 'DeviantArt',
115
+ 'title' => __('', 'wpsr') . 'DeviantArt',
116
+ 'icon' => 'deviantart',
117
+ 'link' => 'https://deviantart.com/',
118
+ 'options' => array(),
119
+ 'features' => array( 'for_profile' ),
120
+ 'colors' => array( '#475c4d' ),
121
+ ),
122
+
123
+ 'digg' => array(
124
+ 'name' => 'Digg',
125
+ 'title' => __('Submit this to ', 'wpsr') . 'Digg',
126
+ 'icon' => 'digg',
127
+ 'link' => 'https://digg.com/submit?url={url}&title={title}',
128
+ 'options' => array(),
129
+ 'features' => array( 'for_share' ),
130
+ 'colors' => array( '#000' ),
131
+ ),
132
+
133
+ 'dribbble' => array(
134
+ 'name' => 'Dribbble',
135
+ 'title' => __('', 'wpsr') . 'Dribble',
136
+ 'icon' => 'dribbble',
137
+ 'link' => 'https://dribbble.com/',
138
+ 'options' => array(),
139
+ 'features' => array( 'for_profile' ),
140
+ 'colors' => array( '#ea4c89' ),
141
+ ),
142
+
143
+ 'email' => array(
144
+ 'name' => 'Email',
145
+ 'title' => __('Email this ', 'wpsr') . '',
146
+ 'icon' => 'envelope',
147
+ 'link' => 'mailto:?to=&subject={title}&body={excerpt}%20-%20{url}',
148
+ 'options' => array(),
149
+ 'features' => array( 'for_share', 'for_tsb' ),
150
+ 'colors' => array( '#000' ),
151
+ ),
152
+
153
+ 'facebook' => array(
154
+ 'name' => 'Facebook',
155
+ 'title' => __('Share this on ', 'wpsr') . 'Facebook',
156
+ 'icon' => 'facebook',
157
+ 'link' => 'https://www.facebook.com/share.php?u={url}',
158
+ 'link_tsb' => 'https://www.facebook.com/share.php?u={url}&quote={excerpt}',
159
+ 'options' => array( 'count' ),
160
+ 'features' => array( 'for_share', 'for_profile', 'for_tsb' ),
161
+ 'colors' => array( '#3e5b98' ),
162
+ ),
163
+
164
+ 'fbmessenger' => array(
165
+ 'name' => 'Facebook messenger',
166
+ 'title' => __('', 'wpsr') . 'Facebook messenger',
167
+ 'icon' => 'comment',
168
+ 'link' => 'fb-messenger://share?link={url}',
169
+ 'options' => array(),
170
+ 'features' => array( 'mobile_only' ),
171
+ 'colors' => array( '#2998ff' ),
172
+ ),
173
+
174
+ 'flickr' => array(
175
+ 'name' => 'Flickr',
176
+ 'title' => __('', 'wpsr') . 'Flickr',
177
+ 'icon' => 'flickr',
178
+ 'link' => 'https://www.flickr.com',
179
+ 'options' => array(),
180
+ 'features' => array( 'for_profile' ),
181
+ 'colors' => array( '#1c9be9' ),
182
+ ),
183
+
184
+ 'github' => array(
185
+ 'name' => 'Github',
186
+ 'title' => __('', 'wpsr') . 'Github',
187
+ 'icon' => 'github',
188
+ 'link' => 'https://www.github.com/',
189
+ 'options' => array(),
190
+ 'features' => array( 'for_profile' ),
191
+ 'colors' => array( '#333' ),
192
+ ),
193
+
194
+ 'google' => array(
195
+ 'name' => 'Google',
196
+ 'title' => __('Bookmark this on ', 'wpsr') . 'Google','',
197
+ 'icon' => 'google',
198
+ 'link' => 'https://www.google.com/bookmarks/mark?op=edit&bkmk={url}&title={title}&annotation={excerpt}',
199
+ 'options' => array(),
200
+ 'features' => array( 'for_share', 'for_tsb' ),
201
+ 'colors' => array( '#3A7CEC' ),
202
+ ),
203
+
204
+ 'googleplus' => array(
205
+ 'name' => 'Google Plus',
206
+ 'title' => __('Share this on ', 'wpsr') . 'Google Plus',
207
+ 'icon' => 'google-plus',
208
+ 'link' => 'https://plus.google.com/share?url={url}',
209
+ 'options' => array( 'count' ),
210
+ 'features' => array( 'for_share', 'for_profile' ),
211
+ 'colors' => array( '#DB483B' ),
212
+ ),
213
+
214
+ 'hackernews' => array(
215
+ 'name' => 'Hacker News',
216
+ 'title' => __('Share this on ', 'wpsr') . 'HackerNews',
217
+ 'icon' => 'hacker-news',
218
+ 'link' => 'https://news.ycombinator.com/submitlink?u={url}&t={title}',
219
+ 'options' => array(),
220
+ 'features' => array( 'for_share' ),
221
+ 'colors' => array( '#FF6500' ),
222
+ ),
223
+
224
+ 'instagram' => array(
225
+ 'name' => 'Instagram',
226
+ 'title' => __('', 'wpsr') . 'Instagram',
227
+ 'icon' => 'instagram',
228
+ 'link' => 'https://instagram.com',
229
+ 'options' => array(),
230
+ 'features' => array( 'for_profile' ),
231
+ 'colors' => array( '#0d3c5f' ),
232
+ ),
233
+
234
+ 'linkedin' => array(
235
+ 'name' => 'LinkedIn',
236
+ 'title' => __('Add this to ', 'wpsr') . 'LinkedIn',
237
+ 'icon' => 'linkedin',
238
+ 'link' => 'https://www.linkedin.com/shareArticle?mini=true&url={url}&title={title}&summary={excerpt}',
239
+ 'options' => array( 'count' ),
240
+ 'features' => array( 'for_share', 'for_profile', 'for_tsb' ),
241
+ 'colors' => array( '#0274B3' ),
242
+ ),
243
+
244
+ 'medium' => array(
245
+ 'name' => 'Medium',
246
+ 'title' => __('', 'wpsr') . 'Medium',
247
+ 'icon' => 'medium',
248
+ 'link' => 'https://medium.com',
249
+ 'options' => array(),
250
+ 'features' => array( 'for_profile' ),
251
+ 'colors' => array( '#02b875' ),
252
+ ),
253
+
254
+ 'paypal' => array(
255
+ 'name' => 'PayPal',
256
+ 'title' => __('', 'wpsr') . 'PayPal',
257
+ 'icon' => 'paypal',
258
+ 'link' => 'https://paypal.com',
259
+ 'options' => array(),
260
+ 'features' => array( 'for_profile' ),
261
+ 'colors' => array( '#0070ba' ),
262
+ ),
263
+
264
+ 'flickr' => array(
265
+ 'name' => 'Flickr',
266
+ 'title' => __('', 'wpsr') . 'Flickr',
267
+ 'icon' => 'flickr',
268
+ 'link' => 'https://www.flickr.com',
269
+ 'options' => array(),
270
+ 'features' => array( 'for_profile' ),
271
+ 'colors' => array( '#1c9be9' ),
272
+ ),
273
+
274
+ 'pdf' => array(
275
+ 'name' => 'PDF',
276
+ 'title' => __('Convert to ', 'wpsr') . 'PDF',
277
+ 'icon' => 'file-pdf-o',
278
+ 'link' => 'https://www.printfriendly.com/print?url={url}',
279
+ 'options' => array(),
280
+ 'features' => array( 'for_share' ),
281
+ 'colors' => array( '#E61B2E' ),
282
+ ),
283
+
284
+ 'pinterest' => array(
285
+ 'name' => 'Pinterest',
286
+ 'title' => __('Submit this to ', 'wpsr') . 'Pinterest',
287
+ 'icon' => 'pinterest',
288
+ 'link' => 'https://www.pinterest.com/pin/create/button/?url={url}&media={image}&description={excerpt}',
289
+ 'options' => array( 'count' ),
290
+ 'features' => array( 'for_share', 'for_profile', 'for_tsb' ),
291
+ 'colors' => array( '#CB2027' ),
292
+ ),
293
+
294
+ 'pocket' => array(
295
+ 'name' => 'Pocket',
296
+ 'title' => __('Submit this to ', 'wpsr') . 'Pocket',
297
+ 'icon' => 'get-pocket',
298
+ 'link' => 'https://getpocket.com/save?url={url}&title={title}',
299
+ 'options' => array(),
300
+ 'features' => array( 'for_share' ),
301
+ 'colors' => array( '#EF4056' ),
302
+ ),
303
+
304
+ 'print' => array(
305
+ 'name' => 'Print',
306
+ 'title' => __('Print this article ', 'wpsr') . '',
307
+ 'icon' => 'print',
308
+ 'link' => 'https://www.printfriendly.com/print?url={url}',
309
+ 'options' => array(),
310
+ 'features' => array( 'for_share' ),
311
+ 'colors' => array( '#6D9F00' ),
312
+ ),
313
+
314
+ 'reddit' => array(
315
+ 'name' => 'Reddit',
316
+ 'title' => __('Submit this to ', 'wpsr') . 'Reddit',
317
+ 'icon' => 'reddit',
318
+ 'link' => 'https://reddit.com/submit?url={url}&title={title}',
319
+ 'options' => array(),
320
+ 'features' => array( 'for_share' ),
321
+ 'colors' => array( '#FF5600' ),
322
+ ),
323
+
324
+ 'rss' => array(
325
+ 'name' => 'RSS',
326
+ 'title' => __('Subscribe to ', 'wpsr') . 'RSS',
327
+ 'icon' => 'rss',
328
+ 'link' => '{rss-url}',
329
+ 'options' => array(),
330
+ 'features' => array( 'internal' ),
331
+ 'colors' => array( '#FF7B0A' ),
332
+ ),
333
+
334
+ 'shortlink' => array(
335
+ 'name' => 'Short link',
336
+ 'title' => __('', 'wpsr') . 'Short link',
337
+ 'icon' => 'link',
338
+ 'link' => '{s-url}',
339
+ 'onclick' => 'socializer_shortlink( event, this )',
340
+ 'options' => array(),
341
+ 'features' => array( 'internal', 'requires_js' ),
342
+ 'colors' => array( '#333' ),
343
+ ),
344
+
345
+ 'snapchat' => array(
346
+ 'name' => 'Snapchat',
347
+ 'title' => __('', 'wpsr') . 'Snapchat',
348
+ 'icon' => 'snapchat',
349
+ 'link' => 'https://snapchat.com',
350
+ 'options' => array(),
351
+ 'features' => array( 'for_profile' ),
352
+ 'colors' => array( '#FFFC00' ),
353
+ ),
354
+
355
+ 'soundcloud' => array(
356
+ 'name' => 'Soundcloud',
357
+ 'title' => __('', 'wpsr') . 'Soundcloud',
358
+ 'icon' => 'soundcloud',
359
+ 'link' => 'https://soundcloud.com/',
360
+ 'options' => array(),
361
+ 'features' => array( 'for_profile' ),
362
+ 'colors' => array( '#f50' ),
363
+ ),
364
+
365
+ 'stackoverflow' => array(
366
+ 'name' => 'StackOverflow',
367
+ 'title' => __('', 'wpsr') . 'StackOverflow',
368
+ 'icon' => 'stack-overflow',
369
+ 'link' => 'https://stackoverflow.com/',
370
+ 'options' => array(),
371
+ 'features' => array( 'for_profile' ),
372
+ 'colors' => array( '#F48024' ),
373
+ ),
374
+
375
+ 'stumbleupon' => array(
376
+ 'name' => 'StumbleUpon',
377
+ 'title' => __('Submit this to ', 'wpsr') . 'StumbleUpon',
378
+ 'icon' => 'stumbleupon',
379
+ 'link' => 'https://www.stumbleupon.com/submit?url={url}&title={title}',
380
+ 'options' => array( 'count' ),
381
+ 'features' => array( 'for_share' ),
382
+ 'colors' => array( '#EB4823' ),
383
+ ),
384
+
385
+ 'quora' => array(
386
+ 'name' => 'Quora',
387
+ 'title' => __('', 'wpsr') . 'Quora',
388
+ 'icon' => 'quora',
389
+ 'link' => 'https://www.quora.com',
390
+ 'options' => array(),
391
+ 'features' => array( 'for_profile' ),
392
+ 'colors' => array( '#b92b27' ),
393
+ ),
394
+
395
+ 'telegram' => array(
396
+ 'name' => 'Telegram',
397
+ 'title' => __('', 'wpsr') . 'Telegram',
398
+ 'icon' => 'telegram',
399
+ 'link' => 'https://telegram.me/share/url?url={url}&text={title}',
400
+ 'options' => array(),
401
+ 'features' => array( 'mobile_only' ),
402
+ 'colors' => array( '#179cde' ),
403
+ ),
404
+
405
+ 'tumblr' => array(
406
+ 'name' => 'Tumblr',
407
+ 'title' => __('Share this on ', 'wpsr') . 'Tumblr',
408
+ 'icon' => 'tumblr',
409
+ 'link' => 'https://www.tumblr.com/share?v=3&u={url}&t={title}&s={excerpt}',
410
+ 'options' => array(),
411
+ 'features' => array( 'for_share', 'for_tsb' ),
412
+ 'colors' => array( '#314358' ),
413
+ ),
414
+
415
+ 'twitter' => array(
416
+ 'name' => 'Twitter',
417
+ 'title' => __('Tweet this !', 'wpsr') . '',
418
+ 'icon' => 'twitter',
419
+ 'link' => 'https://twitter.com/home?status={title}%20-%20{s-url}%20{twitter-username}',
420
+ 'link_tsb' => 'https://twitter.com/home?status={excerpt}%20-%20{s-url}%20{twitter-username}',
421
+ 'options' => array(),
422
+ 'features' => array( 'for_share', 'for_profile', 'for_tsb' ),
423
+ 'colors' => array( '#4da7de' ),
424
+ ),
425
+
426
+ 'vimeo' => array(
427
+ 'name' => 'Vimeo',
428
+ 'title' => __('', 'wpsr') . 'Vimeo',
429
+ 'icon' => 'vimeo',
430
+ 'link' => 'https://vimeo.com',
431
+ 'options' => array(),
432
+ 'features' => array( 'for_profile' ),
433
+ 'colors' => array( '#00ADEF' ),
434
+ ),
435
+
436
+ 'vkontakte' => array(
437
+ 'name' => 'VKontakte',
438
+ 'title' => __('Share this on ', 'wpsr') . 'VKontakte',
439
+ 'icon' => 'vk',
440
+ 'link' => 'https://vk.com/share.php?url={url}&title={title}&description={excerpt}',
441
+ 'options' => array(),
442
+ 'features' => array( 'for_share', 'for_tsb' ),
443
+ 'colors' => array( '#4C75A3' ),
444
+ ),
445
+
446
+ 'wechat' => array(
447
+ 'name' => 'wechat',
448
+ 'title' => __('', 'wpsr') . 'WeChat',
449
+ 'icon' => 'wechat',
450
+ 'link' => 'weixin://dl/chat?text={url}',
451
+ 'options' => array(),
452
+ 'features' => array( 'mobile_only' ),
453
+ 'colors' => array( '#7BB32E' ),
454
+ ),
455
+
456
+ 'whatsapp' => array(
457
+ 'name' => 'WhatsApp',
458
+ 'title' => __('', 'wpsr') . 'WhatsApp',
459
+ 'icon' => 'whatsapp',
460
+ 'link' => 'whatsapp://send?text={url}',
461
+ 'options' => array(),
462
+ 'features' => array( 'mobile_only' ),
463
+ 'colors' => array( '#60b82d' ),
464
+ ),
465
+
466
+ 'xing' => array(
467
+ 'name' => 'Xing',
468
+ 'title' => __('Share this on ', 'wpsr') . 'Xing',
469
+ 'icon' => 'xing',
470
+ 'link' => 'https://www.xing.com/app/user?op=share&url={url}',
471
+ 'options' => array(),
472
+ 'features' => array( 'for_share' ),
473
+ 'colors' => array( '#006567' ),
474
+ ),
475
+
476
+ 'yahoomail' => array(
477
+ 'name' => 'Yahoo! Mail',
478
+ 'title' => __('Add this to ', 'wpsr') . 'Yahoo! Mail',
479
+ 'icon' => 'yahoo',
480
+ 'link' => 'https://compose.mail.yahoo.com/?body={excerpt}%20-%20{url}&subject={title}',
481
+ 'options' => array(),
482
+ 'features' => array( 'for_share', 'for_tsb' ),
483
+ 'colors' => array( '#4A00A1' ),
484
+ ),
485
+
486
+ 'youtube' => array(
487
+ 'name' => 'Youtube',
488
+ 'title' => __('', 'wpsr') . 'Youtube',
489
+ 'icon' => 'youtube',
490
+ 'link' => 'https://youtube.com/',
491
+ 'options' => array(),
492
+ 'features' => array( 'for_profile' ),
493
+ 'colors' => array( '#cc181e' ),
494
+ ),
495
+
496
+ ));
497
+
498
+ }
499
+
500
+ public static function sharethis(){
501
+
502
+ return apply_filters( 'wpsr_mod_sharethis_list', array(
503
+ 'fbsend' => array(
504
+ 'name' => 'Facebook Send'
505
+ ),
506
+ 'fbsub' => array(
507
+ 'name' => 'Facebook Subscribe'
508
+ ),
509
+ 'foursquaresave' => array(
510
+ 'name' => 'Foursquare Save'
511
+ ),
512
+ 'foursquarefollow' => array(
513
+ 'name' => 'Foursquare Follow'
514
+ ),
515
+ 'instagram' => array(
516
+ 'name' => 'Instagram Badge'
517
+ ),
518
+ 'plusone' => array(
519
+ 'name' => 'Google +1'
520
+ ),
521
+ 'pinterestfollow' => array(
522
+ 'name' => 'Pinterest Follow'
523
+ ),
524
+ 'twitterfollow' => array(
525
+ 'name' => 'Twitter Follow'
526
+ ),
527
+ 'youtube' => array(
528
+ 'name' => 'Youtube Subscribe'
529
+ ),
530
+ 'email' => array(
531
+ 'name' => 'Email'
532
+ ),
533
+ 'pinterest' => array(
534
+ 'name' => 'Pinterest'
535
+ ),
536
+ 'linkedin' => array(
537
+ 'name' => 'LinkedIn'
538
+ ),
539
+ 'twitter' => array(
540
+ 'name' => 'Twitter'
541
+ ),
542
+ 'facebook' => array(
543
+ 'name' => 'Facebook'
544
+ ),
545
+ 'sharethis' => array(
546
+ 'name' => 'ShareThis'
547
+ ),
548
+ 'googleplus' => array(
549
+ 'name' => 'Google +'
550
+ ),
551
+ 'adfty' => array(
552
+ 'name' => 'Adfty'
553
+ ),
554
+ 'allvoices' => array(
555
+ 'name' => 'Allvoices'
556
+ ),
557
+ 'amazon_wishlist' => array(
558
+ 'name' => 'Amazon Wishlist'
559
+ ),
560
+ 'arto' => array(
561
+ 'name' => 'Arto'
562
+ ),
563
+ 'att' => array(
564
+ 'name' => 'AT&T'
565
+ ),
566
+ 'baidu' => array(
567
+ 'name' => 'Baidu'
568
+ ),
569
+ 'blinklist' => array(
570
+ 'name' => 'Blinklist'
571
+ ),
572
+ 'blip' => array(
573
+ 'name' => 'Blip'
574
+ ),
575
+ 'blogmarks' => array(
576
+ 'name' => 'Blogmarks'
577
+ ),
578
+ 'blogger' => array(
579
+ 'name' => 'Blogger'
580
+ ),
581
+ 'buddymarks' => array(
582
+ 'name' => 'BuddyMarks'
583
+ ),
584
+ 'buffer' => array(
585
+ 'name' => 'Buffer'
586
+ ),
587
+ 'care2' => array(
588
+ 'name' => 'Care2'
589
+ ),
590
+ 'chiq' => array(
591
+ 'name' => 'chiq'
592
+ ),
593
+ 'citeulike' => array(
594
+ 'name' => 'CiteULike'
595
+ ),
596
+ 'corkboard' => array(
597
+ 'name' => 'Corkboard'
598
+ ),
599
+ 'dealsplus' => array(
600
+ 'name' => 'Dealspl.us'
601
+ ),
602
+ 'delicious' => array(
603
+ 'name' => 'Delicious'
604
+ ),
605
+ 'digg' => array(
606
+ 'name' => 'Digg'
607
+ ),
608
+ 'diigo' => array(
609
+ 'name' => 'Diigo'
610
+ ),
611
+ 'dzone' => array(
612
+ 'name' => 'DZone'
613
+ ),
614
+ 'edmodo' => array(
615
+ 'name' => 'Edmodo'
616
+ ),
617
+ 'embed_ly' => array(
618
+ 'name' => 'Embed.ly'
619
+ ),
620
+ 'evernote' => array(
621
+ 'name' => 'Evernote'
622
+ ),
623
+ 'fark' => array(
624
+ 'name' => 'Fark'
625
+ ),
626
+ 'fashiolista' => array(
627
+ 'name' => 'Fashiolista'
628
+ ),
629
+ 'flipboard' => array(
630
+ 'name' => 'Flipboard'
631
+ ),
632
+ 'folkd' => array(
633
+ 'name' => 'folkd.com'
634
+ ),
635
+ 'foodlve' => array(
636
+ 'name' => 'FoodLve'
637
+ ),
638
+ 'fresqui' => array(
639
+ 'name' => 'Fresqui'
640
+ ),
641
+ 'friendfeed' => array(
642
+ 'name' => 'FriendFeed'
643
+ ),
644
+ 'funp' => array(
645
+ 'name' => 'Funp'
646
+ ),
647
+ 'fwisp' => array(
648
+ 'name' => 'fwisp'
649
+ ),
650
+ 'google' => array(
651
+ 'name' => 'Google'
652
+ ),
653
+ 'google_bmarks' => array(
654
+ 'name' => 'Bookmarks'
655
+ ),
656
+ 'google_reader' => array(
657
+ 'name' => 'Google Reader'
658
+ ),
659
+ 'google_translate' => array(
660
+ 'name' => 'Google Translate'
661
+ ),
662
+ 'hatena' => array(
663
+ 'name' => 'Hatena'
664
+ ),
665
+ 'instapaper' => array(
666
+ 'name' => 'Instapaper'
667
+ ),
668
+ 'jumptags' => array(
669
+ 'name' => 'Jumptags'
670
+ ),
671
+ 'kaboodle' => array(
672
+ 'name' => 'Kaboodle'
673
+ ),
674
+ 'kik' => array(
675
+ 'name' => 'Kik'
676
+ ),
677
+ 'linkagogo' => array(
678
+ 'name' => 'linkaGoGo'
679
+ ),
680
+ 'livejournal' => array(
681
+ 'name' => 'LiveJournal'
682
+ ),
683
+ 'mail_ru' => array(
684
+ 'name' => 'mail.ru'
685
+ ),
686
+ 'meneame' => array(
687
+ 'name' => 'Meneame'
688
+ ),
689
+ 'messenger' => array(
690
+ 'name' => 'Messenger'
691
+ ),
692
+ 'mister_wong' => array(
693
+ 'name' => 'Mr Wong'
694
+ ),
695
+ 'moshare' => array(
696
+ 'name' => 'moShare'
697
+ ),
698
+ 'myspace' => array(
699
+ 'name' => 'MySpace'
700
+ ),
701
+ 'n4g' => array(
702
+ 'name' => 'N4G'
703
+ ),
704
+ 'netlog' => array(
705
+ 'name' => 'Netlog'
706
+ ),
707
+ 'netvouz' => array(
708
+ 'name' => 'Netvouz'
709
+ ),
710
+ 'newsvine' => array(
711
+ 'name' => 'Newsvine'
712
+ ),
713
+ 'nujij' => array(
714
+ 'name' => 'NUjij'
715
+ ),
716
+ 'odnoklassniki' => array(
717
+ 'name' => 'Odnoklassniki'
718
+ ),
719
+ 'oknotizie' => array(
720
+ 'name' => 'Oknotizie'
721
+ ),
722
+ 'pocket' => array(
723
+ 'name' => 'Pocket'
724
+ ),
725
+ 'print' => array(
726
+ 'name' => 'Print'
727
+ ),
728
+ 'raise_your_voice' => array(
729
+ 'name' => 'Raise Your Voice'
730
+ ),
731
+ 'reddit' => array(
732
+ 'name' => 'Reddit'
733
+ ),
734
+ 'segnalo' => array(
735
+ 'name' => 'Segnalo'
736
+ ),
737
+ 'sina' => array(
738
+ 'name' => 'Sina'
739
+ ),
740
+ 'sonico' => array(
741
+ 'name' => 'Sonico'
742
+ ),
743
+ 'startaid' => array(
744
+ 'name' => 'Startaid'
745
+ ),
746
+ 'startlap' => array(
747
+ 'name' => 'Startlap'
748
+ ),
749
+ 'stumbleupon' => array(
750
+ 'name' => 'StumbleUpon'
751
+ ),
752
+ 'stumpedia' => array(
753
+ 'name' => 'Stumpedia'
754
+ ),
755
+ 'typepad' => array(
756
+ 'name' => 'TypePad'
757
+ ),
758
+ 'tumblr' => array(
759
+ 'name' => 'Tumblr'
760
+ ),
761
+ 'viadeo' => array(
762
+ 'name' => 'Viadeo'
763
+ ),
764
+ 'virb' => array(
765
+ 'name' => 'Virb'
766
+ ),
767
+ 'vkontakte' => array(
768
+ 'name' => 'Vkontakte'
769
+ ),
770
+ 'voxopolis' => array(
771
+ 'name' => 'VOXopolis'
772
+ ),
773
+ 'whatsapp' => array(
774
+ 'name' => 'WhatsApp'
775
+ ),
776
+ 'weheartit' => array(
777
+ 'name' => 'We Heart It'
778
+ ),
779
+ 'wordpress' => array(
780
+ 'name' => 'WordPress'
781
+ ),
782
+ 'xerpi' => array(
783
+ 'name' => 'Xerpi'
784
+ ),
785
+ 'xing' => array(
786
+ 'name' => 'Xing'
787
+ ),
788
+ 'yammer' => array(
789
+ 'name' => 'Yammer'
790
+ )
791
+ ));
792
+
793
+ }
794
+
795
+ public static function defaults( $page ){
796
+
797
+ if( $page == 'buttons' ){
798
+ return array(
799
+ 'content' => 'eyIxIjp7InByb3BlcnRpZXMiOnt9LCJidXR0b25zIjpbXX19',
800
+ 'loc_rules' => array(
801
+ 'type' => 'show_all',
802
+ 'rule' => 'W10='
803
+ ),
804
+ 'position' => 'below_posts',
805
+ 'in_excerpt' => 'show'
806
+ );
807
+ }
808
+
809
+ if( $page == 'sharebar' ){
810
+ return array(
811
+ 'ft_status' => 'ft_status',
812
+ 'buttons' => 'eyIxIjp7InByb3BlcnRpZXMiOnt9LCJidXR0b25zIjpbXX19',
813
+ 'type' => 'vertical',
814
+ 'vl_position' => 'wleft',
815
+ 'hl_position' => 'wbottom',
816
+ 'stick_element' => '',
817
+ 'theme' => 'simple',
818
+ 'vl_movement' => 'move',
819
+ 'css_class' => '',
820
+ 'offset' => '0',
821
+ 'bg_color' => '#ffffff',
822
+ 'border_color' => '#cccccc',
823
+ 'oc_color' => 'black',
824
+ 'loc_rules' => array(
825
+ 'type' => 'show_all',
826
+ 'rule' => 'W10='
827
+ )
828
+ );
829
+ }
830
+
831
+ if( $page == 'followbar' ){
832
+ return array(
833
+ 'ft_status' => 'disable',
834
+ 'template' => 'W10=',
835
+ 'shape' => '',
836
+ 'size' => '32px',
837
+ 'text' => 'hide',
838
+ 'bg_color' => '',
839
+ 'icon_color' => '#ffffff',
840
+ 'orientation' => 'vertical',
841
+ 'position' => 'rm',
842
+ 'hover' => '',
843
+ 'pad' => 'pad',
844
+ 'title' => '',
845
+ 'open_popup' => 'no',
846
+ 'loc_rules' => array(
847
+ 'type' => 'show_all',
848
+ 'rule' => 'W10='
849
+ )
850
+ );
851
+ }
852
+
853
+ if( $page == 'text_sharebar' ){
854
+ return array(
855
+ 'ft_status' => 'disable',
856
+ 'template' => 'W10=',
857
+ 'content' => '.entry-content',
858
+ 'size' => '32px',
859
+ 'bg_color' => '#333',
860
+ 'icon_color' => '#fff',
861
+ 'text_count' => '20',
862
+ 'loc_rules' => array(
863
+ 'type' => 'show_all',
864
+ 'rule' => 'W1tbInNpbmdsZSIsImVxdWFsIiwiIl1dLFtbInBhZ2UiLCJlcXVhbCIsIiJdXV0='
865
+ )
866
+ );
867
+ }
868
+
869
+ if( $page == 'mobile_sharebar' ){
870
+ return array(
871
+ 'ft_status' => 'disable',
872
+ 'template' => 'W10=',
873
+ 'size' => '48px',
874
+ 'bg_color' => '',
875
+ 'icon_color' => '#ffffff',
876
+ 'pad' => 'pad',
877
+ 'on_desktop' => 'no',
878
+ 'loc_rules' => array(
879
+ 'type' => 'show_all',
880
+ 'rule' => 'W10='
881
+ )
882
+ );
883
+ }
884
+
885
+ if( $page == 'gsettings_twitter' ){
886
+ return array(
887
+ 'twitter_username' => ''
888
+ );
889
+ }
890
+
891
+ if( $page == 'gsettings_sharethis' ){
892
+ return array(
893
+ 'st_pub_key' => ''
894
+ );
895
+ }
896
+
897
+ if( $page == 'gsettings_socialbuttons' ){
898
+ return array(
899
+ 'sb_comment_sec' => '#comments'
900
+ );
901
+ }
902
+
903
+ if( $page == 'gsettings_misc' ){
904
+ return array(
905
+ 'misc_additional_css' => ''
906
+ );
907
+ }
908
+
909
+ }
910
+
911
+ }
912
+
913
+ WPSR_Lists::init();
914
+
915
+ ?>
core/location_rules.php ADDED
@@ -0,0 +1,489 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Location rules module
4
+ *
5
+ */
6
+
7
+ class WPSR_Location_Rules{
8
+
9
+ public static function init(){
10
+
11
+ // Register location rules action
12
+ add_action( 'wp_ajax_wpsr_location_rules', array( __CLASS__, 'selectors_ajax' ) );
13
+
14
+ }
15
+
16
+ public static function rules_list(){
17
+
18
+ //Default rules
19
+ $rules = array(
20
+ 'single' => array(
21
+ 'name' => 'Single post',
22
+ 'callback' => array( __CLASS__, 'rule_is_single' ),
23
+ 'placeholder' => __( 'Select specific posts', 'wpsr' ),
24
+ 'helper' => 1,
25
+ 'children' => array( 'has-category', 'has-tag', 'post-type' )
26
+ ),
27
+
28
+ 'page' => array(
29
+ 'name' => 'Page',
30
+ 'callback' => array( __CLASS__, 'rule_is_page' ),
31
+ 'placeholder' => __( 'Select specific pages', 'wpsr' ),
32
+ 'helper' => 1,
33
+ 'children' => array( 'has-category', 'has-tag', 'post-type' )
34
+ ),
35
+
36
+ 'home' => array(
37
+ 'name' => 'Home page',
38
+ 'callback' => array( __CLASS__, 'rule_is_home' ),
39
+ 'helper' => 0,
40
+ 'children' => array( 'in-excerpt', 'post-type', 'has-category', 'has-tag' )
41
+ ),
42
+
43
+ 'front-page' => array(
44
+ 'name' => 'Front page',
45
+ 'callback' => array( __CLASS__, 'rule_is_home' ),
46
+ 'helper' => 0,
47
+ 'children' => array( 'in-excerpt', 'post-type', 'has-category', 'has-tag' )
48
+ ),
49
+
50
+ 'sticky' => array(
51
+ 'name' => 'Sticky posts',
52
+ 'callback' => array( __CLASS__, 'rule_is_sticky' ),
53
+ 'helper' => 0
54
+ ),
55
+
56
+ 'post-type' => array(
57
+ 'name' => 'Post type',
58
+ 'callback' => array( __CLASS__, 'rule_post_type' ),
59
+ 'placeholder' => 'Select available post type',
60
+ 'helper' => 1,
61
+ 'children' => array( 'has-category', 'has-tag' )
62
+ ),
63
+
64
+ 'page-template' => array(
65
+ 'name' => 'Page template',
66
+ 'callback' => array( __CLASS__, 'rule_is_page_template' ),
67
+ 'placeholder' => __( 'Enter page template name seperated by comma', 'wpsr' ),
68
+ 'helper' => 2
69
+ ),
70
+
71
+ 'archive' => array(
72
+ 'name' => 'Archive pages',
73
+ 'callback' => array( __CLASS__, 'rule_is_archive' ),
74
+ 'helper' => 0,
75
+ 'children' => array( 'category', 'tag', 'date' )
76
+ ),
77
+
78
+ 'category' => array(
79
+ 'name' => 'Category archive page',
80
+ 'callback' => array( __CLASS__, 'rule_is_category' ),
81
+ 'placeholder' => __( 'Select available category archive pages', 'wpsr' ),
82
+ 'helper' => 1
83
+ ),
84
+
85
+ 'tag' => array(
86
+ 'name' => 'Tags archive page',
87
+ 'callback' => array( __CLASS__, 'rule_is_tag' ),
88
+ 'placeholder' => __( 'Select available tag archive pages', 'wpsr' ),
89
+ 'helper' => 1
90
+ ),
91
+
92
+ 'date' => array(
93
+ 'name' => 'Date archive page',
94
+ 'callback' => array( __CLASS__, 'rule_is_date' ),
95
+ 'helper' => 0
96
+ ),
97
+
98
+ 'not-found' => array(
99
+ 'name' => '404 page',
100
+ 'callback' => array( __CLASS__, 'rule_is_404' ),
101
+ 'helper' => 0
102
+ ),
103
+
104
+ 'has-category' => array(
105
+ 'name' => 'Categories of post',
106
+ 'callback' => array( __CLASS__, 'rule_has_category' ),
107
+ 'placeholder' => __( 'Select available categories', 'wpsr' ),
108
+ 'helper' => 1
109
+ ),
110
+
111
+ 'has-tag' => array(
112
+ 'name' => 'Tags of post',
113
+ 'callback' => array( __CLASS__, 'rule_has_tag' ),
114
+ 'placeholder' => __( 'Select available tags', 'wpsr' ),
115
+ 'helper' => 1
116
+ ),
117
+
118
+ );
119
+
120
+ return apply_filters( 'wpsr_mod_location_rules_list', $rules );
121
+
122
+ }
123
+
124
+ public static function check_rule( $rule_wrap ){
125
+
126
+ $type = $rule_wrap[ 'type' ];
127
+ $group = json_decode( base64_decode( $rule_wrap[ 'rule' ] ) );
128
+
129
+ if( $type == 'show_all' ){
130
+ return 1;
131
+ }else if( $type == 'hide_all' ){
132
+ return 0;
133
+ }
134
+
135
+ if( empty( $group ) ){
136
+ return 0;
137
+ }
138
+
139
+ $or_flag = 0;
140
+ foreach( $group as $rules ){
141
+
142
+ $and_flag = 1;
143
+ foreach( $rules as $rule ){
144
+ $rule_answer = self::exe_rule( $rule );
145
+
146
+ if( $rule_answer && $and_flag ){
147
+ $and_flag = 1;
148
+ }else{
149
+ $and_flag = 0;
150
+ }
151
+ }
152
+
153
+ if( $and_flag || $or_flag ){
154
+ $or_flag = 1; // can display;
155
+ }else{
156
+ $or_flag = 0; // cannot display;
157
+ }
158
+
159
+ }
160
+
161
+ if( $type == 'show_selected' ){
162
+ return $or_flag;
163
+ }else{
164
+ return !$or_flag;
165
+ }
166
+
167
+ }
168
+
169
+ public static function exe_rule( $rule ){
170
+
171
+ $loc_rules = self::rules_list();
172
+
173
+ $answer = 0;
174
+ if( is_callable( $loc_rules[ $rule[0] ][ 'callback' ] ) ){
175
+ $answer = call_user_func_array( $loc_rules[ $rule[ 0 ] ][ 'callback' ], array( 2, $rule[ 2 ] ) ); # Mode 2
176
+ }
177
+
178
+ if( $loc_rules[ $rule[ 0 ] ][ 'helper' ] != 0 ){
179
+ if( $rule[ 1 ] == 'equal' ){
180
+ return $answer;
181
+ }else{
182
+ return !$answer;
183
+ }
184
+ }else{
185
+ return $answer;
186
+ }
187
+
188
+ }
189
+
190
+ public static function selectors_ajax(){
191
+
192
+ $rules = self::rules_list();
193
+ $rule_id = $_GET[ 'rule_id' ];
194
+ $selected = $_GET[ 'selected' ];
195
+
196
+ if( !array_key_exists( $rule_id, $rules ) ){
197
+ die( __( 'Invalid rule id !', 'wpsr' ) );
198
+ }
199
+
200
+ // Mode 1: Get selectors list
201
+ // Mode 2: Check rule
202
+ if( isset( $rules[ $rule_id ][ 'callback' ] ) && is_callable( $rules[ $rule_id ][ 'callback' ] ) ){
203
+ $list = call_user_func_array( $rules[ $rule_id ][ 'callback' ], array( 1, '' ) ); # Mode 1
204
+ }else{
205
+ die( __( 'No selections supported for this page !', 'wpsr' ) );
206
+ }
207
+
208
+ if( empty( $list ) )
209
+ die();
210
+
211
+ $selSplit = array_filter( array_map( 'trim', explode( ',', $selected ) ) );
212
+
213
+ if( is_array( $selSplit ) ){
214
+ foreach ( $list as $k => $v ){
215
+ $isCheck = in_array( $k, $selSplit ) ? 'checked="selected"' : '';
216
+ echo '<label><input type="checkbox" ' . $isCheck . ' value="' . $k . '"> ' . $v . '</label><br/>';
217
+ }
218
+ }
219
+
220
+ die();
221
+
222
+ }
223
+
224
+ public static function display_rules( $id, $values = array() ){
225
+
226
+ $types = array(
227
+ 'show_all' => __( 'Show in all pages', 'wpsr' ),
228
+ 'hide_all' => __( 'Hide in all pages', 'wpsr' ),
229
+ 'show_selected' => __( 'Show in selected pages', 'wpsr' ),
230
+ 'hide_selected' => __( 'Hide in selected pages', 'wpsr' )
231
+ );
232
+
233
+ echo '<div class="loc_rules_wrap">';
234
+
235
+ echo '<div class="loc_rules_type">';
236
+ echo WPSR_Admin::field( 'radio', array(
237
+ 'name' => $id . '[type]',
238
+ 'list' => $types,
239
+ 'value' => $values['type'],
240
+ 'default' => 'show_all',
241
+ ));
242
+ echo '</div>';
243
+
244
+ // Set default pages to rule
245
+ if( !isset( $values['rule'] ) ){
246
+ $values['rule'] = 'W10='; // [] - Default base64 value for no rule
247
+ }
248
+
249
+ $values['rule'] = json_decode( base64_decode( $values['rule'] ) );
250
+
251
+ echo '<div class="loc_rules_inner" data-conditioner data-condr-input="(prev::)(find::[type=radio])" data-condr-value="selected" data-condr-action="pattern?fadeIn:hide" data-condr-events="click">';
252
+ echo '<p class="loc_rule_info">' . __( 'No page rules are added. Template will be hidden everywhere', 'wpsr' ) . '</p>';
253
+
254
+ echo '<div class="loc_rules_box">';
255
+ if( is_array( $values['rule'] ) ){
256
+ foreach( $values['rule'] as $grp ){
257
+ echo '<div class="loc_group_wrap">';
258
+ foreach( $grp as $rle ){
259
+ echo self::rules_template( $rle, 0 );
260
+ }
261
+ echo '</div>';
262
+ }
263
+ }
264
+ echo '</div>';
265
+
266
+ echo '<a href="#" class="button-primary loc_group_add" title="' . __( 'Add another page', 'wpsr' ) . '"> AND </a>';
267
+ echo '</div>';
268
+
269
+ echo '<div class="hidden">';
270
+ echo '<input type="hidden" name="' . $id . '[rule]" class="loc_rule_value" />';
271
+ echo '<div class="loc_rules_temp">' . self::rules_template( array( '', '', '' ), 1 ) . '</div>';
272
+ echo '</div>';
273
+
274
+ echo '</div>';
275
+
276
+ }
277
+
278
+ public static function rules_template( $val, $grp ){
279
+
280
+ $rules = self::rules_list();
281
+
282
+ $operators = array(
283
+ array( 'equal', 'is' ),
284
+ array( 'not-equal', 'is not' )
285
+ );
286
+
287
+ $select = array( '', '');
288
+
289
+ foreach( $rules as $k => $v ){
290
+ $s = selected( $k, $val[ 0 ], false );
291
+
292
+ if( isset( $v[ 'helper' ] ) ){
293
+ $h = 'data-helper="' . $v[ 'helper' ] . '"';
294
+ }
295
+
296
+ $p = isset( $v[ 'placeholder' ] ) ? ' data-placeholder="' . $v[ 'placeholder' ] . '"' : '';
297
+ $select[0] .= '<option value="' . $k . '" ' . $s . $h . $p . '>' . $v[ 'name' ] . '</option>';
298
+ }
299
+
300
+ foreach( $operators as $k => $v ){
301
+ $s = selected( $v[0], $val[1], false );
302
+ $select[1] .= '<option value="' . $v[0] . '" ' . $s . '>' . $v[1] . '</option>';
303
+ }
304
+
305
+ $rule = '<div class="loc_rule_wrap"><select class="loc_page">' . $select[0] . '</select><select class="loc_operator">' . $select[1] . '</select><input type="text" class="loc_value" value="' . $val[2] . '" placeholder="" title="' . __( 'Leave empty to show in all', 'wpsr' ) . '"/><a href="#" class="button loc_rule_add" title="' . __( 'Add another criteria to match', 'wpsr' ) . '">+</a><a href="#" class="button loc_rule_remove" title="' . __( 'Remove criteria', 'wpsr' ) . '">-</a></div>';
306
+
307
+ if( $grp ) return '<div class="loc_group_wrap">' . $rule . '</div>';
308
+ else return $rule;
309
+ }
310
+
311
+
312
+ public static function rule_is_single( $mode, $ids = '' ){
313
+
314
+ if( $mode == 1 ){ // Rule selectors
315
+ $list = array();
316
+
317
+ $posts = get_posts( 'posts_per_page=-1&post_type=post' );
318
+ if ( !empty( $posts ) ){
319
+ foreach ( $posts as $post ){
320
+ $list[ $post->ID ] = $post->post_title;
321
+ }
322
+ return $list;
323
+ }else{
324
+ die( __( 'No posts !', 'wpsr' ) );
325
+ }
326
+
327
+ }elseif( $mode == 2 ){ // Rule check
328
+ return is_single( $ids );
329
+ }
330
+
331
+ }
332
+
333
+
334
+ public static function rule_is_page( $mode, $ids = '' ){
335
+
336
+ if( $mode == 1 ){ // Rule selectors
337
+ $list = array();
338
+
339
+ $pages = get_posts( 'posts_per_page=-1&post_type=page' );
340
+ if ( !empty( $pages ) ){
341
+ foreach ( $pages as $page ){
342
+ $list[ $page->ID ] = $page->post_title;
343
+ }
344
+ return $list;
345
+ }else{
346
+ die( __( 'No pages !', 'wpsr' ) );
347
+ }
348
+
349
+ return $list;
350
+
351
+ }elseif( $mode == 2 ){ // Rule check
352
+ return is_page( $ids );
353
+ }
354
+
355
+ }
356
+
357
+ public static function rule_post_type( $mode, $ids = '' ){
358
+
359
+ if( $mode == 1 ){ // Rule selectors
360
+
361
+ return get_post_types( array( 'public' => true ) );
362
+
363
+ }elseif( $mode == 2 ){ // Rule check
364
+ return is_page( $ids );
365
+ }
366
+
367
+ }
368
+
369
+ public static function rule_is_archive( $mode, $ids = '' ){
370
+
371
+ if( $mode == 1 ){ // Rule selectors
372
+ }elseif( $mode == 2 ){ // Rule check
373
+ return is_archive();
374
+ }
375
+
376
+ }
377
+
378
+ public static function rule_is_category( $mode, $ids = '' ){
379
+
380
+ if( $mode == 1 ){ // Rule selectors
381
+
382
+ $list = array();
383
+ $cats = get_categories();
384
+
385
+ if( !empty( $cats ) ){
386
+ foreach( $cats as $cat ){
387
+ $list[ $cat->slug ] = $cat->name;
388
+ }
389
+ return $list;
390
+ }else{
391
+ die( __( 'No categories !', 'wpsr' ) );
392
+ }
393
+
394
+ }elseif( $mode == 2 ){ // Rule check
395
+ return is_category( $ids );
396
+ }
397
+
398
+ }
399
+
400
+
401
+ public static function rule_is_tag( $mode, $ids = '' ){
402
+
403
+ if( $mode == 1 ){ // Rule selectors
404
+
405
+ $list = array();
406
+ $tags = get_tags();
407
+
408
+ if( !empty( $tags ) ){
409
+ foreach( $tags as $tag ){
410
+ $list[ $tag->slug ] = $tag->name;
411
+ }
412
+ return $list;
413
+ }else{
414
+ die( __( 'No tags !', 'wpsr' ) );
415
+ }
416
+
417
+ }elseif( $mode == 2 ){ // Rule check
418
+ return is_tag( $ids );
419
+ }
420
+
421
+ }
422
+
423
+ public static function rule_is_date( $mode, $ids = '' ){
424
+
425
+ if( $mode == 1 ){ // Rule selectors
426
+ }elseif( $mode == 2 ){ // Rule check
427
+ return is_date();
428
+ }
429
+
430
+ }
431
+
432
+ public static function rule_has_category( $mode, $ids = '' ){
433
+
434
+ if( $mode == 1 ){ // Rule selectors
435
+
436
+ $list = array();
437
+ $cats = get_categories();
438
+
439
+ if( !empty( $cats ) ){
440
+ foreach( $cats as $cat ){
441
+ $list[ $cat->slug ] = $cat->name;
442
+ }
443
+ return $list;
444
+ }else{
445
+ die( __( 'No categories !', 'wpsr' ) );
446
+ }
447
+
448
+ }elseif( $mode == 2 ){ // Rule check
449
+ return has_category( $ids );
450
+ }
451
+
452
+ }
453
+
454
+ public static function rule_has_tag( $mode, $ids = '' ){
455
+
456
+ if( $mode == 1 ){ // Rule selectors
457
+
458
+ $list = array();
459
+ $tags = get_tags();
460
+
461
+ if( !empty( $tags ) ){
462
+ foreach( $tags as $tag ){
463
+ $list[ $tag->slug ] = $tag->name;
464
+ }
465
+ return $list;
466
+ }else{
467
+ die( __( 'No tags !', 'wpsr' ) );
468
+ }
469
+
470
+ }elseif( $mode == 2 ){ // Rule check
471
+ return has_tag( $ids );
472
+ }
473
+
474
+ }
475
+
476
+ public static function rule_is_404( $mode, $ids = '' ){
477
+
478
+ if( $mode == 1 ){ // Rule selectors
479
+ }elseif( $mode == 2 ){ // Rule check
480
+ return is_404();
481
+ }
482
+
483
+ }
484
+
485
+ }
486
+
487
+ WPSR_Location_Rules::init();
488
+
489
+ ?>
core/metadata.php ADDED
@@ -0,0 +1,162 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Gives the page details for the services
4
+ *
5
+ */
6
+
7
+ class WPSR_Metadata{
8
+
9
+ public static function init(){
10
+
11
+ }
12
+
13
+ public static function metadata(){
14
+
15
+ global $post;
16
+
17
+ $d = array();
18
+ $defaults = array(
19
+ 'post_id' => '',
20
+ 'title' => '',
21
+ 'url' => '',
22
+ 'excerpt' => '',
23
+ 'short_url' => '',
24
+ 'comments_count' => '',
25
+ 'rss_url' => get_bloginfo( 'rss2_url' )
26
+ );
27
+
28
+ if( in_the_loop()) {
29
+
30
+ $d = self::meta_by_id( get_the_ID() );
31
+
32
+ }else{
33
+
34
+ if( is_home() && get_option( 'show_on_front' ) == 'page' ){
35
+
36
+ $d = self::meta_by_id( get_option( 'page_for_posts' ) );
37
+
38
+ }elseif( is_front_page() || ( is_home() && ( get_option( 'show_on_front' ) == 'posts' || !get_option( 'page_for_posts' ) ) ) ){
39
+
40
+ $d = array(
41
+ 'title' => get_bloginfo( 'name' ),
42
+ 'url' => get_bloginfo( 'url' ),
43
+ 'excerpt' => get_bloginfo( 'description' ),
44
+ 'short_url' => get_bloginfo( 'url' ),
45
+ );
46
+
47
+ }elseif( is_singular() ){
48
+
49
+ $d = self::meta_by_id( $post->ID );
50
+
51
+ }elseif( is_tax() || is_tag() || is_category() ){
52
+
53
+ $term = get_queried_object();
54
+ $d = array(
55
+ 'title' => wp_title( '', false ),
56
+ 'url' => get_term_link( $term, $term->taxonomy ),
57
+ 'excerpt' => $term->description
58
+ );
59
+
60
+ }elseif( function_exists( 'get_post_type_archive_link' ) && is_post_type_archive() ){
61
+
62
+ $post_type = get_query_var( 'post_type' );
63
+ $post_type_obj = get_post_type_object( $post_type );
64
+
65
+ $d = array(
66
+ 'title' => wp_title( '', false ),
67
+ 'url' => get_post_type_archive_link( $post_type ),
68
+ 'excerpt' => $post_type_obj->description
69
+ );
70
+
71
+ }elseif( is_date() ){
72
+
73
+ if( is_day() ){
74
+
75
+ $d = array(
76
+ 'title' => wp_title( '', false ),
77
+ 'url' => get_day_link( get_query_var( 'year' ), get_query_var( 'monthnum' ), get_query_var( 'day' ) )
78
+ );
79
+
80
+ }elseif( is_month() ){
81
+
82
+ $d = array(
83
+ 'title' => wp_title( '', false ),
84
+ 'url' => get_month_link( get_query_var( 'year' ), get_query_var( 'monthnum' ) )
85
+ );
86
+
87
+ }elseif( is_year ){
88
+
89
+ $d = array(
90
+ 'title' => wp_title( '', false ),
91
+ 'url' => get_year_link( get_query_var( 'year' ) )
92
+ );
93
+
94
+ }
95
+
96
+ }elseif( is_author() ){
97
+
98
+ $d = array(
99
+ 'title' => wp_title( '', false ),
100
+ 'url' => get_author_posts_url( get_query_var( 'author' ), get_query_var( 'author_name' ) )
101
+ );
102
+
103
+ }elseif( is_search() ){
104
+
105
+ $d = array(
106
+ 'title' => wp_title( '', false ),
107
+ 'url' => get_search_link()
108
+ );
109
+
110
+ }elseif( is_404() ){
111
+
112
+ $d = array(
113
+ 'title' => wp_title( '', false ),
114
+ 'url' => home_url( esc_url( $_SERVER['REQUEST_URI'] ) )
115
+ );
116
+
117
+ }
118
+ }
119
+
120
+ $meta = wp_parse_args( $d, $defaults );
121
+ $meta = array_map( 'trim', $meta );
122
+ $meta = apply_filters( 'wpsr_mod_metadata', $meta );
123
+
124
+ return $meta;
125
+
126
+ }
127
+
128
+ public static function meta_by_id( $id ){
129
+
130
+ global $post;
131
+
132
+ $d = array();
133
+
134
+ if( $id ){
135
+ $d = array(
136
+ 'post_id' => $id,
137
+ 'title' => get_the_title( $id ),
138
+ 'url' => get_permalink( $id ),
139
+ 'excerpt' => self::excerpt( $post->post_excerpt, 100 ), // using $post->post_excerpt instead of get_the_excerpt as the_content filter loses shortcode formatting
140
+ 'short_url' => wp_get_shortlink( $id ),
141
+ 'comments_count' => get_comments_number( $id )
142
+ );
143
+ }
144
+
145
+ return apply_filters( 'wpsr_mod_meta_by_id', $d );
146
+
147
+ }
148
+
149
+ public static function excerpt( $excerpt, $length = 250 ){
150
+
151
+ global $post;
152
+
153
+ $excerpt = ( empty( $excerpt ) ) ? strip_tags( strip_shortcodes( $post->post_content ) ) : $excerpt;
154
+ return substr( $excerpt, 0, $length );
155
+
156
+ }
157
+
158
+ }
159
+
160
+ WPSR_Metadata::init();
161
+
162
+ ?>
core/services.php ADDED
@@ -0,0 +1,135 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Main API class for WP Socializer plugin
4
+ *
5
+ */
6
+
7
+ class WPSR_Services{
8
+
9
+ private static $services = array();
10
+ private static $active_services = array();
11
+
12
+ public static function init(){
13
+ // Nothing to Init
14
+ }
15
+
16
+ public static function register( $id, $details ){
17
+
18
+ $defaults = array(
19
+ 'name' => '',
20
+ 'icons' => '',
21
+ 'desc' => '',
22
+ 'settings' => array(),
23
+ 'hide_in_feature' => array(),
24
+ 'callbacks' => array(
25
+ 'output' => '',
26
+ 'includes' => '',
27
+ 'settings' => '',
28
+ 'validation' => '',
29
+ 'general_settings' => '',
30
+ 'general_settings_validation' => '',
31
+ )
32
+ );
33
+
34
+ $details[ 'callbacks' ] = wp_parse_args( $details[ 'callbacks' ], $defaults[ 'callbacks' ] );
35
+ $details = wp_parse_args( $details, $defaults );
36
+
37
+ // Apply filter on the service config
38
+ $details = apply_filters( 'wpsr_mod_service_config', $details );
39
+
40
+ self::$services[ $id ] = $details;
41
+
42
+ // Filters
43
+ if( $details[ 'callbacks' ][ 'validation' ] != '' ){
44
+ add_filter( 'wpsr_service_validation_' . $id, $details[ 'callbacks' ][ 'validation' ], 10, 1 );
45
+ }
46
+
47
+ if( $details[ 'callbacks' ][ 'general_settings' ] != '' ){
48
+ add_action( 'wpsr_form_general_settings', $details[ 'callbacks' ][ 'general_settings' ], 10, 1 );
49
+ add_filter( 'wpsr_form_validation_general_settings', $details[ 'callbacks' ][ 'general_settings_validation' ], 10, 1 );
50
+ }
51
+
52
+ self::register_includes( $id );
53
+
54
+ do_action( 'wpsr_do_service_register' );
55
+
56
+ }
57
+
58
+ public static function list_all(){
59
+
60
+ $services_temp = self::$services;
61
+
62
+ foreach( $services_temp as $id => $config ){
63
+ unset( $services_temp[ $id ][ 'callbacks' ] );
64
+ }
65
+
66
+ return apply_filters( 'wpsr_mod_services_list', $services_temp );
67
+
68
+ }
69
+
70
+ public static function output( $id, $settings = array(), $page_info = array() ){
71
+
72
+ if( !self::check_callable( $id, 'output' ) ){
73
+ return '';
74
+ }
75
+
76
+ return call_user_func( self::$services[ $id ][ 'callbacks' ][ 'output' ], $settings, $page_info );
77
+
78
+ }
79
+
80
+ public static function settings( $id, $values ){
81
+
82
+ if( !self::check_callable( $id, 'settings' ) ){
83
+ return '';
84
+ }
85
+
86
+ return call_user_func( self::$services[ $id ][ 'callbacks' ][ 'settings' ], $values );
87
+
88
+ }
89
+
90
+ public static function register_includes( $id ){
91
+
92
+ if( !self::check_callable( $id, 'includes' ) ){
93
+ return '';
94
+ }
95
+
96
+ $service_includes = call_user_func( self::$services[ $id ][ 'callbacks' ][ 'includes' ] );
97
+
98
+ WPSR_Includes::register( $service_includes );
99
+ }
100
+
101
+ public static function check_callable( $id, $callback ){
102
+
103
+ $services = self::$services;
104
+
105
+ if( array_key_exists( $id, $services ) ){
106
+ $service = $services[ $id ];
107
+ if( array_key_exists( $callback, $service[ 'callbacks' ] ) && !empty( $service[ 'callbacks' ][ $callback ] ) && is_callable( $service[ 'callbacks' ][ $callback ] ) ){
108
+ return 1;
109
+ }
110
+ }
111
+
112
+ return 0;
113
+
114
+ }
115
+
116
+ public static function add_active_service( $id ){
117
+
118
+ $services_active = self::$active_services;
119
+
120
+ if( !empty( $id ) && !in_array( $id, self::$active_services ) ){
121
+ array_push( self::$active_services, $id );
122
+ }
123
+
124
+ }
125
+
126
+ public static function active_services(){
127
+
128
+ return apply_filters( 'wpsr_mod_active_services_list', self::$active_services );
129
+
130
+ }
131
+ }
132
+
133
+ WPSR_Services::init();
134
+
135
+ ?>
core/share_counter.php ADDED
@@ -0,0 +1,259 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Share counter class
4
+ *
5
+ */
6
+
7
+ class WPSR_Share_Counter{
8
+
9
+ public static $default_settings = array(
10
+ 'counter_expiration' => 86400
11
+ );
12
+
13
+ public static function init(){
14
+
15
+ }
16
+
17
+ public static function counter_services(){
18
+
19
+ return apply_filters( 'wpsr_mod_counter_services', array(
20
+ 'facebook' => array(
21
+ 'name' => 'Facebook',
22
+ 'callback' => array( __CLASS__, 'facebook_count' )
23
+ ),
24
+ 'googleplus' => array(
25
+ 'name' => 'Google Plus',
26
+ 'callback' => array( __CLASS__, 'googleplus_count' )
27
+ ),
28
+ 'linkedin' => array(
29
+ 'name' => 'Linked In',
30
+ 'callback' => array( __CLASS__, 'linkedin_count' )
31
+ ),
32
+ 'pinterest' => array(
33
+ 'name' => 'Pinterest',
34
+ 'callback' => array( __CLASS__, 'pinterest_count' )
35
+ ),
36
+ 'stumbleupon' => array(
37
+ 'name' => 'StumbleUpon',
38
+ 'callback' => array( __CLASS__, 'stumbleupon_count' )
39
+ ),
40
+ ));
41
+
42
+ }
43
+
44
+ public static function remote_request_json( $api_url, $method = 'get', $args = array() ){
45
+
46
+ if( $method == 'get' ){
47
+ $response = wp_remote_get( $api_url );
48
+ }elseif( $method == 'post' ){
49
+ $response = wp_remote_post( $api_url, $args );
50
+ }else{
51
+ return 0;
52
+ }
53
+
54
+ if( is_wp_error( $response ) ){
55
+ return false;
56
+ }else{
57
+ if( $response[ 'response' ][ 'code' ] == 200 ){
58
+ $data = json_decode( wp_remote_retrieve_body( $response ) );
59
+ return $data;
60
+ }else{
61
+ return false;
62
+ }
63
+ }
64
+ }
65
+
66
+ public static function service_count( $id, $url ){
67
+
68
+ $counter_services = self::counter_services();
69
+ $gs = wp_parse_args( get_option( 'wpsr_general_settings' ), WPSR_Share_Counter::$default_settings );
70
+
71
+ if( !array_key_exists( $id, $counter_services ) ){
72
+ return 0;
73
+ }
74
+
75
+ $link_md5 = md5( $url );
76
+ $transient_name = 'wpsr_count_' . $link_md5;
77
+ $callback = $counter_services[ $id ][ 'callback' ];
78
+ $expiration = $gs[ 'counter_expiration' ];
79
+
80
+ $link_counts = get_transient( $transient_name );
81
+
82
+ if( empty( $link_counts ) || !array_key_exists ( $id, $link_counts ) ){
83
+ $count = call_user_func( $callback, $url );
84
+
85
+ if( is_array( $link_counts ) ){
86
+ $link_counts[ $id ] = $count;
87
+ }else{
88
+ $link_counts = array(
89
+ $id => $count
90
+ );
91
+ }
92
+
93
+ set_transient( $transient_name, $link_counts, $expiration );
94
+ return $count;
95
+
96
+ }else{
97
+ return $link_counts[ $id ];
98
+ }
99
+
100
+ }
101
+
102
+ public static function get_count( $id, $url ){
103
+
104
+ $count = self::service_count( $id, $url );
105
+ $formatted = self::format_count( $count );
106
+
107
+ return array(
108
+ 'full' => $count,
109
+ 'formatted' => $formatted
110
+ );
111
+
112
+ }
113
+
114
+ public static function total_count( $url, $services = array() ){
115
+
116
+ $counter_services = self::counter_services();
117
+ $count = 0;
118
+
119
+ foreach( $services as $id ){
120
+ if( array_key_exists( $id, $counter_services ) ){
121
+ $service_count = self::get_count( $id, $url );
122
+ $count += $service_count[ 'full' ];
123
+ }
124
+ }
125
+
126
+ $formatted = self::format_count( $count );
127
+
128
+ return array(
129
+ 'full' => $count,
130
+ 'formatted' => $formatted
131
+ );
132
+
133
+ }
134
+
135
+ public static function facebook_count( $url ){
136
+
137
+ $api = 'https://graph.facebook.com/?id=' . $url;
138
+ $data = self::remote_request_json( $api );
139
+
140
+ if( $data == false ){
141
+ return 0;
142
+ }else{
143
+ if( isset( $data->share->share_count ) ){
144
+ return $data->share->share_count;
145
+ }else{
146
+ return 0;
147
+ }
148
+ }
149
+
150
+ }
151
+
152
+ public static function linkedin_count( $url ){
153
+
154
+ $api = 'https://www.linkedin.com/countserv/count/share?format=json&url=' . $url;
155
+ $data = self::remote_request_json( $api );
156
+
157
+ if( $data == false ){
158
+ return 0;
159
+ }else{
160
+ if( isset( $data->count ) ){
161
+ return $data->count;
162
+ }else{
163
+ return 0;
164
+ }
165
+ }
166
+
167
+ }
168
+
169
+ public static function stumbleupon_count( $url ){
170
+
171
+ $api = 'http://www.stumbleupon.com/services/1.01/badge.getinfo?url=' . $url;
172
+ $data = self::remote_request_json( $api );
173
+
174
+ if( $data == false ){
175
+ return 0;
176
+ }else{
177
+ if( isset( $data->result->views ) ){
178
+ return $data->result->views;
179
+ }else{
180
+ return 0;
181
+ }
182
+ }
183
+
184
+ }
185
+
186
+ public static function googleplus_count( $url ){
187
+
188
+ $api = 'https://clients6.google.com/rpc';
189
+ $data = self::remote_request_json( $api, 'post', array(
190
+ 'body' => '[{"method":"pos.plusones.get","id":"p","params":{"nolog":true,"id":"' . $url . '","source":"widget","userId":"@viewer","groupId":"@self"},"jsonrpc":"2.0","key":"p","apiVersion":"v1"}]',
191
+ 'headers' => array("Content-type" => "application/json")
192
+ ));
193
+
194
+ if( $data == false ){
195
+ return 0;
196
+ }else{
197
+ if( isset( $data[0]->result->metadata->globalCounts->count ) ){
198
+ return $data[0]->result->metadata->globalCounts->count;
199
+ }else{
200
+ return 0;
201
+ }
202
+ }
203
+
204
+ }
205
+
206
+ public static function pinterest_count( $url ){
207
+
208
+ $api = 'http://api.pinterest.com/v1/urls/count.json?callback=wpsr&url=' . $url;
209
+ $response = wp_remote_get( $api );
210
+
211
+ if( is_wp_error( $response ) ){
212
+ return false;
213
+ }else{
214
+ if( $response[ 'response' ][ 'code' ] == 200 ){
215
+ $data = self::jsonp_decode( wp_remote_retrieve_body( $response ) );
216
+
217
+ if( isset( $data->count ) ){
218
+ return $data->count;
219
+ }else{
220
+ return 0;
221
+ }
222
+
223
+ }else{
224
+ return 0;
225
+ }
226
+ }
227
+
228
+ }
229
+
230
+ public static function format_count( $num ){
231
+
232
+ if( $num < 1000 )
233
+ return $num;
234
+
235
+ $suffixes = array( 'k', 'm', 'b', 't' );
236
+ $final = $num;
237
+
238
+ for( $i=0; $i<sizeof($suffixes); $i++ ){
239
+ $num = $num/1000;
240
+
241
+ if( $num > 1000 ){
242
+ continue;
243
+ }else{
244
+ $final = round( $num, 2 ) . $suffixes[$i];
245
+ break;
246
+ }
247
+ }
248
+
249
+ return $final;
250
+ }
251
+
252
+ public static function jsonp_decode( $jsonp ) { // PHP 5.3 adds depth as third parameter to json_decode
253
+ if($jsonp[0] !== '[' && $jsonp[0] !== '{') { // we have JSONP
254
+ $jsonp = substr($jsonp, strpos($jsonp, '('));
255
+ }
256
+ return json_decode( trim($jsonp,'();') );
257
+ }
258
+
259
+ }
core/templates.php ADDED
@@ -0,0 +1,591 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Templates processor
4
+ *
5
+ */
6
+
7
+ class WPSR_Template_Buttons{
8
+
9
+ public static function init(){
10
+
11
+ add_action( 'init', array( __CLASS__, 'output' ) );
12
+
13
+ add_action( 'wp_ajax_wpsr_preview_template_buttons', array( __CLASS__, 'preview' ) );
14
+
15
+ }
16
+
17
+ public static function output(){
18
+
19
+ $btn_settings = wp_parse_args( get_option( 'wpsr_button_settings' ), array( 'tmpl' => array() ));
20
+ $btn_templates = $btn_settings[ 'tmpl' ];
21
+
22
+ foreach( $btn_templates as $tmpl ){
23
+
24
+ $content_obj = new wpsr_template_button_handler( $tmpl, 'content' );
25
+ $excerpt_obj = new wpsr_template_button_handler( $tmpl, 'excerpt' );
26
+
27
+ add_filter( 'the_content', array( $content_obj, 'print_template' ), 10 );
28
+ add_filter( 'the_excerpt', array( $excerpt_obj, 'print_template' ), 10 );
29
+
30
+ }
31
+
32
+ }
33
+
34
+ public static function html( $template, $page_info = array() ){
35
+
36
+ $decoded = base64_decode( $template );
37
+ $rows = json_decode( $decoded );
38
+ $html = '';
39
+ $row_buttons = array();
40
+ $buttons = WPSR_Buttons::list_all();
41
+
42
+ if( !is_object( $rows ) || empty( $rows ) )
43
+ return array(
44
+ 'html' => '',
45
+ 'buttons' => ''
46
+ );
47
+
48
+ // Apply filters on the template rows
49
+ $rows = apply_filters( 'wpsr_mod_buttons_template', $rows );
50
+
51
+ foreach( $rows as $row ){
52
+ if( count( $row->buttons ) > 0 ){
53
+ $html .= '<div class="wp-socializer wpsr-buttons">';
54
+ foreach( $row->buttons as $button ){
55
+ $btn_id = key( ( array )$button );
56
+ array_push( $row_buttons, $btn_id );
57
+
58
+ if( !array_key_exists( $btn_id, $buttons ) ){
59
+ continue;
60
+ }
61
+
62
+ $wrap_tag = 1;
63
+ $btn_settings = $buttons[ $btn_id ][ 'settings' ];
64
+ $service_id = $buttons[ $btn_id ][ 'service' ];
65
+ if ( isset( $btn_settings[ '_wrap_tag' ] ) && $btn_settings[ '_wrap_tag' ] == 0 ){
66
+ $wrap_tag = 0;
67
+ }
68
+
69
+ $classes = apply_filters( 'wpsr_mod_button_classes', array( 'wpsr-btn', 'wpsr-srvc-' . $service_id ) );
70
+ $classes = join( ' ', $classes );
71
+
72
+ $btn_html = WPSR_Buttons::get_button( $btn_id, $page_info );
73
+ $html .= $wrap_tag ? '<span class="' . $classes . '">' . $btn_html . '</span>' : $btn_html;
74
+ }
75
+ $html .= '</div>';
76
+ }
77
+ }
78
+
79
+ $out = array(
80
+ 'html' => $html,
81
+ 'buttons' => $row_buttons
82
+ );
83
+
84
+ return apply_filters( 'wpsr_mod_buttons_template_html', $out );
85
+
86
+ }
87
+
88
+ public static function preview( $template ){
89
+
90
+ if( !isset( $_GET[ 'template' ] ) ){
91
+ die(0);
92
+ }
93
+
94
+ $template = wp_kses_post( $_GET[ 'template' ] );
95
+ $page_info = array(
96
+ 'title' => 'Google',
97
+ 'url' => 'https://www.google.com',
98
+ 'excerpt' => 'Dummy excerpt for WP Socializer preview',
99
+ 'short_url' => 'https://goo.gl/lightsaber',
100
+ 'comments_count' => '45',
101
+ 'post_id' => 1
102
+ );
103
+
104
+ // Generate HTML for the template
105
+ $gen_out = self::html( $template, $page_info );
106
+
107
+ echo '<!doctype html><html lang="en"><head><meta charset="utf-8"><title>' . __( 'WP Socializer template preview', 'wpsr' ) . '</title>';
108
+
109
+
110
+ echo '</head><body>' . $gen_out[ 'html' ];
111
+
112
+ WPSR_Includes::preview_print_includes();
113
+
114
+ echo '</body></html>';
115
+
116
+ die(0);
117
+
118
+ }
119
+
120
+ }
121
+
122
+ class WPSR_Template_Sharebar{
123
+
124
+ public static function init(){
125
+
126
+ add_action( 'wp_footer', array( __CLASS__, 'output' ) );
127
+
128
+ add_action( 'wp_ajax_wpsr_preview_template_sharebar', array( __CLASS__, 'preview' ) );
129
+
130
+ }
131
+
132
+ public static function output(){
133
+
134
+ $sb_settings = wp_parse_args( get_option( 'wpsr_sharebar_settings' ), WPSR_Lists::defaults( 'sharebar' ) );
135
+ $loc_rules_answer = WPSR_Location_Rules::check_rule( $sb_settings[ 'loc_rules' ] );
136
+
137
+ if( $sb_settings[ 'ft_status' ] != 'disable' && $loc_rules_answer ){
138
+ $gen_out = self::html( $sb_settings );
139
+ echo $gen_out[ 'html' ];
140
+ do_action( 'wpsr_do_sharebar_print_template_end' );
141
+ }
142
+
143
+ }
144
+
145
+ public static function html( $opts, $page_info = array() ){
146
+
147
+ $html = '';
148
+ $buttons = array();
149
+ $classes = array();
150
+ $styles = array();
151
+
152
+ $decoded = base64_decode( $opts[ 'buttons' ] );
153
+ $rows = json_decode( $decoded );
154
+
155
+ if( !is_object( $rows ) || empty( $rows ) )
156
+ return '';
157
+
158
+ if( $opts[ 'type' ] == 'horizontal' ){
159
+ array_push( $classes, 'wpsr-sb-hl-' . $opts[ 'hl_position' ] );
160
+ #array_push( $styles, 'width:' . $opts[ 'hl_width' ] );
161
+ array_push( $styles, ( $opts[ 'hl_position' ] == 'wbottom' ? 'bottom' : 'top' ) . ':' . $opts[ 'offset' ] );
162
+ }else{
163
+ array_push( $classes, 'wpsr-sb-vl-' . $opts[ 'vl_position' ] );
164
+ array_push( $classes, 'wpsr-sb-vl-' . $opts[ 'vl_movement' ] );
165
+ array_push( $styles, ( $opts[ 'vl_position' ] == 'wleft' ? 'left' : ( $opts[ 'vl_position' ] == 'scontent' ) ? 'margin-left' : 'right' ) . ':' . $opts[ 'offset' ] );
166
+ }
167
+
168
+ array_push( $classes, 'wpsr-sb-' . ( $opts[ 'type' ] == 'horizontal' ? 'hl' : 'vl' ) );
169
+ array_push( $classes, 'wpsr-sb-' . $opts[ 'theme' ] );
170
+ $classes = array_merge( $classes, explode( ',', $opts[ 'css_class' ] ) );
171
+
172
+ if( $opts[ 'bg_color' ] != '' )
173
+ array_push( $styles, 'background-color:' . $opts[ 'bg_color' ] );
174
+
175
+ if( $opts[ 'border_color' ] != '' )
176
+ array_push( $styles, 'border-color:' . $opts[ 'border_color' ] );
177
+
178
+ if( $opts[ 'oc_color' ] == 'white' )
179
+ array_push( $classes, 'wpsr-sb-wocbtn' );
180
+
181
+ $classes = implode( ' ', $classes );
182
+ $styles = implode( ';', $styles );
183
+
184
+ // Apply filters
185
+ $rows = apply_filters( 'wpsr_mod_sharebar_template', $rows );
186
+
187
+ foreach( $rows as $row ){
188
+ if( count( $row->buttons ) > 0 ){
189
+ $html .= '<div class="wp-socializer wpsr-sharebar ' . esc_attr( $classes ) . '" style="' . esc_attr( $styles ) . '" data-stickto="' . esc_attr( $opts[ 'stick_element' ] ) . '">';
190
+ $html .= '<div class="wpsr-sb-inner">';
191
+
192
+ foreach( $row->buttons as $button ){
193
+ $btn = key( ( array )$button );
194
+ array_push( $buttons, $btn );
195
+ $html .= '<span class="wpsr-btn">' . WPSR_Buttons::get_button( $btn, $page_info ) . '</span>';
196
+ }
197
+ $html .= '</div>';
198
+ $html .= '<div class="wpsr-sb-close" title="Open or close sharebar"><span class="wpsr-icon"></span></div>';
199
+ $html .= '</div>';
200
+ }
201
+ break;
202
+ }
203
+
204
+ $out = array(
205
+ 'html' => $html,
206
+ 'buttons' => $buttons
207
+ );
208
+
209
+ return apply_filters( 'wpsr_mod_sharebar_template_html', $out );
210
+
211
+ }
212
+
213
+ public static function preview(){
214
+
215
+ $g = $_GET;
216
+
217
+ $page_info = array(
218
+ 'title' => 'Google',
219
+ 'url' => 'https://www.google.com',
220
+ 'excerpt' => 'Dummy excerpt for WP Socializer preview',
221
+ 'short_url' => 'https://goo.gl/lightsaber',
222
+ 'comments_count' => '45',
223
+ 'post_id' => 1
224
+ );
225
+ $g[ 'stick_element' ] = '#main_content';
226
+
227
+ // Generate HTML for the template
228
+ $gen_out = self::html( $g, $page_info );
229
+
230
+ echo '<!doctype html><html lang="en"><head><meta charset="utf-8"><title>WP Socializer template preview</title>';
231
+ echo '<script src="' . WPSR_Lists::ext_res( 'jquery' ) . '"></script>';
232
+ echo '<script src="' . WPSR_ADMIN_URL . 'js/sharebar_preview.js"></script>';
233
+ echo '<link href="' . WPSR_ADMIN_URL . 'css/sharebar_preview.css" rel="stylesheet" type="text/css" media="all" />';
234
+ echo '<meta name="viewport" content="width=device-width, initial-scale=1" />';
235
+
236
+ $dmap = array(
237
+ 'vertical' => array(
238
+ 'tdec' => __( 'left', 'wpsr' ),
239
+ 'tinc' => __( 'right', 'wpsr' ),
240
+ ),
241
+ 'horizontal' => array(
242
+ 'tdec' => __( 'up', 'wpsr' ),
243
+ 'tinc' => __( 'down', 'wpsr' )
244
+ ),
245
+ );
246
+
247
+ $change_offset = '';
248
+ $utext = array();
249
+ if( $g[ 'type' ] == 'horizontal' ){
250
+ $change_offset = ( $g[ 'hl_position' ] == 'wbottom' ) ? 'bottom' : 'top';
251
+ $utext = $dmap[ 'horizontal' ];
252
+ }else{
253
+ $change_offset = ( $g[ 'vl_position' ] == 'wleft' ) ? 'left' : ( $g[ 'vl_position' ] == 'scontent' ) ? 'margin-left': 'right';
254
+ $utext = $dmap[ 'vertical' ];
255
+ }
256
+
257
+ echo '</head>';
258
+ echo '<body>' . $gen_out[ 'html' ];
259
+ echo '
260
+ <div id="main_content"></div>
261
+ <div class="adjust_bar">
262
+ <h3>' . __( 'Preview and Settings', 'wpsr' ) . '</h3>
263
+ <h4>' . __( 'Adjust sharebar position from window', 'wpsr' ) . '</h4>
264
+ <p>' . sprintf( __( 'Drag the slider below to adjust the sharebar position %s or %s', 'wpsr' ), $utext[ 'tdec' ], $utext[ 'tinc' ] ) . '</p>
265
+ <div class="adj_btn_wrap"><input type="range" class="offset_drag" min="-500" max="500" step="1" width="100%" value="' . intval( $g[ 'offset' ] ) . '" data-coffset="' . $change_offset . '"/><input type="text" class="offset_val" value="' . intval( $g[ 'offset' ] ) . 'px" /></div>
266
+ <div class="adj_footer"><button class="save_btn">' . __( 'Save and close', 'wpsr' ) . '</button> <button class="close_btn">' . __( 'Close without saving', 'wpsr' ) . '</button></div>
267
+ </div>';
268
+
269
+ WPSR_Includes::preview_print_includes();
270
+
271
+ echo '</body></html>';
272
+
273
+ die(0);
274
+ }
275
+
276
+ }
277
+
278
+ class WPSR_Template_Followbar{
279
+
280
+ public static function init(){
281
+
282
+ add_action( 'wp_footer', array( __CLASS__, 'output' ) );
283
+
284
+ }
285
+
286
+ public static function output(){
287
+
288
+ $fb_settings = get_option( 'wpsr_followbar_settings' );
289
+ $loc_rules_answer = WPSR_Location_Rules::check_rule( $fb_settings[ 'loc_rules' ] );
290
+
291
+ if( $fb_settings[ 'ft_status' ] != 'disable' && $loc_rules_answer ){
292
+ $gen_html = self::html( $fb_settings );
293
+ echo $gen_html;
294
+ do_action( 'wpsr_do_followbar_print_template_end' );
295
+ }
296
+
297
+ }
298
+
299
+ public static function html( $opts, $floating = True ){
300
+
301
+ $opts = wp_parse_args( $opts, WPSR_Lists::defaults( 'followbar' ) );
302
+ $template = $opts[ 'template' ];
303
+ $decoded = base64_decode( $template );
304
+ $btns = json_decode( $decoded );
305
+ $sb_sites = WPSR_Lists::social_buttons();
306
+ $html = '';
307
+
308
+ if( !is_array( $btns ) ){
309
+ return '';
310
+ }
311
+
312
+ $styles = array();
313
+ if ( $opts[ 'bg_color' ] != '' ) array_push( $styles, 'background-color: ' . $opts[ 'bg_color' ] . ';border-color: ' . $opts[ 'bg_color' ] );
314
+ if ( $opts[ 'icon_color' ] != '' ) array_push( $styles, 'color: ' . $opts[ 'icon_color' ] );
315
+ $style = join( ';', $styles );
316
+
317
+ $text_class = ( $opts[ 'text' ] != 'hide' ) ? 'sr-text-' . $opts[ 'text' ] : '';
318
+
319
+ foreach( $btns as $btn_obj ){
320
+
321
+ $id = key( (array) $btn_obj );
322
+ $prop = $sb_sites[ $id ];
323
+
324
+ $cicon = '';
325
+ if ( $btn_obj->$id->icon != '' ){
326
+ $cicon = 'sr-cicon';
327
+ $style = '';
328
+ }
329
+
330
+ $iclasses = array( 'sr-' . $id, $text_class, $cicon );
331
+ $onclick = array_key_exists( 'onclick', $prop ) ? 'onclick="' . esc_attr( $prop[ 'onclick' ] ) . '"' : '';
332
+
333
+ $html .= '<span class="' . esc_attr( join( ' ', $iclasses ) ) . '">';
334
+ $html .= '<a rel="nofollow" href="' . esc_attr( $btn_obj->$id->url ) . '" target="_blank" title="' . esc_attr( $prop[ 'name' ] ) . '" style="' . esc_attr( $style ) . '" ' . $onclick . '>';
335
+
336
+ if( $btn_obj->$id->icon == '' ){
337
+ $html .= '<i class="fa fa-' . esc_attr( $prop[ 'icon' ] ) . '"></i>';
338
+ }else{
339
+ $html .= '<img src="' . esc_attr( $btn_obj->$id->icon ) . '" alt="' . esc_attr( $prop[ 'name' ] ) . '" />';
340
+ }
341
+
342
+ $html .= '</a>';
343
+
344
+ if( $text_class != '' ){
345
+ $html .= '<span class="text">' . ( ( $btn_obj->$id->text == '' ) ? $prop[ 'name' ] : $btn_obj->$id->text ) . '</span>';
346
+ }
347
+
348
+ $html .= '</span>';
349
+
350
+ }
351
+
352
+ $classes = array( 'socializer', 'sr-followbar', 'sr-' . $opts[ 'size' ] );
353
+
354
+ if( $opts[ 'shape' ] != '' ) array_push( $classes, 'sr-' . $opts[ 'shape' ] );
355
+ if( $opts[ 'hover' ] != '' ) array_push( $classes, 'sr-' . $opts[ 'hover' ] );
356
+ if( $opts[ 'pad' ] != '' ) array_push( $classes, 'sr-' . $opts[ 'pad' ] );
357
+ if( $opts[ 'orientation' ] == 'vertical' ) array_push( $classes, 'sr-vertical' );
358
+ if( $opts[ 'open_popup' ] == '' ) array_push( $classes, 'sr-popup' );
359
+ if( !$floating ) array_push( $classes, 'sr-multiline' );
360
+
361
+ $classes = join( ' ', $classes );
362
+
363
+ $html = '<div class="' . $classes . '">' . $html . '</div>';
364
+
365
+ if( $floating ){
366
+ $title = ( $opts[ 'title' ] != '' ) ? '<div class="sr-fb-title">' . $opts[ 'title' ] . '</div>' : '';
367
+ $orientation = ( $opts[ 'orientation' ] == 'horizontal' ) ? 'sr-fb-hl' : '';
368
+ $fb_classes = array( 'wpsr-followbar', 'sr-fb-' . $opts[ 'position' ], $orientation );
369
+ $html = '<div class="' . esc_attr( join( ' ', $fb_classes ) ) . '">' . $title . $html . '</div>';
370
+ }
371
+
372
+ if( !$floating && isset( $opts[ 'profile_text' ] ) && trim( $opts[ 'profile_text' ] ) != '' ){
373
+ $html = '<p>' . $opts[ 'profile_text' ] . '</p>' . $html;
374
+ }
375
+
376
+ return $html;
377
+
378
+ }
379
+
380
+ }
381
+
382
+ class WPSR_Template_Text_Sharebar{
383
+
384
+ public static function init(){
385
+
386
+ add_action( 'wp_footer', array( __CLASS__, 'output' ) );
387
+
388
+ }
389
+
390
+ public static function output(){
391
+
392
+ $tsb_settings = get_option( 'wpsr_text_sharebar_settings' );
393
+ $loc_rules_answer = WPSR_Location_Rules::check_rule( $tsb_settings[ 'loc_rules' ] );
394
+
395
+ if( $tsb_settings[ 'ft_status' ] != 'disable' && $loc_rules_answer && !wp_is_mobile() ){
396
+ $gen_html = self::html( $tsb_settings );
397
+ echo $gen_html;
398
+ do_action( 'wpsr_do_text_sharebar_print_template_end' );
399
+ }
400
+
401
+ }
402
+
403
+ public static function html( $opts ){
404
+
405
+ $opts = wp_parse_args( $opts, WPSR_Lists::defaults( 'text_sharebar' ) );
406
+ $template = $opts[ 'template' ];
407
+ $decoded = base64_decode( $template );
408
+ $btns = json_decode( $decoded );
409
+ $sb_sites = WPSR_Lists::social_buttons();
410
+ $page_info = WPSR_Metadata::metadata();
411
+ $html = '';
412
+
413
+ $g_settings = get_option( 'wpsr_general_settings' );
414
+ $g_settings = wp_parse_args( $g_settings, WPSR_Lists::defaults( 'gsettings_twitter' ) );
415
+ $t_username = ( $g_settings[ 'twitter_username' ] != '' ) ? '@' . $g_settings[ 'twitter_username' ] : '';
416
+
417
+ if( !is_array( $btns ) ){
418
+ return '';
419
+ }
420
+
421
+ foreach( $btns as $btn ){
422
+ $sb_info = $sb_sites[ $btn ];
423
+ $link = array_key_exists( 'link_tsb', $sb_info ) ? $sb_info[ 'link_tsb' ] : $sb_info[ 'link' ];
424
+ $onclick = array_key_exists( 'onclick', $sb_info ) ? 'onclick="' . esc_attr( $sb_info[ 'onclick' ] ) . '"' : '';
425
+
426
+ $html .= '<li><a href="#" title="' . esc_attr( $sb_info[ 'title' ] ) . '" data-link="' . esc_attr( $link ) . '" style="color: ' . esc_attr( $opts[ 'icon_color' ] ) . '" ' . $onclick . '><i class="fa fa-' . esc_attr( $sb_info[ 'icon' ] ) . '"></i></a></li>';
427
+ }
428
+
429
+ $html = '<ul class="wpsr-text-sb wpsr-tsb-' . esc_attr( $opts[ 'size' ] ) . ' wpsr-clearfix" data-content="' . esc_attr( $opts[ 'content' ] ) . '" data-tcount="' . esc_attr( $opts[ 'text_count' ] ) . '" style="background-color: ' . esc_attr( $opts[ 'bg_color' ] ) . '" data-url="' . esc_attr( $page_info[ 'url' ] ) . '" data-title="' . esc_attr( $page_info[ 'title' ] ) . '" data-surl="' . esc_attr( $page_info[ 'short_url' ] ) . '" data-tuname="' . esc_attr( $t_username ) . '">' . $html . '</ul>';
430
+
431
+ return $html;
432
+
433
+ }
434
+
435
+ }
436
+
437
+ class WPSR_Template_Mobile_Sharebar{
438
+
439
+ public static function init(){
440
+
441
+ add_action( 'wp_footer', array( __CLASS__, 'output' ) );
442
+
443
+ }
444
+
445
+ public static function output(){
446
+
447
+ $msb_settings = get_option( 'wpsr_mobile_sharebar_settings' );
448
+ $loc_rules_answer = WPSR_Location_Rules::check_rule( $msb_settings[ 'loc_rules' ] );
449
+
450
+ if( $msb_settings[ 'ft_status' ] != 'disable' && $loc_rules_answer && ( wp_is_mobile() || $msb_settings[ 'on_desktop' ] == 'yes' ) ){
451
+ $gen_html = self::html( $msb_settings );
452
+ echo $gen_html;
453
+ do_action( 'wpsr_do_mobile_sharebar_print_template_end' );
454
+ }
455
+
456
+ }
457
+
458
+ public static function html( $opts ){
459
+
460
+ $opts = wp_parse_args( $opts, WPSR_Lists::defaults( 'mobile_sharebar' ) );
461
+ $template = $opts[ 'template' ];
462
+ $decoded = base64_decode( $template );
463
+ $btns = json_decode( $decoded );
464
+ $sb_sites = WPSR_Lists::social_buttons();
465
+ $page_info = WPSR_Metadata::metadata();
466
+ $html = '';
467
+
468
+ if( !is_array( $btns ) ){
469
+ return '';
470
+ }
471
+
472
+ $styles = array();
473
+ if ( $opts[ 'bg_color' ] != '' ) array_push( $styles, 'background-color: ' . $opts[ 'bg_color' ] );
474
+ if ( $opts[ 'icon_color' ] != '' ) array_push( $styles, 'color: ' . $opts[ 'icon_color' ] );
475
+ $style = join( ';', $styles );
476
+
477
+ foreach( $btns as $btn ){
478
+ $sb_info = $sb_sites[ $btn ];
479
+ $link = self::get_url( $sb_info[ 'link' ], $page_info );
480
+ $onclick = array_key_exists( 'onclick', $sb_info ) ? 'onclick="' . esc_attr( $sb_info[ 'onclick' ] ) . '"' : '';
481
+
482
+ $html .= '<span class="sr-' . $btn . '"><a rel="nofollow" target="_blank" href="' . esc_attr( $link ) . '" title="' . esc_attr( $sb_info[ 'title' ] ) . '" style="' . $style . '" ' . $onclick . '><i class="fa fa-' . esc_attr( $sb_info[ 'icon' ] ) . '" tar></i></a></span>';
483
+ }
484
+
485
+ $classes = array( 'socializer', 'wpsr-mobile-sb', 'sr-' . $opts[ 'size' ], 'sr-fluid', 'sr-opacity', 'sr-popup' );
486
+
487
+ if( $opts[ 'pad' ] != '' ) array_push( $classes, 'sr-' . $opts[ 'pad' ] );
488
+
489
+ $classes = join( ' ', $classes );
490
+
491
+ $html = '<div class="' . $classes . '">' . $html . '</div>';
492
+
493
+ return $html;
494
+
495
+ }
496
+
497
+ public static function get_url( $url, $pinfo ){
498
+
499
+ $g_settings = get_option( 'wpsr_general_settings' );
500
+ $g_settings = wp_parse_args( $g_settings, WPSR_Lists::defaults( 'gsettings_twitter' ) );
501
+ $t_username = ( $g_settings[ 'twitter_username' ] != '' ) ? '@' . $g_settings[ 'twitter_username' ] : '';
502
+
503
+ $search = array(
504
+ '{url}',
505
+ '{title}',
506
+ '{excerpt}',
507
+ '{s-url}',
508
+ '{rss-url}',
509
+ '{twitter-username}',
510
+ );
511
+
512
+ $replace = array(
513
+ $pinfo[ 'url' ],
514
+ $pinfo[ 'title' ],
515
+ $pinfo[ 'excerpt' ],
516
+ $pinfo[ 'short_url' ],
517
+ $pinfo[ 'rss_url' ],
518
+ $t_username
519
+ );
520
+
521
+ return str_replace( $search, $replace, $url );
522
+ }
523
+
524
+ }
525
+
526
+ WPSR_Template_Buttons::init();
527
+ WPSR_Template_Sharebar::init();
528
+ WPSR_Template_Followbar::init();
529
+ WPSR_Template_Text_Sharebar::init();
530
+ WPSR_Template_Mobile_Sharebar::init();
531
+
532
+ class wpsr_template_button_handler{
533
+
534
+ private $props;
535
+ private $type;
536
+
537
+ function __construct( $properties, $type ){
538
+
539
+ $this->props = $properties;
540
+ $this->type = $type;
541
+
542
+ }
543
+
544
+ function print_template( $content ){
545
+
546
+ $call_from_excerpt = 0;
547
+ $call_stack = debug_backtrace();
548
+
549
+ foreach( $call_stack as $call ){
550
+ if( $call['function'] == 'the_excerpt' || $call['function'] == 'get_the_excerpt' ){
551
+ $call_from_excerpt = 1;
552
+ }
553
+ }
554
+
555
+ $loc_rules_answer = WPSR_Location_Rules::check_rule( $this->props[ 'loc_rules' ] );
556
+ $rule_in_excerpt = ( $this->props[ 'in_excerpt' ] == 'show' );
557
+ $output = $content;
558
+
559
+ if( $loc_rules_answer ){
560
+
561
+ if( ( $this->type == 'content' && $call_from_excerpt != 1 ) || ( $this->type == 'excerpt' && $rule_in_excerpt == 1 ) ){
562
+
563
+ $gen_out = WPSR_Template_Buttons::html( $this->props[ 'content' ] );
564
+
565
+ if( !empty( $gen_out[ 'html' ] ) ){
566
+
567
+ $final_template = $gen_out[ 'html' ];
568
+
569
+ if( $this->props[ 'position' ] == 'above_below_posts' )
570
+ $output = $final_template . $content . $final_template;
571
+
572
+ if( $this->props[ 'position' ] == 'above_posts' )
573
+ $output = $final_template . $content;
574
+
575
+ if( $this->props[ 'position' ] == 'below_posts' )
576
+ $output = $content . $final_template;
577
+
578
+ }
579
+ }
580
+
581
+ do_action( 'wpsr_do_buttons_print_template_end' );
582
+
583
+ }
584
+
585
+ return $output;
586
+
587
+ }
588
+
589
+ }
590
+
591
+ ?>
core/widgets.php ADDED
@@ -0,0 +1,389 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Widget class for WP Socializer
4
+ *
5
+ */
6
+
7
+ class WPSR_Widgets{
8
+
9
+ private static $widgets = array();
10
+
11
+ public static function init(){
12
+
13
+ add_action( 'admin_enqueue_scripts', array( __class__, 'print_widget_scripts' ) );
14
+
15
+ }
16
+
17
+ public static function register( $id, $details ){
18
+
19
+ $defaults = array(
20
+ 'name' => '',
21
+ 'callbacks' => array(
22
+ 'widget' => '',
23
+ 'form' => '',
24
+ 'update' => ''
25
+ )
26
+ );
27
+
28
+ $details[ 'callbacks' ] = wp_parse_args( $details[ 'callbacks' ], $defaults[ 'callbacks' ] );
29
+ $details = wp_parse_args( $details, $defaults );
30
+
31
+ self::$widgets[ $id ] = $details;
32
+
33
+ }
34
+
35
+ public static function widget( $id, $args, $instance ){
36
+
37
+ if( !self::check_callable( $id, 'widget' ) ){
38
+ return '';
39
+ }
40
+
41
+ return call_user_func( self::$widgets[ $id ][ 'callbacks' ][ 'widget' ], $args, $instance );
42
+
43
+ }
44
+
45
+ public static function form( $id, $widget_obj, $instance ){
46
+
47
+ if( !self::check_callable( $id, 'form' ) ){
48
+ return '';
49
+ }
50
+
51
+ call_user_func( self::$widgets[ $id ][ 'callbacks' ][ 'form' ], $widget_obj, $instance );
52
+
53
+ }
54
+
55
+ public static function update( $id, $instance ){
56
+
57
+ if( !self::check_callable( $id, 'update' ) ){
58
+ return $instance;
59
+ }
60
+
61
+ return call_user_func( self::$widgets[ $id ][ 'callbacks' ][ 'update' ], $instance );
62
+
63
+ }
64
+
65
+ public static function check_callable( $id, $callback ){
66
+
67
+ $widgets = self::$widgets;
68
+
69
+ if( array_key_exists( $id, $widgets ) ){
70
+ $widget = $widgets[ $id ];
71
+ if( array_key_exists( $callback, $widget[ 'callbacks' ] ) && !empty( $widget[ 'callbacks' ][ $callback ] ) && is_callable( $widget[ 'callbacks' ][ $callback ] ) ){
72
+ return 1;
73
+ }
74
+ }
75
+
76
+ return 0;
77
+
78
+ }
79
+
80
+ public static function list_all(){
81
+
82
+ $widgets_temp = self::$widgets;
83
+
84
+ foreach( $widgets_temp as $id => $config ){
85
+ unset( $widgets_temp[ $id ][ 'callbacks' ] );
86
+ }
87
+
88
+ return apply_filters( 'wpsr_mod_widgets_list', $widgets_temp );
89
+
90
+ }
91
+
92
+ public static function print_widget_scripts( $hook ){
93
+ if( $hook == 'widgets.php' ){
94
+
95
+ echo '<script>window.wpsr_ppe_ajax = "' . esc_attr( get_admin_url() . 'admin-ajax.php' ) . '"; </script>';
96
+
97
+ wp_enqueue_style( 'wpsr_admin_widget_css', WPSR_ADMIN_URL . 'css/style_widgets.css' );
98
+ wp_enqueue_script( 'wpsr_admin_widget_js', WPSR_ADMIN_URL . 'js/script_widgets.js', array( 'jquery' ) );
99
+ wp_enqueue_script( 'wp-color-picker' );
100
+ wp_enqueue_style( 'wp-color-picker' );
101
+ wp_enqueue_style( 'wpsr_fa', WPSR_Lists::ext_res( 'font-awesome' ) );
102
+
103
+ wp_enqueue_style( 'wpsr_ipopup', WPSR_ADMIN_URL . 'css/ipopup.css' );
104
+ wp_enqueue_script( 'wpsr_ipopup', WPSR_ADMIN_URL . 'js/ipopup.js' );
105
+ }
106
+ }
107
+
108
+ }
109
+
110
+ WPSR_Widgets::init();
111
+
112
+ /**
113
+ * Widget form API
114
+ */
115
+
116
+ class WPSR_Widget_Form_Fields{
117
+
118
+ function __construct( $widget_obj, $instance ){
119
+ $this->obj = $widget_obj;
120
+ $this->instance = $instance;
121
+ }
122
+
123
+ function text( $id, $name, $opts = array() ){
124
+
125
+ $opts = wp_parse_args( $opts, array(
126
+ 'class' => 'widefat',
127
+ 'helper' => '',
128
+ 'placeholder' => '',
129
+ 'custom' => ''
130
+ ));
131
+
132
+ echo '<p>';
133
+ echo '<label for="' . esc_attr( $this->obj->get_field_id( $id ) ) . '">' . $name . '</label>';
134
+ echo WPSR_Admin::field( 'text', array(
135
+ 'name' => $this->obj->get_field_name( $id ),
136
+ 'id' => $this->obj->get_field_id( $id ),
137
+ 'value' => $this->instance[ $id ],
138
+ 'class' => $opts[ 'class' ],
139
+ 'helper' => $opts[ 'helper' ],
140
+ 'placeholder' => $opts[ 'placeholder' ],
141
+ 'custom' => $opts[ 'custom' ]
142
+ ));
143
+ echo '</p>';
144
+ }
145
+
146
+ function select( $id, $name, $list, $opts = array() ){
147
+
148
+ $opts = wp_parse_args( $opts, array(
149
+ 'class' => 'widefat',
150
+ 'helper' => '',
151
+ 'placeholder' => '',
152
+ 'custom' => ''
153
+ ));
154
+
155
+ echo '<p>';
156
+ echo '<label for="' . esc_attr( $this->obj->get_field_id( $id ) ) . '">' . $name . '</label>';
157
+ echo WPSR_Admin::field( 'select', array(
158
+ 'name' => $this->obj->get_field_name( $id ),
159
+ 'id' => $this->obj->get_field_id( $id ),
160
+ 'value' => $this->instance[ $id ],
161
+ 'list' => $list,
162
+ 'class' => $opts[ 'class' ],
163
+ 'helper' => $opts[ 'helper' ],
164
+ 'placeholder' => $opts[ 'placeholder' ],
165
+ 'custom' => $opts[ 'custom' ]
166
+ ));
167
+ echo '</p>';
168
+ }
169
+
170
+ function number( $id, $name, $opts = array() ){
171
+
172
+ $opts = wp_parse_args( $opts, array(
173
+ 'class' => 'smallfat',
174
+ 'helper' => '',
175
+ 'placeholder' => '',
176
+ 'custom' => ''
177
+ ));
178
+
179
+ echo '<p>';
180
+ echo '<label for="' . esc_attr( $this->obj->get_field_id( $id ) ) . '">' . $name . '</label>';
181
+ echo WPSR_Admin::field( 'text', array(
182
+ 'name' => $this->obj->get_field_name( $id ),
183
+ 'id' => $this->obj->get_field_id( $id ),
184
+ 'value' => $this->instance[ $id ],
185
+ 'class' => $opts[ 'class' ],
186
+ 'helper' => $opts[ 'helper' ],
187
+ 'placeholder' => $opts[ 'placeholder' ],
188
+ 'type' => 'number',
189
+ 'custom' => $opts[ 'custom' ]
190
+ ));
191
+ echo '</p>';
192
+ }
193
+
194
+ }
195
+
196
+ /**
197
+ * Main WP Socializer widget
198
+ *
199
+ */
200
+
201
+ class WPSR_Main_Widget extends WP_Widget{
202
+
203
+ function __construct(){
204
+ parent::__construct(
205
+ 'wpsr_main_widget',
206
+ 'WP Socializer',
207
+ array( 'description' => esc_html__( 'Use this widget to add follow me icons, social media buttons and more to your widget', 'wpsr' ), ),
208
+ array('width' => 500, 'height' => 500)
209
+ );
210
+ }
211
+
212
+ public function widget( $args, $instance ){
213
+
214
+ echo $args[ 'before_widget' ];
215
+ if ( !empty( $instance[ 'title' ] ) ) {
216
+ echo $args[ 'before_title' ] . apply_filters( 'widget_title', $instance[ 'title' ] ) . $args[ 'after_title' ];
217
+ }
218
+
219
+ $widgets = WPSR_Widgets::list_all();
220
+ $selected_widget = $instance[ 'widget' ];
221
+
222
+ if( array_key_exists( $selected_widget, $widgets ) ){
223
+ WPSR_Widgets::widget( $selected_widget, $args, $instance );
224
+ }
225
+
226
+ echo $args['after_widget'];
227
+ }
228
+
229
+ public function form( $instance ){
230
+
231
+ $widgets = WPSR_Widgets::list_all();
232
+ $instance = wp_parse_args( $instance, array(
233
+ 'title' => '',
234
+ 'widget' => ''
235
+ ));
236
+
237
+ $selected_widget = $instance[ 'widget' ];
238
+ $fields = new WPSR_Widget_Form_Fields( $this, $instance );
239
+
240
+ $widgets_list = array( '' => 'Select a widget to display' );
241
+ foreach( $widgets as $w_id => $w_info ){
242
+ $widgets_list[ $w_id ] = $w_info[ 'name' ];
243
+ }
244
+
245
+ $fields->text( 'title', 'Title' );
246
+ $fields->select( 'widget', 'Widget', $widgets_list, array( 'class' => 'widefat wpsr_widget_selector' ) );
247
+
248
+ if( array_key_exists( $selected_widget, $widgets ) ){
249
+ echo '<div class="wpsr_widget_wrap">';
250
+ WPSR_Widgets::form( $selected_widget, $this, $instance );
251
+ echo '</div>';
252
+ }else{
253
+ echo '<div class="notice notice-warning inline"><p>' . __( 'Please select a widget and click "Save" to load settings', 'wpsr' ) . '</p></div>';
254
+ }
255
+
256
+ }
257
+
258
+ public function update( $new_instance, $old_instance ){
259
+
260
+ $widgets = WPSR_Widgets::list_all();
261
+ $selected_widget = $new_instance[ 'widget' ];
262
+
263
+ if( array_key_exists( $selected_widget, $widgets ) ){
264
+ return WPSR_Widgets::update( $selected_widget, $new_instance );
265
+ }else{
266
+ return $new_instance;
267
+ }
268
+ }
269
+
270
+ }
271
+
272
+ function wpsr_register_main_widget(){
273
+ register_widget( 'WPSR_Main_Widget' );
274
+ }
275
+ add_action( 'widgets_init', 'wpsr_register_main_widget' );
276
+
277
+ /**
278
+ * All social media buttons widget
279
+ */
280
+
281
+ class wpsr_widget_buttons{
282
+
283
+ function __construct(){
284
+
285
+ WPSR_Widgets::register( 'buttons_widget', array(
286
+ 'name' => 'All social media buttons widget',
287
+ 'callbacks' => array(
288
+ 'widget' => array( $this, 'widget' ),
289
+ 'form' => array( $this, 'form' ),
290
+ 'update' => array( $this, 'update' )
291
+ )
292
+ ));
293
+
294
+ $this->defaults = array(
295
+ 'buttons_template' => ''
296
+ );
297
+
298
+ // Custom widget template widget
299
+ add_action( 'wp_ajax_wpsr_widget_buttons', array( $this, 'buttons_editor' ) );
300
+
301
+ }
302
+
303
+ function buttons_editor(){
304
+
305
+ global $hook_suffix;
306
+ $hook_suffix = WPSR_Admin::$pagehook;
307
+ set_current_screen( $hook_suffix );
308
+
309
+ iframe_header( 'WP Socializer Widget template editor' );
310
+
311
+ if( !isset( $_GET[ 'template' ] ) || !isset( $_GET[ 'cnt_id' ] ) || !isset( $_GET[ 'prev_id' ] ) ){
312
+ echo '<p align="center">Incomplete info to load editor !</p></body></html>';
313
+ die( 0 );
314
+ }
315
+
316
+ $feature = array(
317
+ 'name' => 'widgets',
318
+ 'hide_services' => array()
319
+ );
320
+
321
+ echo '<div id="wpsr_pp_editor">';
322
+ echo '<h3>WP Socializer - widget template editor</h3>';
323
+ WPSR_Admin::box_wrap( 'open', __( 'Create buttons', 'wpsr' ), __( 'Select a service from the list to create a new button', 'wpsr' ), '1' );
324
+ WPSR_Admin::buttons_selector( $feature );
325
+
326
+ echo '<p>' . __( 'List of buttons created.', 'wpsr' ) . '</p>';
327
+ $buttons = WPSR_Buttons::list_all();
328
+ WPSR_Admin::buttons_list( 'all_buttons', $feature );
329
+
330
+ WPSR_Admin::box_wrap( 'close' );
331
+
332
+ WPSR_Admin::box_wrap( 'open', __( 'Drag &amp; drop buttons into template', 'wpsr' ), __( 'Drag the buttons from the above list and drop it into the template below. Click "+" to add a new row. Click and drag row to rearrange its order.', 'wpsr' ), '2' );
333
+ WPSR_Admin::buttons_veditor( 'widget_buttons_template', esc_attr( $_GET[ 'template' ] ), true, 'wpsr_preview_template_buttons' );
334
+ WPSR_Admin::box_wrap( 'close' );
335
+
336
+ echo '<p class="wpsr_ppe_footer" align="center"><button class="button button-primary wpsr_ppe_save" data-mode="widget" data-cnt-id="' . esc_attr( $_GET[ 'cnt_id' ] ) . '" data-prev-id="' . esc_attr( $_GET[ 'prev_id' ] ) . '">Apply settings</button> <button class="button wpsr_ppe_cancel">Cancel</button></p>';
337
+
338
+ echo '</div>';
339
+
340
+ iframe_footer();
341
+ die( 0 );
342
+ }
343
+
344
+ function widget( $args, $instance ){
345
+
346
+ $instance = wp_parse_args( $instance, $this->defaults );
347
+
348
+ $out = WPSR_Template_Buttons::html( $instance[ 'buttons_template' ] );
349
+ echo $out[ 'html' ];
350
+
351
+ }
352
+
353
+ function form( $obj, $instance ){
354
+
355
+ echo '<h4>' . __( 'Social media buttons widget', 'wpsr' ) . '</h4>';
356
+
357
+ $instance = wp_parse_args( $instance, $this->defaults );
358
+ $fields = new WPSR_Widget_Form_Fields( $obj, $instance );
359
+
360
+ $wtmpl_val = esc_attr( $instance[ 'buttons_template' ] );
361
+ $wtmpl_cnt_id = $obj->get_field_id( 'buttons_template' );
362
+ $wtmpl_prev_id = $obj->get_field_id( 'wtmpl_prev' );
363
+
364
+ echo '<div class="hidden">';
365
+ $fields->text( 'buttons_template', '' );
366
+ echo '</div>';
367
+
368
+ echo '<div class="wpsr_wtmpl_wrap clearfix" id="' . $wtmpl_prev_id . '">';
369
+ if( $wtmpl_val != '' ){
370
+ WPSR_Admin::buttons_veditor( 'widget_buttons_template', $wtmpl_val, true, 'wpsr_wtmpl_dummy' );
371
+ }else{
372
+ echo '<p align="center">' . __( 'No buttons are added to template. Open the editor to add buttons', 'wpsr' ) . '</p>';
373
+ }
374
+ echo '</div>';
375
+
376
+ echo '<br/>';
377
+ echo '<p align="center"><button class="button button-primary wpsr_ppe_widget_open" data-wtmpl-cnt-id="' . $wtmpl_cnt_id . '" data-wtmpl-prev-id="' . $wtmpl_prev_id . '">' . __( 'Open editor', 'wpsr' ) . '</button></p>';
378
+
379
+ }
380
+
381
+ function update( $instance ){
382
+ return $instance;
383
+ }
384
+
385
+ }
386
+
387
+ new wpsr_widget_buttons();
388
+
389
+ ?>
includes/wpsr-addthis.php DELETED
@@ -1,254 +0,0 @@
1
- <?php
2
- /*
3
- * Addthis button Processor code for WP Socializer Plugin
4
- * Version : 2.2
5
- * Author : Aakash Chakravarthy
6
- */
7
-
8
- function wpsr_addthis_uniqueid(){
9
- $rand_no = dechex(mt_rand(0,min(0xffffffff,mt_getrandmax())));
10
- $current_time = dechex(time());
11
- $unique_id = 'wp-' . $current_time . str_pad($rand_no, 8, '0', STR_PAD_LEFT);
12
-
13
- $wpsr_addthis = get_option('wpsr_addthis_data');
14
-
15
- $wpsr_addthis['username'] = $unique_id;
16
- update_option("wpsr_addthis_data", $wpsr_addthis);
17
-
18
- return $unique_id;
19
- }
20
-
21
- function wpsr_addthis_config(){
22
- ## Get Addthis Options
23
- $wpsr_addthis = get_option('wpsr_addthis_data');
24
-
25
- $wpsr_addthis_lang = $wpsr_addthis['language'];
26
- $wpsr_addthis_button = $wpsr_addthis['button'];
27
- $wpsr_addthis_btbrand = $wpsr_addthis['btbrand'];
28
- $wpsr_addthis_clickback = $wpsr_addthis['clickback'];
29
- $wpsr_addthis_btheadclr = $wpsr_addthis['btheadclr'];
30
- $wpsr_addthis_btheadbgclr = $wpsr_addthis['btheadbgclr'];
31
-
32
- # Config settings
33
- if($wpsr_addthis['username'] == ''){
34
- $wpsr_addthis_username = 'username: "' . wpsr_addthis_uniqueid() . '"' . ",\n";
35
- }else{
36
- $wpsr_addthis_username = 'username: "' . $wpsr_addthis['username'] . '"' . ",\n";
37
- }
38
-
39
- if($wpsr_addthis['language'] != 'lg-share-'){
40
- $wpsr_addthis_lang = 'en';
41
- }
42
-
43
- if($wpsr_addthis_btbrand != ''){
44
- $wpsr_addthis_btbrand = 'ui_cobrand: "' . $wpsr_addthis_btbrand .'"' . ",\n";
45
- }else{
46
- $wpsr_addthis_btbrand = '';
47
- }
48
-
49
- if($wpsr_addthis_btheadclr != ''){
50
- $wpsr_addthis_btheadclr = 'ui_header_color: "' . $wpsr_addthis_btheadclr . '"' . ",\n";
51
- }else{
52
- $wpsr_addthis_btheadclr = '';
53
- }
54
-
55
- if($wpsr_addthis_btheadbgclr != ''){
56
- $wpsr_addthis_btheadbgclr = 'ui_header_background: "' . $wpsr_addthis_btheadbgclr . '"' . ",\n";
57
- }else{
58
- $wpsr_addthis_btheadbgclr = '';
59
- }
60
-
61
- if($wpsr_addthis_clickback == 1){
62
- $wpsr_addthis_clickback = 'data_track_clickback: true' . "\n";
63
- }else{
64
- $wpsr_addthis_clickback = 'data_track_clickback: false' . "\n";
65
- }
66
-
67
- $wpsr_addthis_config = $wpsr_addthis_username . $wpsr_addthis_btbrand . $wpsr_addthis_btheadclr . $wpsr_addthis_btheadbgclr . $wpsr_addthis_clickback;
68
-
69
- $wpsr_addthis_settings =
70
- "\n<script type=\"text/javascript\">\n" .
71
- "<!--\n" .
72
- "var addthis_config = { \n" .
73
- $wpsr_addthis_config .
74
- "}\n//-->" .
75
- "</script>\n";
76
-
77
- // Return the script
78
- return "\n<!-- WP Socializer - AddThis Config -->" .
79
- $wpsr_addthis_settings .
80
- "<!-- WP Socializer - End AddThis Config -->\n";
81
- }
82
-
83
- function wpsr_addthis_script(){
84
- return '<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js"></script>';
85
- }
86
-
87
- function wpsr_addthis($args = ''){
88
- global $post;
89
-
90
- $details = wpsr_get_post_details();
91
- $def_url = $details['permalink'];
92
- $def_title = $details['title'];
93
-
94
- ## Get Addthis Options
95
- $wpsr_addthis = get_option('wpsr_addthis_data');
96
-
97
- $defaults = array (
98
- 'output' => 'button',
99
- 'url' => $def_url,
100
- 'title' => $def_title,
101
- 'type' => 'button',
102
- 'btstyle' => 'lg-share-',
103
- 'tbstyle' => '16px',
104
- 'tbservices' => 'facebook,twitter,digg,delicious,email,compact',
105
- 'scstyle' => 'normal',
106
- 'username' => $wpsr_addthis['username'],
107
- 'lang' => 'en',
108
- 'text' => __('Share with Addthis' ,'wpsr'),
109
- 'params' => '',
110
- );
111
-
112
- $args = wp_parse_args($args, $defaults);
113
- extract($args, EXTR_SKIP);
114
-
115
- ## Adjustments
116
- $url = ' addthis:url="' . $url .'"' ;
117
- $title = ' addthis:title="' . $title .'"' ;
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
125
- case 'button':
126
- switch($type){
127
- // Display the toolbar
128
- case 'toolbar':
129
-
130
- $style = ($tbstyle == '16px') ? 'addthis_default_style' : 'addthis_default_style addthis_32x32_style';
131
- $outer_start = '<div class="addthis_toolbox ' . $style . '"' . $url . $title . '>' . "\n";
132
- $outer_end = '</div>';
133
-
134
- $default_code = '<a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a>';
135
-
136
- switch($tbstyle){
137
- case '16px':
138
- if($tbservices == ''){
139
- $inner = $default_code;
140
- }else{
141
- $tb_16px = explode(',', $tbservices);
142
- foreach($tb_16px as $tb_16px_srvc){
143
- $tb_16px_srvc = trim($tb_16px_srvc);
144
- $inner .= "<a class=\"addthis_button_{$tb_16px_srvc}\"></a>\n";
145
- }
146
- }
147
- break;
148
-
149
- case '32px':
150
- if($tbservices == ''){
151
- $inner = $default_code;
152
- }else{
153
- $tb_32px = explode(',', $tbservices);
154
- foreach($tb_32px as $tb_32px_srvc){
155
- $tb_32px_srvc = trim($tb_32px_srvc);
156
- $inner .= "<a class=\"addthis_button_{$tb_32px_srvc}\"></a>\n";
157
- }
158
- }
159
- break;
160
- }
161
-
162
- $addthis_processed .= $outer_start . $inner . $outer_end;
163
-
164
- break;
165
-
166
- // Display the sharecount
167
- case 'sharecount':
168
-
169
- $outer_start = "\n" . '<div class="addthis_toolbox addthis_default_style"' . $url . $title . '>' . "\n";
170
- $outer_end = '</div>' . "\n";
171
-
172
- switch($scstyle){
173
- case 'normal':
174
- $inner = '<a class="addthis_counter"></a>';
175
- break;
176
-
177
- case 'pill':
178
- $inner = '<a class="addthis_counter addthis_pill_style"></a>';
179
- break;
180
-
181
- case 'grouped':
182
- $inner = '<a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a>';
183
- break;
184
- }
185
-
186
- $addthis_processed .= $outer_start . $inner . $outer_end;
187
-
188
- break;
189
-
190
- // Display the ordinary button
191
- case 'button':
192
-
193
- $addthis_processed .=
194
- '<a class="addthis_button" ' . $params . ' href="http://addthis.com/bookmark.php?v=250&amp;pubid=' . $username .
195
- '"' . $url . $title . '><img src="http://s7.addthis.com/static/btn/v2/' . $btstyle . $lang .
196
- '.gif" width="' . $btwidth . '" height="16" alt="Bookmark and Share" style="border:0"/></a>';
197
-
198
- break;
199
- }
200
- break;
201
-
202
- case 'text':
203
-
204
- $addthis_processed .=
205
- '<a class="addthis_button" ' . $params . ' href="http://addthis.com/bookmark.php?v=250&amp;pubid=' . $username .
206
- '"' . $url . $title . '>' . $text . '</a>';
207
-
208
- break;
209
- }
210
-
211
- $addthis_processed .= "\n<!-- End WP Socializer Plugin - Addthis Button -->\n";
212
-
213
- return $addthis_processed;
214
- }
215
-
216
- ## Addthis function
217
- function wpsr_addthis_bt($type, $tbstyle = '16px'){
218
-
219
- ## Addthis Options
220
- $wpsr_addthis = get_option('wpsr_addthis_data');
221
-
222
- ## Start Output
223
- $wpsr_addthis_bt_processed = wpsr_addthis(array(
224
- 'output' => 'button',
225
- 'type' => $type,
226
- 'tbstyle' => $tbstyle,
227
- 'scstyle' => $wpsr_addthis['sharecount'],
228
- 'btstyle' => $wpsr_addthis['button'],
229
- 'tbservices' => ($tbstyle == '16px') ? $wpsr_addthis['tb_16pxservices'] : $wpsr_addthis['tb_32pxservices'],
230
- 'lang' => $wpsr_addthis['language'],
231
- ));
232
- ## End Output
233
-
234
- return $wpsr_addthis_bt_processed;
235
- }
236
-
237
- function wpsr_addthis_rss_bt(){
238
-
239
- ## Get the Options
240
- $wpsr_addthis = get_option('wpsr_addthis_data');
241
-
242
- ## Start Output
243
- $wpsr_addthis_processed = wpsr_addthis(array(
244
- 'output' => 'text',
245
- 'type' => 'button',
246
- 'btstyle' => $wpsr_addthis['button'],
247
- 'lang' => $wpsr_addthis['language'],
248
- 'params' => 'target="_blank"',
249
- ));
250
- ## End Output
251
-
252
- return $wpsr_addthis_processed;
253
- }
254
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/wpsr-custom.php DELETED
@@ -1,40 +0,0 @@
1
- <?php
2
- /*
3
- * Custom buttons Processor code for WP Socializer Plugin
4
- * Version : 1.0
5
- * Author : Aakash Chakravarthy
6
- */
7
-
8
- function wpsr_custom_bt($custom){
9
-
10
- global $post;
11
-
12
- $permalink = urlencode(get_permalink($post->ID));
13
- $title = str_replace('+','%20',urlencode(get_the_title($post->ID)));
14
-
15
- $to_be_replaced = array(
16
- "{url}", "{title}"
17
- );
18
-
19
- $replace_with = array(
20
- $permalink, $title
21
- );
22
-
23
- ## Get Custom options
24
- $wpsr_custom = get_option('wpsr_custom_data');
25
-
26
- $wpsr_custom1 = $wpsr_custom['custom1'];
27
- $wpsr_custom2 = $wpsr_custom['custom2'];
28
-
29
- switch ($custom){
30
- case 'custom1' :
31
- return str_replace($to_be_replaced, $replace_with, $wpsr_custom1);
32
- break;
33
-
34
- case 'custom2':
35
- return str_replace($to_be_replaced, $replace_with, $wpsr_custom2);
36
- break;
37
- }
38
-
39
- }
40
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/wpsr-digg.php DELETED
@@ -1,94 +0,0 @@
1
- <?php
2
- /*
3
- * Digg buttons Processor code for WP Socializer Plugin
4
- * Version : 1.1
5
- * Author : Aakash Chakravarthy
6
- */
7
-
8
- function wpsr_digg_script(){
9
- // Return the script
10
- return "
11
- <!-- WP Socializer - Digg Script -->\n" .
12
- "<script type=\"text/javascript\">
13
- (function() {
14
- var s = document.createElement('SCRIPT'), s1 = document.getElementsByTagName('SCRIPT')[0];
15
- s.type = 'text/javascript';
16
- s.async = true;
17
- s.src = 'http://widgets.digg.com/buttons.js';
18
- s1.parentNode.insertBefore(s, s1);
19
- })();
20
- </script>" .
21
- "\n<!-- WP Socializer - End Digg Script -->\n";
22
- }
23
-
24
- function wpsr_digg($args = ''){
25
-
26
- global $post;
27
-
28
- $details = wpsr_get_post_details();
29
- $def_url = $details['permalink'];
30
- $def_title = $details['title'];
31
-
32
- $defaults = array (
33
- 'output' => 'button',
34
- 'url' => $def_url,
35
- 'title' => $def_title,
36
- 'type' => 'DiggMedium',
37
- 'text' => __('Digg this' ,'wpsr'),
38
- 'image' => WPSR_PUBLIC_URL . 'buttons/digg-bt.png',
39
- 'params' => '',
40
- );
41
-
42
- $args = wp_parse_args($args, $defaults);
43
- extract($args, EXTR_SKIP);
44
-
45
- $digg_processed = "\n<!-- Start WP Socializer Plugin - Digg Button -->\n";
46
-
47
- switch($output){
48
- // Display the ordinary button
49
- case 'button':
50
- $digg_processed .= '<a class="DiggThisButton ' . $type . '" href="http://digg.com/submit?url=' . urlencode($url) . '&amp;title=' . urlencode($title) . '" ' . $params . '></a>';
51
- break;
52
-
53
- // Display the Image format
54
- case 'image':
55
- $digg_processed .= '<a href="http://digg.com/submit?url=' . urlencode($url) . '&amp;title=' . urlencode($title) . '" ' . $params . '><img src="' . $image . '" alt="Digg!" /></a>';
56
- break;
57
-
58
- // Display the Text format
59
- case 'text':
60
- $digg_processed .= '<a href="http://digg.com/submit?url=' . urlencode($url) . '&amp;title=' . urlencode($title) . '" ' . $params . '>' . $text . '</a>';
61
- break;
62
- }
63
-
64
- $digg_processed .= "\n<!-- End WP Socializer Plugin - Digg Button -->\n";
65
-
66
- return $digg_processed;
67
- }
68
-
69
- function wpsr_digg_bt(){
70
- ## Digg Options
71
- $wpsr_digg = get_option('wpsr_digg_data');
72
-
73
- ## Start Output
74
- $wpsr_digg_bt_processed = wpsr_digg(array(
75
- 'output' => 'button',
76
- 'type' => $wpsr_digg['type'],
77
- ));
78
- ## End Output
79
-
80
- return $wpsr_digg_bt_processed;
81
- }
82
-
83
- function wpsr_digg_rss_bt(){
84
-
85
- ## Start Output
86
- $wpsr_digg_processed = wpsr_digg(array(
87
- 'output' => 'text',
88
- 'params' => 'target="_blank"',
89
- ));
90
- ## End Output
91
-
92
- return $wpsr_digg_processed;
93
- }
94
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/wpsr-facebook.php DELETED
@@ -1,91 +0,0 @@
1
- <?php
2
- /*
3
- * Facebook buttons Processor code for WP Socializer Plugin
4
- * Version : 1.9
5
- * Author : Aakash Chakravarthy
6
- */
7
-
8
- function wpsr_facebook($args = ''){
9
- global $post;
10
-
11
- $details = wpsr_get_post_details();
12
- $def_url = $details['permalink'];
13
- $def_title = $details['title'];
14
-
15
- $defaults = array (
16
- 'output' => 'button',
17
- 'url' => $def_url,
18
- 'title' => $def_title,
19
- 'type' => 'like',
20
- 'style' => 'button_count',
21
- 'showfaces' => 1,
22
- 'verb' => 'like',
23
- 'color' => 'light',
24
- 'appid' => '',
25
- 'text' => __('Share on Facebook', 'wpsr'),
26
- 'image' => WPSR_PUBLIC_URL . 'buttons/facebook-bt.png',
27
- 'params' => '',
28
- );
29
-
30
- $args = wp_parse_args($args, $defaults);
31
- extract($args, EXTR_SKIP);
32
-
33
- $facebook_processed = "\n<!-- Start WP Socializer Plugin - Facebook Button -->\n";
34
-
35
- switch($output){
36
- // Output ordinary button
37
- case 'button':
38
-
39
- $facebook_processed .=
40
- '<div class="fb-like" data-href="' . $url . '" data-share="' . ( $type == 'send' ? 'true' : 'false') . '" data-layout="' . $style . '" data-show-faces="' . $showfaces . '" data-action="' . $verb . '" data-colorscheme="' . $color . '"></div>';
41
-
42
- break;
43
-
44
- // Output Image format
45
- case 'image':
46
- $facebook_processed .= '<a href="https://www.facebook.com/sharer.php?u=' . urlencode($url) . '" ' . $params . '><img src="' . $image . '" /></a>';
47
- break;
48
-
49
- // Output Text format
50
- case 'text':
51
- $facebook_processed .= '<a href="https://www.facebook.com/sharer.php?u=' . urlencode($url) . '" ' . $params . '>' . $text . '</a>';
52
- break;
53
- }
54
-
55
- $facebook_processed .= "\n<!-- End WP Socializer Plugin - Facebook Button -->\n";
56
-
57
- return $facebook_processed;
58
- }
59
-
60
- function wpsr_facebook_bt($type){
61
-
62
- ## Get Facebook Options
63
- $wpsr_facebook = get_option('wpsr_facebook_data');
64
-
65
- ## Start Output
66
- $wpsr_facebook_bt_processed = wpsr_facebook(array(
67
- 'output' => 'button',
68
- 'type' => $type,
69
- 'style' => $wpsr_facebook['btstyle'],
70
- 'showfaces' => $wpsr_facebook['showfaces'],
71
- 'verb' => $wpsr_facebook['verb'],
72
- 'color' => $wpsr_facebook['color'],
73
- 'appid' => $wpsr_facebook['appid']
74
- ));
75
- ## End Output
76
-
77
- return $wpsr_facebook_bt_processed;
78
- }
79
-
80
- function wpsr_facebook_rss_bt(){
81
-
82
- ## Start Output
83
- $wpsr_facebook_processed = wpsr_facebook(array(
84
- 'output' => 'text',
85
- 'params' => 'target="_blank"',
86
- ));
87
- ## End Output
88
-
89
- return $wpsr_facebook_processed;
90
- }
91
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/wpsr-floatingbar.php DELETED
@@ -1,124 +0,0 @@
1
- <?php
2
- /*
3
- * Floating share bar Processor code for WP Socializer Plugin
4
- * Version : 1.5
5
- * Since : v2.4
6
- * Author : Aakash Chakravarthy
7
- */
8
-
9
- ## Floating share bar processor
10
- function wpsr_process_floatingbts(){
11
- global $wpsr_floating_bar_bts;
12
- $wpsr_floatbts = get_option('wpsr_template_floating_bar_data');
13
- $wpsr_settings = get_option('wpsr_settings_data');
14
-
15
- $content = '';
16
-
17
- if($wpsr_floatbts['disabled'] == 1)
18
- return '';
19
-
20
- $selSplitted = explode(',', $wpsr_floatbts['selectedbts']);
21
- $noSel = count($selSplitted);
22
-
23
- for($i=0; $i < $noSel; $i++){
24
- $content .= '<div class="wpsr_floatbt">' . $wpsr_floating_bar_bts[$selSplitted[$i]][$wpsr_floatbts['position']] . "</div>" ;
25
- }
26
-
27
- $width = ($wpsr_floatbts['position'] == 'bottom_fixed') ? 'style="width:' . $wpsr_floatbts['bottomfixed_width'] . 'px"' : '';
28
- $mobmode = ($wpsr_floatbts['mobmode'] == 1) ? ' data-mobmode="0" ' : ' data-mobmode="1" ';
29
-
30
- $start = '<div class="wpsr-floatbar-' . $wpsr_floatbts['position'] . ' wpsr-floatbar-' . $wpsr_floatbts['theme'] . ($wpsr_floatbts['floatleft_movable'] ? ' wpsr-floatbar-movable ' : '') . ' clearfix" ' . $width . $mobmode . '>';
31
-
32
- if($wpsr_floatbts['position'] == 'bottom_fixed')
33
- $end .= '<div title="Collapse the Share bar" class="wpsr_hidebt"></div>';
34
-
35
- $end = '</div>';
36
-
37
- if($wpsr_floatbts['position'] == 'float_left')
38
- $end .= '<div class="wpsr_shareminbt"></div>';
39
-
40
- return $start . $content . $end;
41
-
42
- }
43
-
44
- ## Floating bar conditions check.
45
- function wpsr_floatingbts_check(){
46
- $wpsr_floatbts = get_option('wpsr_template_floating_bar_data');
47
- $flag = 0;
48
-
49
- if($wpsr_floatbts['disabled'])
50
- return 0;
51
- if (is_single() == 1 && $wpsr_floatbts['insingle'] == 1){
52
- $flag = 1;
53
- }elseif (is_page() == 1 && $wpsr_floatbts['inpage'] == 1){
54
- $flag = 1;
55
- }
56
-
57
- if($flag && !empty($wpsr_floatbts['selectedbts'])){
58
- return true;
59
- }
60
- }
61
-
62
- ## Print the buttons and the JS in the footer.
63
- function wpsr_floatingbts_output(){
64
- $wpsr_floatbts = get_option('wpsr_template_floating_bar_data');
65
- if(wpsr_floatingbts_check()){
66
- echo do_shortcode(wpsr_process_floatingbts());
67
- }
68
- }
69
- add_action('wp_footer', 'wpsr_floatingbts_output');
70
-
71
- ## Add the floating bar anchor to the content
72
- function wpsr_floatingbts_anchor($content = ''){
73
-
74
- $wpsr_floatbts = get_option('wpsr_template_floating_bar_data');
75
-
76
- if( empty( $wpsr_floatbts['floatleft_offset'] ) ){
77
- $wpsr_floatbts['floatleft_offset'] = '25';
78
- }
79
-
80
- if (wpsr_floatingbts_check()){
81
- return '<span class="wpsr_floatbts_anchor" data-offset="' . $wpsr_floatbts['floatleft_offset'] . '" ></span>' . $content;
82
- }else{
83
- return $content;
84
- }
85
- }
86
- add_action('the_content', 'wpsr_floatingbts_anchor');
87
-
88
- ## Floating sharebar comments button (Beta)
89
- function wpsr_floatingbts_commentbt($args){
90
- global $post;
91
-
92
- $defaults = array (
93
- 'type' => 'vertical'
94
- );
95
-
96
- $args = wp_parse_args($args, $defaults);
97
- extract($args, EXTR_SKIP);
98
-
99
- $comments_num = get_comments_number();
100
-
101
- if ( comments_open() ) {
102
- if($type == 'vertical'){
103
- return '<div class="wpsr_commentsbt">
104
- <div class="wpsr_cmt_bubble" title="Comments"><a href="' . get_comments_link() .'">' . $comments_num . '</a></div>
105
- <div class="wpsr_cmt_button"><a href="' . get_comments_link() .'">Comment</a></div>
106
- </div>';
107
- }else{
108
-
109
- if ( $comments_num == 0 ) {
110
- $comments = __('No Comments');
111
- } elseif ( $comments_num > 1 ) {
112
- $comments = $comments_num . __(' Comments');
113
- } else {
114
- $comments = __('1 Comment');
115
- }
116
-
117
- return '<a href="' . get_comments_link() .'">' . $comments . '</a>';
118
- }
119
- } else {
120
- return '';
121
- }
122
-
123
- }
124
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/wpsr-google.php DELETED
@@ -1,75 +0,0 @@
1
- <?php
2
- /*
3
- * Google +1 button Processor code for WP Socializer Plugin
4
- * Version : 3.3
5
- * Author : Aakash Chakravarthy
6
- */
7
-
8
- function wpsr_plusone_script(){
9
- // Return the script
10
- return "\n<!-- WP Socializer - +1 Script -->\n".
11
- "<script type=\"text/javascript\">
12
- (function() {
13
- var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
14
- po.src = 'https://apis.google.com/js/plusone.js';
15
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
16
- })();
17
- </script>".
18
- "\n<!-- WP Socializer - End +1 Script -->\n";
19
- }
20
-
21
- function wpsr_plusone($args = ''){
22
- global $post;
23
-
24
- $details = wpsr_get_post_details();
25
- $def_url = $details['permalink'];
26
- $def_title = $details['title'];
27
-
28
- $defaults = array(
29
- 'output' => 'button',
30
- 'url' => $def_url,
31
- 'title' => $def_title,
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);
39
- extract($args, EXTR_SKIP);
40
-
41
- $plusone_processed = "\n<!-- Start WP Socializer Plugin - +1 Button -->\n";
42
-
43
- switch($output){
44
- // Display the ordinary button
45
- case 'button':
46
- $plusone_processed .= '<div class="g-plusone" data-size="' . $type . '" data-href="' . $url . '"></div>';
47
- break;
48
- }
49
-
50
- $plusone_processed .= "\n<!-- End WP Socializer Plugin - +1 Button -->\n";
51
-
52
- return $plusone_processed;
53
- }
54
-
55
- function wpsr_plusone_bt($type = 'standard'){
56
-
57
- ## Start Output
58
- $wpsr_plusone_bt_processed = wpsr_plusone(array(
59
- 'output' => 'button',
60
- 'type' => $type
61
- ));
62
- ## End Output
63
-
64
- return $wpsr_plusone_bt_processed;
65
- }
66
-
67
- function wpsr_plusone_rss_bt(){
68
-
69
- ## Start Output
70
- $wpsr_plusone_processed = '';
71
- ## End Output
72
-
73
- return $wpsr_plusone_processed;
74
- }
75
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/wpsr-other.php DELETED
@@ -1,329 +0,0 @@
1
- <?php
2
- /*
3
- * Pinterest, Reddit, StumbleUpon and LinkedIn buttons Processor code for WP Socializer Plugin
4
- * Version : 2.5
5
- * Since v2.0
6
- * Author : Aakash Chakravarthy
7
- */
8
-
9
- // StumbleUpon button
10
- function wpsr_stumbleupon_script(){
11
- return "
12
- <!-- WP Socializer - StumbleUpon Script -->
13
- <script type=\"text/javascript\">
14
- (function() {
15
- var li = document.createElement('script'); li.type = 'text/javascript'; li.async = true;
16
- li.src = window.location.protocol + '//platform.stumbleupon.com/1/widgets.js';
17
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(li, s);
18
- })();
19
- </script>
20
- <!-- WP Socializer - StumbleUpon Script -->\n";
21
- }
22
-
23
- function wpsr_stumbleupon($args = ''){
24
- global $post;
25
-
26
- $details = wpsr_get_post_details();
27
- $def_url = $details['permalink'];
28
- $def_title = $details['title'];
29
-
30
- $defaults = array (
31
- 'output' => 'button',
32
- 'url' => $def_url,
33
- 'title' => $def_title,
34
- 'type' => '1',
35
- 'text' => __('Stumble this' ,'wpsr'),
36
- 'image' => WPSR_PUBLIC_URL . 'buttons/stumbleupon-bt.gif',
37
- 'params' => '',
38
- );
39
-
40
- $args = wp_parse_args($args, $defaults);
41
- extract($args, EXTR_SKIP);
42
-
43
- $stumbleupon_processed = "\n<!-- Start WP Socializer Plugin - StumbleUpon Button -->\n";
44
-
45
- switch($output){
46
- // Display the ordinary button
47
- case 'button':
48
- $stumbleupon_processed .= '<su:badge layout="' . $type . '"></su:badge>';
49
- break;
50
-
51
- // Display the Image format
52
- case 'image':
53
- $stumbleupon_processed .= '<a href="http://www.stumbleupon.com/submit?url=' . urlencode($url) . '&title=' . urlencode($title) . '" ' . $params . '><img src="' . $image . '" alt="Submit to Stumbleupon" /></a>';
54
- break;
55
-
56
- // Display the Text format
57
- case 'text':
58
- $stumbleupon_processed .= '<a href="http://www.stumbleupon.com/submit?url=' . urlencode($url) . '&title=' . urlencode($title) . '" ' . $params . '>' . $text . '</a>';
59
- break;
60
- }
61
-
62
- $stumbleupon_processed .= "\n<!-- End WP Socializer Plugin - StumbleUpon Button -->\n";
63
-
64
- return $stumbleupon_processed;
65
- }
66
-
67
- function wpsr_stumbleupon_bt($type){
68
-
69
- ## Start Output
70
- $wpsr_stumbleupon_bt_processed = wpsr_stumbleupon(array(
71
- 'output' => 'button',
72
- 'type' => $type,
73
- ));
74
- ## End Output
75
-
76
- return $wpsr_stumbleupon_bt_processed;
77
- }
78
-
79
- function wpsr_stumbleupon_rss_bt(){
80
-
81
- ## Start Output
82
- $wpsr_stumbleupon_processed = wpsr_stumbleupon(array(
83
- 'output' => 'text',
84
- 'params' => 'target="_blank"',
85
- ));
86
- ## End Output
87
-
88
- return $wpsr_stumbleupon_processed;
89
- }
90
-
91
- // Pinterest button
92
- function wpsr_pinterest_script(){
93
- return "
94
- <!-- WP Socializer - Pinterest Script -->\n" .
95
- '<script type="text/javascript" src="//assets.pinterest.com/js/pinit.js"></script>'.
96
- "\n<!-- WP Socializer - Pinterest Script -->\n";
97
- }
98
-
99
- function wpsr_pinterest($args = ''){
100
-
101
- global $post;
102
-
103
- $details = wpsr_get_post_details();
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,
111
- 'title' => $def_title,
112
- 'type' => 'horizontal',
113
- 'media' => $def_media,
114
- 'text' => __('Submit this to', 'wpsr'),
115
- 'image' => '//assets.pinterest.com/images/PinExt.png',
116
- 'params' => '',
117
- );
118
-
119
- $args = wp_parse_args($args, $defaults);
120
- extract($args, EXTR_SKIP);
121
-
122
- // fix padding problem since 2.4.9.8
123
- $padd = "";
124
- if( $type == 'above' ) $padd = 'style="padding:35px 0 5px"';
125
- elseif( $type == 'beside' ) $padd = 'style="padding-right:50px"';
126
-
127
- $pinterest_processed = "\n<!-- Start WP Socializer Plugin - Pinterest Button -->\n";
128
-
129
- switch($output){
130
- // Display the ordinary button
131
- case 'button':
132
- $pinterest_processed .= '<div ' . $padd . '><a href="http://pinterest.com/pin/create/button/?url=' . urlencode($url) . '&amp;media=' . urlencode($media) . '" data-pin-do="buttonPin" data-pin-config="' . $type . '" ><img border="0" src="//assets.pinterest.com/images/pidgets/pinit_fg_en_rect_gray_20.png" alt="Pinterest" title="Pin It" /></a></div>';
133
- break;
134
-
135
- // Display the Image format
136
- case 'image':
137
- $pinterest_processed .= '<a href="http://pinterest.com/pin/create/button/?url=' . urlencode($url) . '&amp;media=' . urlencode($media) . '" ' . $params . '><img src="' . $image . '" alt="Submit to Reddit" /></a>';
138
- break;
139
-
140
- // Display the Text format
141
- case 'text':
142
- $pinterest_processed .= '<a href="http://pinterest.com/pin/create/button/?url=' . urlencode($url) . '&amp;media=' . urlencode($media) . '" ' . $params . '>' . $text . '</a>';
143
- break;
144
- }
145
-
146
- $pinterest_processed .= "\n<!-- End WP Socializer Plugin - Pinterest Button -->\n";
147
-
148
- return $pinterest_processed;
149
- }
150
-
151
- function wpsr_pinterest_bt($type){
152
-
153
- ## Start Output
154
- $wpsr_pinterest_processed = wpsr_pinterest(array(
155
- 'output' => 'button',
156
- 'type' => $type,
157
- ));
158
- ## End Output
159
-
160
- return $wpsr_pinterest_processed;
161
- }
162
-
163
- function wpsr_pinterest_rss_bt(){
164
-
165
- ## Start Output
166
- $wpsr_pinterest_processed = wpsr_pinterest(array(
167
- 'output' => 'text',
168
- 'params' => 'target="_blank"',
169
- ));
170
- ## End Output
171
-
172
- return $wpsr_pinterest_processed;
173
- }
174
-
175
- // Reddit button
176
- function wpsr_reddit($args = ''){
177
-
178
- global $post;
179
-
180
- $details = wpsr_get_post_details();
181
- $def_url = $details['permalink'];
182
- $def_title = $details['title'];
183
-
184
- $defaults = array (
185
- 'output' => 'button',
186
- 'url' => $def_url,
187
- 'title' => $def_title,
188
- 'type' => '2',
189
- 'text' => __('Reddit this', 'wpsr'),
190
- 'image' => WPSR_PUBLIC_URL . 'buttons/reddit-bt.gif',
191
- 'params' => '',
192
- );
193
-
194
- $args = wp_parse_args($args, $defaults);
195
- extract($args, EXTR_SKIP);
196
-
197
- $reddit_processed = "\n<!-- Start WP Socializer Plugin - Reddit Button -->\n";
198
-
199
- switch($output){
200
- // Display the ordinary button
201
- case 'button':
202
- $reddit_processed .= '<script type="text/javascript">reddit_url = "' . $url . '";reddit_title = "' . $title . '";reddit_newwindow="1";</script><script type="text/javascript" src="http://www.reddit.com/static/button/button' . $type . '.js"></script>';
203
- break;
204
-
205
- // Display the Image format
206
- case 'image':
207
- $reddit_processed .= '<a href="http://www.reddit.com/submit?url=' . urlencode($url) . '&amp;title=' . urlencode($title) . '" ' . $params . '><img src="' . $image . '" alt="Submit to Reddit" /></a>';
208
- break;
209
-
210
- // Display the Text format
211
- case 'text':
212
- $reddit_processed .= '<a href="http://www.reddit.com/submit?url=' . urlencode($url) . '&amp;title=' . urlencode($title) . '" ' . $params . '>' . $text . '</a>';
213
- break;
214
- }
215
-
216
- $reddit_processed .= "\n<!-- End WP Socializer Plugin - Reddit Button -->\n";
217
-
218
- return $reddit_processed;
219
- }
220
-
221
- function wpsr_reddit_bt($type){
222
-
223
- ## Start Output
224
- $wpsr_reddit_bt_processed = wpsr_reddit(array(
225
- 'output' => 'button',
226
- 'type' => $type,
227
- ));
228
- ## End Output
229
-
230
- return $wpsr_reddit_bt_processed;
231
- }
232
-
233
- function wpsr_reddit_rss_bt(){
234
-
235
- ## Start Output
236
- $wpsr_reddit_processed = wpsr_reddit(array(
237
- 'output' => 'text',
238
- 'params' => 'target="_blank"',
239
- ));
240
- ## End Output
241
-
242
- return $wpsr_reddit_processed;
243
- }
244
-
245
-
246
- // LinkedIn button
247
- function wpsr_linkedin_script(){
248
- // Return the script
249
- return "
250
- <!-- WP Socializer - LinkedIn Script -->\n".
251
- "<script type=\"text/javascript\">
252
- (function() {
253
- var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
254
- po.src = 'http://platform.linkedin.com/in.js';
255
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
256
- })();
257
- </script>".
258
- "\n<!-- WP Socializer - End LinkedIn Script -->\n";
259
- }
260
-
261
- function wpsr_linkedin($args = ''){
262
-
263
- global $post;
264
-
265
- $details = wpsr_get_post_details();
266
- $def_url = $details['permalink'];
267
- $def_title = $details['title'];
268
-
269
- $defaults = array (
270
- 'output' => 'button',
271
- 'url' => $def_url,
272
- 'title' => $def_title,
273
- 'type' => 'right',
274
- 'text' => __('Submit this to ' ,'wpsr'),
275
- 'image' => WPSR_PUBLIC_URL . 'buttons/linkedin-bt.png',
276
- 'params' => '',
277
- );
278
-
279
- $args = wp_parse_args($args, $defaults);
280
- extract($args, EXTR_SKIP);
281
-
282
- $linkedin_processed = "\n<!-- Start WP Socializer Plugin - LinkedIn Button -->\n";
283
-
284
- switch($output){
285
- // Display the ordinary button
286
- case 'button':
287
- $linkedin_processed .= '<script type="IN/Share" data-url="' . $url . '" data-counter="' . $type . '"></script>';
288
- break;
289
-
290
- // Display the Image format
291
- case 'image':
292
- $linkedin_processed .= '<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=' . urlencode($url) . '&amp;title=' . urlencode($title) . '" ' . $params . '><img src="' . $image . '" alt="Submit to linkedin" /></a>';
293
- break;
294
-
295
- // Display the Text format
296
- case 'text':
297
- $linkedin_processed .= '<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=' . urlencode($url) . '&amp;title=' . urlencode($title) . '" ' . $params . '>' . $text . '</a>';
298
- break;
299
- }
300
-
301
- $linkedin_processed .= "\n<!-- End WP Socializer Plugin - LinkedIn Button -->\n";
302
-
303
- return $linkedin_processed;
304
- }
305
-
306
- function wpsr_linkedin_bt($type){
307
-
308
- ## Start Output
309
- $wpsr_linkedin_bt_processed = wpsr_linkedin(array(
310
- 'output' => 'button',
311
- 'type' => $type,
312
- ));
313
- ## End Output
314
-
315
- return $wpsr_linkedin_bt_processed;
316
- }
317
-
318
- function wpsr_linkedin_rss_bt(){
319
-
320
- ## Start Output
321
- $wpsr_linkedin_processed = wpsr_linkedin(array(
322
- 'output' => 'text',
323
- 'params' => 'target="_blank"',
324
- ));
325
- ## End Output
326
-
327
- return $wpsr_linkedin_processed;
328
- }
329
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/wpsr-retweet.php DELETED
@@ -1,160 +0,0 @@
1
- <?php
2
- /*
3
- * Retweet buttons Processor code for WP Socializer Plugin
4
- * Version : 2.5
5
- * Author : Aakash Chakravarthy
6
- */
7
-
8
- function wpsr_retweet_topsy_script(){
9
- // Return the script
10
- return "\n<!-- WP Socializer - Topsy Script -->\n" .
11
- '<script type="text/javascript" src="http://cdn.topsy.com/topsy.js?init=topsyWidgetCreator"></script>' .
12
- "\n<!-- WP Socializer - End Topsy Script -->\n";
13
- }
14
-
15
- function wpsr_retweet_twitter_script(){
16
- // Return the script
17
- return "\n<!-- WP Socializer - Twitter Script -->\n" .
18
- '<script type="text/javascript" src="//platform.twitter.com/widgets.js"></script>' .
19
- "\n<!-- WP Socializer - End Twitter Script -->\n";
20
- }
21
-
22
- function wpsr_retweet($args = ''){
23
- global $post;
24
-
25
- $details = wpsr_get_post_details();
26
- $def_url = $details['permalink'];
27
- $def_title = $details['title'];
28
-
29
- $defaults = array (
30
- 'output' => 'button',
31
- 'url' => $def_url,
32
- 'title' => $def_title,
33
- 'username' => '',
34
- 'service' => 'twitter',
35
- 'type' => 'compact',
36
- 'topsytheme' => 'blue',
37
- 'twitter_recacc' => '',
38
- 'twitter_lang' => 'en',
39
- 'text' => __('Retweet this' ,'wpsr'),
40
- 'image' => WPSR_PUBLIC_URL . 'buttons/retweet-bt.png',
41
- 'params' => '',
42
- );
43
-
44
- $args = wp_parse_args($args, $defaults);
45
- extract($args, EXTR_SKIP);
46
-
47
- $pid = $post->ID;
48
- $purl = home_url() . '/?p=' . $pid;
49
- //$title = trim(str_replace(array( '&', '#', '&#8211;' ), array('', '', '-'), $title)); // revised since v2.4.9.5
50
-
51
- ## Start Output
52
- $retweet_processed = "\n<!-- Start WP Socializer Plugin - Retweet Button -->\n";
53
-
54
- switch($output){
55
- // Display the buttons
56
- case 'button':
57
- switch($service){
58
- // Twitter button processing code
59
- case 'twitter':
60
-
61
- switch($type){
62
- case 'normal': $type = 'vertical'; break;
63
- case 'compact': $type = 'horizontal'; break;
64
- case 'nocount': $type = 'none'; break;
65
- }
66
-
67
- $user = ($username == '') ? '' : "data-via='$username'";
68
- $recacc = ($twitter_recacc == '') ? '' : "data-related='$twitter_recacc'";
69
-
70
- $retweet_processed .=
71
- '<a href="http://twitter.com/share" class="twitter-share-button" data-count="' . $type . '" ' . $user . ' data-lang="' . $twitter_lang . '" ' . $recacc . ' data-url="' . $url . '" data-text="' . $title . ' - "></a>';
72
-
73
- break;
74
-
75
- // Tweetmeme processing code
76
- case "tweetmeme" :
77
-
78
- $retweet_processed .=
79
- '<script type="text/javascript">' . "\n" . "<!--\n" .
80
- 'tweetmeme_url = "' . $url . '"; ' .
81
- 'tweetmeme_style = "' . $type . '"; ' .
82
- 'tweetmeme_source = "' . $username . '"; ' . "\n" . "\n-->" .
83
- '</script>' . "\n" .
84
- '<script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script>';
85
-
86
- break;
87
-
88
- // Topsy processing code
89
- case "topsy" :
90
-
91
- if($type == 'normal'){
92
- $type = "big";
93
- }else{
94
- $type = '';
95
- }
96
-
97
- $retweet_processed .=
98
- '<div class="topsy_widget_data"><!--{' .
99
- '"url": "' . $url . '", ' .
100
- '"title": "'. $title . '", ' .
101
- '"style": "'. $type . '", ' .
102
- '"nick": "'. $username . '", ' .
103
- '"theme": "'. $topsytheme . '", ' .
104
- '}--></div>';
105
-
106
- break;
107
- }
108
-
109
- break;
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
117
- case 'text':
118
- $retweet_processed .= '<a href="http://twitter.com/?status=RT @' . $username . ' ' . $title .' ' . $purl .'" ' . $params . '>' . $text . '</a>';
119
- break;
120
- }
121
-
122
- $retweet_processed .= "\n<!-- End WP Socializer Plugin - Retweet Button -->\n";
123
-
124
- return $retweet_processed;
125
- }
126
-
127
- function wpsr_retweet_bt(){
128
-
129
- global $post;
130
-
131
- # Get Retweet Button Options
132
- $wpsr_retweet = get_option('wpsr_retweet_data');
133
-
134
- ## Start Output
135
- $wpsr_retweet_processed = wpsr_retweet(array(
136
- 'output' => 'button',
137
- 'type' => $wpsr_retweet['type'],
138
- 'service' => $wpsr_retweet['service'],
139
- 'username' => $wpsr_retweet['username'],
140
- 'topsytheme' => $wpsr_retweet['topsytheme'],
141
- 'twitter_recacc' => $wpsr_retweet['twitter_recacc'],
142
- 'twitter_lang' => $wpsr_retweet['twitter_lang'],
143
- ));
144
- ## End Output
145
-
146
- return $wpsr_retweet_processed;
147
- }
148
-
149
- function wpsr_retweet_rss_bt(){
150
-
151
- ## Start Output
152
- $wpsr_retweet_processed = wpsr_retweet(array(
153
- 'output' => 'text',
154
- 'params' => 'target="_blank"',
155
- ));
156
- ## End Output
157
-
158
- return $wpsr_retweet_processed;
159
- }
160
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/wpsr-sharethis.php DELETED
@@ -1,185 +0,0 @@
1
- <?php
2
- /*
3
- * Sharethis buttons Processor code for WP Socializer Plugin
4
- * Version : 2.6
5
- * Author : Aakash Chakravarthy
6
- */
7
-
8
- ## Generators
9
- function wpsr_sharethis_pubkey(){
10
- $key = "wp.".sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ),mt_rand( 0, 0x0fff ) | 0x4000,mt_rand( 0, 0x3fff ) | 0x8000,mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ) );
11
-
12
- ## Sharethis options
13
- $wpsr_sharethis = get_option('wpsr_sharethis_data');
14
-
15
- $wpsr_sharethis['pubkey'] = $key;
16
- update_option("wpsr_sharethis_data", $wpsr_sharethis);
17
-
18
- return $key;
19
- }
20
-
21
- function wpsr_sharethis_config(){
22
- ## Sharethis options
23
- $wpsr_sharethis = get_option('wpsr_sharethis_data');
24
-
25
- $wpsr_sharethis_pubkey = $wpsr_sharethis['pubkey'];
26
- $wpsr_sharethis_pubkey = ($wpsr_sharethis_pubkey == '') ? wpsr_sharethis_pubkey() : $wpsr_sharethis_pubkey;
27
- $wpsr_sharethis_copynshare = $wpsr_sharethis['copynshare'] ? 'true' : 'false';
28
-
29
- // Return the script
30
- return '<!-- WP Socializer - ShareThis Config -->
31
- <script type="text/javascript">
32
- var switchTo5x=false;
33
- var sharethisLoad = function(){
34
- ' . "stLight.options({publisher: '{$wpsr_sharethis_pubkey}', doNotHash: {$wpsr_sharethis_copynshare}, doNotCopy: {$wpsr_sharethis_copynshare}, hashAddressBar: false});" . '
35
- };
36
- if(window.addEventListener) window.addEventListener("load", sharethisLoad, false);
37
- else if (window.attachEvent) window.attachEvent("onload", sharethisLoad);
38
- </script>
39
- <!-- WP Socializer - End ShareThis Config -->';
40
- }
41
-
42
- function wpsr_sharethis_script(){
43
- return '<script charset="utf-8" type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>';
44
- }
45
-
46
- function wpsr_sharethis($args = ''){
47
- global $post;
48
-
49
- $details = wpsr_get_post_details();
50
- $def_url = $details['permalink'];
51
- $def_title = $details['title'];
52
-
53
- ## Sharethis option
54
- $wpsr_sharethis = get_option('wpsr_sharethis_data');
55
-
56
- # Get Retweet Button Options
57
- $wpsr_retweet = get_option('wpsr_retweet_data');
58
-
59
- $defaults = array (
60
- 'output' => 'vcount',
61
- 'url' => $def_url,
62
- 'title' => $def_title,
63
- 'services' => 'facebook,twitter,email,sharethis',
64
- 'pubkey' => $wpsr_sharethis['pubkey'],
65
- 'addp' => 1,
66
- 'text' => 'ShareThis',
67
- 'image' => WPSR_PUBLIC_URL . 'buttons/sharethis-bt.png',
68
- 'params' => '',
69
- );
70
-
71
- $args = wp_parse_args($args, $defaults);
72
- extract($args, EXTR_SKIP);
73
-
74
- // Preliminary Adjustments
75
- if($services == ''){
76
- $output = 'classic';
77
- }else{
78
- $services_split = explode(',', $services);
79
- }
80
-
81
- // $title = urlencode($title); (fix v2.1)
82
- // $url = urlencode($url); (fix v2.4.6)
83
- $username = $wpsr_retweet['username'];
84
-
85
- if($addp == 1){
86
- $before_st = '<p>';
87
- $after_st = '</p>';
88
- }else{
89
- $before_st = $after_st = '';
90
- }
91
-
92
- $sharethis_processed = "\n<!-- Start WP Socializer Plugin - Sharethis Button -->\n" . $before_st;
93
- switch($output){
94
- case 'vcount':
95
- foreach($services_split as $srvc){
96
- $srvc = trim($srvc);
97
- $sharethis_processed .= "<span class='st_{$srvc}_vcount' st_title='{$title}' st_via='{$username}' st_url='{$url}' displayText='share'></span>";
98
- }
99
- break;
100
-
101
- case 'hcount':
102
- foreach($services_split as $srvc){
103
- $srvc = trim($srvc);
104
- $sharethis_processed .= "<span class='st_{$srvc}_hcount' st_title='{$title}' st_via='{$username}' st_url='{$url}' displayText='share'></span>";
105
- }
106
- break;
107
-
108
- case 'buttons':
109
- foreach($services_split as $srvc){
110
- $srvc = trim($srvc);
111
- $sharethis_processed .= "<span class='st_{$srvc}_buttons' st_title='{$title}' st_via='{$username}' st_url='{$url}' displayText='share'></span>";
112
- }
113
- break;
114
-
115
- case 'large':
116
- foreach($services_split as $srvc){
117
- $srvc = trim($srvc);
118
- $sharethis_processed .= "<span class='st_{$srvc}_large' st_title='{$title}' st_via='{$username}' st_url='{$url}' displayText='share'></span>";
119
- }
120
- break;
121
-
122
- case 'regular':
123
- foreach($services_split as $srvc){
124
- $srvc = trim($srvc);
125
- $sharethis_processed .= "<span class='st_{$srvc}' st_title='{$title}' st_via='{$username}' st_url='{$url}' displayText='share'></span>";
126
- }
127
- break;
128
-
129
- case 'regular2':
130
- foreach($services_split as $srvc){
131
- $srvc = trim($srvc);
132
- $sharethis_processed .= "<span class='st_{$srvc}' st_title='{$title}' st_via='{$username}' st_url='{$url}'></span>";
133
- }
134
- break;
135
-
136
- case 'classic':
137
- $sharethis_processed .= "<span class='st_sharethis' st_title='{$title}' st_via='{$username}' st_url='{$url}' displayText='ShareThis'></span>";
138
- break;
139
-
140
- case 'image':
141
- $sharethis_processed .= '<a href="http://sharethis.com/item?publisher='
142
- . $pubkey . '&amp;title='
143
- . $title . '&amp;url='
144
- . $url . '" ' . $params . '><img src="' . $image . '" /></a>';
145
- break;
146
-
147
- case 'text':
148
- $sharethis_processed .= '<a href="http://sharethis.com/item?publisher='
149
- . $pubkey . '&amp;title='
150
- . $title . '&amp;url='
151
- . $url . '" ' . $params . '>' . $text . '</a>';
152
- break;
153
- }
154
- $sharethis_processed .= $after_st . "\n<!-- End WP Socializer Plugin - Sharethis Button -->\n";
155
-
156
- return $sharethis_processed;
157
- }
158
-
159
- function wpsr_sharethis_bt($type){
160
-
161
- ## Sharethis options
162
- $wpsr_sharethis = get_option('wpsr_sharethis_data');
163
-
164
- ## Start Output
165
- $wpsr_sharethis_processed = wpsr_sharethis(array(
166
- 'output' => $type,
167
- 'services' => isset($wpsr_sharethis[$type . '_order']) ? $wpsr_sharethis[$type . '_order'] : '',
168
- 'addp' => $wpsr_sharethis['addp'],
169
- ));
170
- ## End Output
171
-
172
- return $wpsr_sharethis_processed;
173
- }
174
-
175
- function wpsr_sharethis_rss_bt(){
176
-
177
- ## Start Output
178
- $wpsr_sharethis_processed = wpsr_sharethis(array(
179
- 'output' => 'text',
180
- ));
181
- ## End Output
182
-
183
- return $wpsr_sharethis_processed;
184
- }
185
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/wpsr-shortcodes.php DELETED
@@ -1,102 +0,0 @@
1
- <?php
2
- /*
3
- * Shortcodes for WP Socializer plugin
4
- * Version : 2.5
5
- * Author : Aakash Chakravarthy
6
- * Since : 2.0
7
- */
8
-
9
- ## Social buttons Shortcode
10
- function wpsr_socialbts_shortcode($atts){
11
- return wpsr_socialbts($atts);
12
- }
13
- add_shortcode('wpsr_socialbts', 'wpsr_socialbts_shortcode');
14
-
15
- ## Addthis button Shortcode
16
- function wpsr_addthis_shortcode($atts){
17
- return wpsr_addthis($atts) . wpsr_addthis_config() . wpsr_addthis_script();
18
- }
19
- add_shortcode('wpsr_addthis', 'wpsr_addthis_shortcode');
20
-
21
- ## Sharethis button Shortcode
22
- function wpsr_sharethis_shortcode($atts){
23
- return wpsr_sharethis($atts) . wpsr_sharethis_config() . wpsr_sharethis_script();
24
- }
25
- add_shortcode('wpsr_sharethis', 'wpsr_sharethis_shortcode');
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'){
34
- $script = ($atts['script'] == "0") ? '' : wpsr_retweet_topsy_script();
35
- }elseif($atts['service'] == 'tweetmeme' || $atts['service'] == 'retweet'){
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');
43
-
44
- ## Google Buzz button Shortcode - Removed since v2.3
45
- function wpsr_buzz_shortcode($atts){
46
- return '';
47
- }
48
- add_shortcode('wpsr_buzz', 'wpsr_buzz_shortcode');
49
-
50
- ## Google Plusone button Shortcode
51
- function wpsr_plusone_shortcode($atts){
52
- $script = ($atts['script'] == "0") ? '' : wpsr_plusone_script();
53
- return wpsr_plusone($atts) . $script;
54
- }
55
- add_shortcode('wpsr_plusone', 'wpsr_plusone_shortcode');
56
-
57
- ## Digg button Shortcode
58
- function wpsr_digg_shortcode($atts){
59
- $script = ($atts['script'] == "0") ? '' : wpsr_digg_script();
60
- return wpsr_digg($atts) . $script;
61
- }
62
- add_shortcode('wpsr_digg', 'wpsr_digg_shortcode');
63
-
64
- ## Facebook Shortcode
65
- function wpsr_facebook_shortcode($atts){
66
- return wpsr_facebook($atts);
67
- }
68
- add_shortcode('wpsr_facebook', 'wpsr_facebook_shortcode');
69
-
70
- ## StumbleUpon Shortcode
71
- function wpsr_stumbleupon_shortcode($atts){
72
- $script = ($atts['script'] == "0") ? '' : wpsr_stumbleupon_script();
73
- return wpsr_stumbleupon($atts) . $script;
74
- }
75
- add_shortcode('wpsr_stumbleupon', 'wpsr_stumbleupon_shortcode');
76
-
77
- ## Reddit Shortcode
78
- function wpsr_reddit_shortcode($atts){
79
- return wpsr_reddit($atts);
80
- }
81
- add_shortcode('wpsr_reddit', 'wpsr_reddit_shortcode');
82
-
83
- ## LinkedIn Shortcode - since v2.3
84
- function wpsr_linkedin_shortcode($atts){
85
- $script = ($atts['script'] == "0") ? '' : wpsr_linkedin_script();
86
- return wpsr_linkedin($atts) . $script;
87
- }
88
- add_shortcode('wpsr_linkedin', 'wpsr_linkedin_shortcode');
89
-
90
- ## Pinterest Shortcode - since v2.4
91
- function wpsr_pinterest_shortcode($atts){
92
- $script = ($atts['script'] == "0") ? '' : wpsr_pinterest_script();
93
- return wpsr_pinterest($atts) . $script;
94
- }
95
- add_shortcode('wpsr_pinterest', 'wpsr_pinterest_shortcode');
96
-
97
- ## Comments Shortcode - Floating sharebar - since v2.4.4 (Beta)
98
- function wpsr_commentsbt_shortcode($atts){
99
- return wpsr_floatingbts_commentbt($atts);
100
- }
101
- add_shortcode('wpsr_commentsbt', 'wpsr_commentsbt_shortcode');
102
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/wpsr-socialbuttons.php DELETED
@@ -1,469 +0,0 @@
1
- <?php
2
- /*
3
- * Social buttons Processor code for WP Socializer Plugin
4
- * Version : 4.9
5
- * Author : Aakash Chakravarthy
6
- */
7
-
8
- function wpsr_socialbts_script(){
9
- echo "\n<!-- Start WP Socializer | Social Buttons CSS File -->\n";
10
- echo '<link rel="stylesheet" type="text/css" media="all" href="' . WPSR_PUBLIC_URL . 'css/wp-socializer-buttons-css.css?v=' . WPSR_VERSION . '" />';
11
- echo "\n<!-- End WP Socializer | Social Buttons CSS File -->\n";
12
- }
13
-
14
- function wpsr_addtofavorites_script(){
15
- echo "\n<!-- Start WP Socializer | Bookmark File -->\n";
16
- echo '<script type="text/javascript" src="' . WPSR_PUBLIC_URL . 'js/wp-socializer-bookmark-js.js?v=' . WPSR_VERSION . '"></script>';
17
- echo "\n<!-- End WP Socializer | Bookmark CSS File -->\n";
18
- }
19
-
20
- function wpsr_socialbts_used($type){
21
- ## Get template data
22
- $wpsr_template1 = get_option('wpsr_template1_data');
23
- $wpsr_template2 = get_option('wpsr_template2_data');
24
-
25
- $wpsr_template_content = $wpsr_template1['content'] . $wpsr_template2['content'];
26
-
27
- $is_socialbts_used_16px = strpos($wpsr_template_content, '{social-bts-16px}');
28
- $is_socialbts_used_32px = strpos($wpsr_template_content, '{social-bts-32px}');
29
-
30
- switch($type){
31
- case '16px' :
32
- if ($is_socialbts_used_16px === false) {
33
- return 0;
34
- } else {
35
- return 1;
36
- }
37
- break;
38
-
39
- case '32px' :
40
- if ($is_socialbts_used_32px === false) {
41
- return 0;
42
- } else {
43
- return 1;
44
- }
45
- break;
46
- }
47
- }
48
-
49
- function wpsr_addtofavorites_bt_used(){
50
- ## Get Social Button options
51
- $wpsr_socialbt = get_option('wpsr_socialbt_data');
52
-
53
- $in_selected_16px = in_array("addtofavorites", explode(',', $wpsr_socialbt['selected16px']));
54
- $in_selected_32px = in_array("addtofavorites", explode(',', $wpsr_socialbt['selected32px']));
55
-
56
- if (wpsr_socialbts_used('16px') && $in_selected_16px) {
57
- return 1;
58
- } elseif (wpsr_socialbts_used('32px') && $in_selected_32px){
59
- return 1;
60
- }
61
-
62
- }
63
-
64
- function get_sprite_coord($to_find_Key = '', $in_Array = '', $px = '16px'){
65
- $pixel = ($px == '16px') ? 16 : 32;
66
-
67
- $index = 0;
68
- $pixel = $pixel + 1;
69
-
70
- switch ($pixel){
71
- case '17' :
72
- // Start the counter
73
- foreach ($in_Array as $key => $value) {
74
- if($key == $to_find_Key){
75
- return $index * $pixel ;
76
- }
77
- $index++;
78
- }
79
-
80
- break;
81
-
82
- case '33':
83
- // Start the counter
84
- foreach ($in_Array as $key => $value) {
85
- if(isset($value['support32px'])){
86
- if($key == $to_find_Key){
87
- return $index * $pixel ;
88
- }
89
- $index++;
90
- }
91
- }
92
- break;
93
- } // End switch
94
-
95
- }
96
-
97
- function wpsr_get_shorturl($url){
98
- global $post;
99
- ## Get the settings
100
- $wpsr_settings = get_option('wpsr_settings_data');
101
-
102
- $username = $wpsr_settings['bitlyusername'];
103
- $apikey = $wpsr_settings['bitlyapi'];
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
- }
112
- }else{
113
- $url = 'http://api.bit.ly/v3/shorten?login=' . $username . '&apiKey=' . $apikey . '&longUrl=' . urlencode($url) . '&format=txt';
114
- $ch = curl_init();
115
- $timeout = 5;
116
- curl_setopt($ch,CURLOPT_URL,$url);
117
- curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
118
- curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);
119
- $data = curl_exec($ch);
120
- curl_close($ch);
121
- return $data;
122
- }
123
- }
124
-
125
- function wpsr_socialbts_processlist($args = ''){
126
-
127
- global $post, $wpsr_socialsites_list;
128
-
129
- $defaults = array(
130
- 'pUrl' => '',
131
- 'pTitle' => '',
132
- 'pExcerpt' => '',
133
- 'services' => '',
134
- 'btType' => '',
135
- 'pixel' => '16px',
136
- 'before' => "\n <li>",
137
- 'after' => "</li> \n",
138
- 'textBefore' => '&bull; ',
139
- 'textAfter' => '',
140
- 'sprites' => 1,
141
- 'label' => 1,
142
- 'target' => 1,
143
- 'nofollow' => 1,
144
- 'imgpath' => '',
145
- 'params' => '',
146
- );
147
-
148
- $args = wp_parse_args($args, $defaults);
149
- extract($args, EXTR_SKIP);
150
-
151
- ## Get retweet options and settings for Twitter Username and RSS URL
152
- $wpsr_retweet = get_option('wpsr_retweet_data');
153
- $wpsr_settings = get_option('wpsr_settings_data');
154
-
155
- ## Get Page details
156
- $details = wpsr_get_post_details();
157
- $url = urlencode($pUrl);
158
- $deUrl = $pUrl;
159
-
160
- $title = urlencode( html_entity_decode( trim( $pTitle ) ) ); // REVISED IN 2.4.9.8
161
- $deTitle = trim($pTitle);
162
-
163
- $excerpt = trim(urlencode($pExcerpt));
164
- $deExcerpt = htmlspecialchars($pExcerpt);
165
-
166
- $rss = (empty($wpsr_settings['rssurl'])) ? get_bloginfo('rss_url') : $wpsr_settings['rssurl'];
167
- $blogname = urlencode(get_bloginfo('name') . ' - ' . get_bloginfo('description'));
168
- $email = get_bloginfo('admin_email');
169
- $trUsername = (empty($wpsr_retweet['username'])) ? '' : '@' . $wpsr_retweet['username'];
170
- $sUrl = wpsr_get_shorturl($deUrl);
171
- $image = urlencode($details['image']);
172
-
173
- $replace_with = array(
174
- $url, $title, $rss,
175
- $blogname, $excerpt, $deUrl,
176
- $deTitle, $deExcerpt, $email,
177
- $trUsername, $sUrl, $image
178
- );
179
-
180
- $to_be_replaced = array(
181
- '{url}', '{title}', '{rss-url}',
182
- '{blogname}', '{excerpt}', '{de-url}',
183
- '{de-title}', '{de-excerpt}', '{email}',
184
- '{twitter-username}', '{s-url}', '{image}'
185
- );
186
-
187
- $srvcsSplit = explode(',', $services);
188
- $spriteImage = WPSR_SOCIALBT_IMGPATH . "wp-socializer-sprite-$pixel.png?v1";
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'];
197
- $finalTitle = trim(str_replace($to_be_replaced, $replace_with, $wpsr_socialsites_list[$sitename]['titleText']));
198
- $finalUrl = str_replace($to_be_replaced, $replace_with, $wpsr_socialsites_list[$sitename]['url']);
199
- $finalIcon = $imgpath . $wpsr_socialsites_list[$sitename]['icon'];
200
- $spritesYCoord = get_sprite_coord($sitename, $wpsr_socialsites_list, $pixel);
201
- $finalSprites = '0px -' . $spritesYCoord . 'px';
202
- $finalTarget = ($target == 1) ? ' target="_blank"' : '';
203
- $finalNofollow = ($nofollow == 1) ? ' rel="nofollow"' : '';
204
-
205
- $socialbts_list .= $before;
206
-
207
- // Checking the output type
208
- if($btType != 'text'){
209
-
210
- // Check whether label is enabled
211
- if($label == 1){
212
- $finalLabel = '<span class="wp-socializer-label"><a href="' . $finalUrl . '" title="' . $finalTitle . '"' . $finalTarget . $finalNofollow . '>' . $finalName . '</a></span>';
213
- }else{
214
- $finalLabel = '';
215
- }
216
-
217
- // Check whether sprites is enabled
218
- if($sprites == 1){
219
- $socialbts_list .=
220
- '<a href="' . $finalUrl . '" title="' . $finalTitle . '"' . $finalTarget . $finalNofollow . $params . '>' .
221
- '<img src="' . $spriteMaskImage . '" alt="' . $finalName . '" style="width:' . $pixel . '; height:' . $pixel . '; background: transparent url(' . $spriteImage . ') no-repeat; background-position:' . $finalSprites . '; border:0;"/>' .
222
- "</a>" . $finalLabel ;
223
- }else{
224
- $socialbts_list .=
225
- '<a href="' . $finalUrl . '" title="' . $finalTitle . '"' . $finalTarget . $finalNofollow . $params . '>' .
226
- '<img src="' . $finalIcon . '" alt="' . $finalName . '" border="0"/>' .
227
- "</a>" . $finalLabel ;
228
- }
229
-
230
- }else{
231
- $socialbts_list .=
232
- $textBefore . '<a href="' . $finalUrl . '" title="' . $finalTitle . '"' . $finalTarget . $finalNofollow . $params . '>' .
233
- $finalName . "</a>" . $textAfter ;
234
- }
235
-
236
- $socialbts_list .= $after;
237
- }
238
-
239
- return $socialbts_list;
240
- }
241
-
242
- function wpsr_socialbts($args = ''){
243
- global $post;
244
-
245
- $details = wpsr_get_post_details();
246
- $def_url = $details['permalink'];
247
- $def_title = $details['title'];
248
- $def_excerpt = $details['excerpt'];
249
-
250
- $defaults = array(
251
- 'output' => 'image',
252
- 'url' => $def_url,
253
- 'title' => $def_title,
254
- 'excerpt' => $def_excerpt,
255
- 'type' => '16px',
256
- 'target' => 1,
257
- 'nofollow' => 1, // Since 2.3
258
- 'effect' => 'opacity',
259
- 'label' => 0,
260
- 'columns' => 'no',
261
- 'services' => 'facebook,twitter,delicious,digg,googlebuzz,stumbleupon,addtofavorites,email',
262
- 'sprites' => 1,
263
- 'imgpath16px' => WPSR_SOCIALBT_IMGPATH . '16/',
264
- 'imgpath32px' => WPSR_SOCIALBT_IMGPATH . '32/',
265
- 'before' => '',
266
- 'after' => '',
267
- 'params' => '',
268
- );
269
-
270
- $args = wp_parse_args($args, $defaults);
271
- extract($args, EXTR_SKIP);
272
-
273
- $socialbt_processed = ''; // Define empty var v2.4.9.6
274
-
275
- if($output != 'singles'){
276
- $socialbt_processed = "\n<!-- Start WP Socializer - Social Buttons - Output -->\n";
277
- }
278
-
279
- switch($output){
280
- // Output the ordinary buttons
281
- case 'image':
282
-
283
- $socialbt_processed .= '<div class="wp-socializer ' . $type . '">' . "\n" ;
284
- $socialbt_processed .= '<ul class="wp-socializer-' . $effect . ' columns-' . $columns . '">';
285
-
286
- switch($type){
287
- case '16px':
288
- $socialbt_processed .= wpsr_socialbts_processlist(array(
289
- 'pUrl' => $url,
290
- 'pTitle' => $title,
291
- 'pExcerpt' => $excerpt,
292
- 'btType' => 'image',
293
- 'pixel' => '16px',
294
- 'services' => $services,
295
- 'sprites' => $sprites,
296
- 'label' => $label,
297
- 'target' => $target,
298
- 'nofollow' => $nofollow,
299
- 'imgpath' => $imgpath16px,
300
- ));
301
- break;
302
-
303
- case '32px':
304
- $socialbt_processed .= wpsr_socialbts_processlist(array(
305
- 'pUrl' => $url,
306
- 'pTitle' => $title,
307
- 'pExcerpt' => $excerpt,
308
- 'btType' => 'image',
309
- 'pixel' => '32px',
310
- 'services' => $services,
311
- 'sprites' => $sprites,
312
- 'label' => $label,
313
- 'target' => $target,
314
- 'nofollow' => $nofollow,
315
- 'imgpath' => $imgpath32px,
316
- ));
317
- break;
318
- }
319
-
320
- $socialbt_processed .= "</ul> \n";
321
- $socialbt_processed .= '<div class="wp-socializer-clearer"></div>';
322
- $socialbt_processed .= '</div>';
323
-
324
- break;
325
-
326
- case 'singles':
327
- switch($type){
328
- case '16px':
329
- $socialbt_processed .= wpsr_socialbts_processlist(array(
330
- 'pUrl' => $url,
331
- 'pTitle' => $title,
332
- 'pExcerpt' => $excerpt,
333
- 'btType' => 'image',
334
- 'pixel' => '16px',
335
- 'services' => $services,
336
- 'sprites' => $sprites,
337
- 'label' => $label,
338
- 'target' => $target,
339
- 'nofollow' => $nofollow,
340
- 'imgpath' => $imgpath16px,
341
- 'after' => '',
342
- 'before' => '',
343
- 'params' => 'class="wp-socializer-single"',
344
- ));
345
- break;
346
-
347
- case '32px':
348
- $socialbt_processed .= wpsr_socialbts_processlist(array(
349
- 'pUrl' => $url,
350
- 'pTitle' => $title,
351
- 'pExcerpt' => $excerpt,
352
- 'btType' => 'image',
353
- 'pixel' => '32px',
354
- 'services' => $services,
355
- 'sprites' => $sprites,
356
- 'label' => $label,
357
- 'target' => $target,
358
- 'nofollow' => $nofollow,
359
- 'imgpath' => $imgpath32px,
360
- 'after' => '',
361
- 'before' => '',
362
- 'params' => 'class="wp-socializer-single"',
363
- ));
364
- break;
365
-
366
- case 'text':
367
- $socialbt_processed .= wpsr_socialbts_processlist(array(
368
- 'pUrl' => $url,
369
- 'pTitle' => $title,
370
- 'pExcerpt' => $excerpt,
371
- 'btType' => 'text',
372
- 'services' => $services,
373
- 'sprites' => $sprites,
374
- 'label' => $label,
375
- 'target' => $target,
376
- 'nofollow' => $nofollow,
377
- 'after' => $after,
378
- 'before' => $before,
379
- 'textBefore' => '',
380
- 'textAfter' => ' ',
381
- 'params' => 'class="wp-socializer-single-text"',
382
- ));
383
- break;
384
- }
385
- break;
386
-
387
- // Output the text links
388
- case 'text':
389
-
390
- $socialbt_processed .= '<div class="wp-socializer text">' . "\n" ;
391
- $socialbt_processed .= '<ul class="wp-socializer-' . $effect . ' columns-' . $columns . '">';
392
-
393
- $socialbt_processed .= wpsr_socialbts_processlist(array(
394
- 'pUrl' => $url,
395
- 'pTitle' => $title,
396
- 'pExcerpt' => $excerpt,
397
- 'btType' => 'text',
398
- 'services' => $services,
399
- 'textBefore' => '&bull; ',
400
- 'textAfter' => ' ',
401
- ));
402
-
403
- $socialbt_processed .= "</ul> \n";
404
- $socialbt_processed .= '<div class="wp-socializer-clearer"></div>';
405
- $socialbt_processed .= '</div>';
406
-
407
- break;
408
-
409
- case 'rss':
410
- $socialbt_processed .= wpsr_socialbts_processlist(array(
411
- 'pUrl' => $url,
412
- 'pTitle' => $title,
413
- 'pExcerpt' => $excerpt,
414
- 'btType' => 'text',
415
- 'services' => $services,
416
- 'textBefore' => ' &bull; ',
417
- 'textAfter' => '',
418
- 'before' => $before,
419
- 'after' => $after,
420
- ));
421
- break;
422
- }
423
-
424
- if($output != 'singles'){
425
- $socialbt_processed .= "\n<!-- End WP Socializer - Social Buttons - Output -->\n";
426
- }
427
-
428
- return $socialbt_processed;
429
- }
430
-
431
- function wpsr_socialbts_template($type){
432
-
433
- ## Get Social Button options
434
- $wpsr_socialbt = get_option('wpsr_socialbt_data');
435
-
436
- $wpsr_socialbt_imgpath16px = ($wpsr_socialbt['imgpath16px'] != '') ? $wpsr_socialbt['imgpath16px'] : WPSR_SOCIALBT_IMGPATH . '16/';
437
- $wpsr_socialbt_imgpath32px = ($wpsr_socialbt['imgpath32px'] != '') ? $wpsr_socialbt['imgpath32px'] : WPSR_SOCIALBT_IMGPATH . '32/';
438
-
439
- $wpsr_socialbt_processed = wpsr_socialbts(array(
440
- 'output' => 'image',
441
- 'type' => $type,
442
- 'target' => $wpsr_socialbt['target'],
443
- 'nofollow' => $wpsr_socialbt['nofollow'],
444
- 'effect' => $wpsr_socialbt['effect'],
445
- 'label' => $wpsr_socialbt['label'],
446
- 'columns' => $wpsr_socialbt['columns'],
447
- 'services' => $wpsr_socialbt['selected' . $type],
448
- 'sprites' => $wpsr_socialbt['usesprites'],
449
- 'imgpath16px' => $wpsr_socialbt_imgpath16px,
450
- 'imgpath32px' => $wpsr_socialbt_imgpath32px,
451
- ));
452
-
453
- return $wpsr_socialbt_processed;
454
- }
455
-
456
- function wpsr_socialbts_rss($type){
457
-
458
- ## Get Social Button options
459
- $wpsr_socialbt = get_option('wpsr_socialbt_data');
460
-
461
- $wpsr_socialbt_processed = wpsr_socialbts(array(
462
- 'output' => 'rss',
463
- 'target' => $wpsr_socialbt['target'],
464
- 'services' => $wpsr_socialbt['selected' . $type],
465
- ));
466
-
467
- return $wpsr_socialbt_processed;
468
- }
469
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/wpsr-widgets.php DELETED
@@ -1,222 +0,0 @@
1
- <?php
2
- /*
3
- * Widget for WP Socializer plugin
4
- * Version : 1.1
5
- * Author : Aakash Chakravarthy
6
- * Since : 2.3
7
- */
8
-
9
- class WPSR_Widget extends WP_Widget {
10
- /** constructor */
11
- function WPSR_Widget() {
12
- $widget_ops = array('classname' => 'widget_wp_socializer', 'description' => __("Add Facebook like box and Google+ page badge to the sidebar.", 'wpsr') );
13
- $control_ops = array('width' => 360, 'height' => 500);
14
- $this->WP_Widget('wp_socializer', 'WP Socializer', $widget_ops, $control_ops);
15
- }
16
-
17
- /** @see WP_Widget::widget */
18
- function widget( $args, $instance ) {
19
- extract($args);
20
-
21
- $title = apply_filters('widget_title', $instance['title']);
22
- $widget_type = $instance['widget_type'];
23
-
24
- $fblike_url = $instance['fblike_url'];
25
- $fblike_color = $instance['fblike_color'];
26
- $fblike_border = $instance['fblike_border'];
27
- $fblike_size = explode(',', $instance['fblike_size']);
28
- $fblike_showfaces = $instance['fblike_showfaces'];
29
- $fblike_showstream = $instance['fblike_showstream'];
30
- $fblike_showheader = $instance['fblike_showheader'];
31
-
32
- $gplus_pageid = $instance['gplus_pageid'];
33
- $gplus_badgetype = $instance['gplus_badgetype'];
34
-
35
- $output = "\n\n<!-- Begin WP Socializer Widget v" . WPSR_VERSION . "-->\n";
36
-
37
- //Start the Output
38
- echo $before_widget;
39
- if ($title)
40
- echo $before_title . $title . $after_title;
41
-
42
- if($widget_type == 'facebook-like'){
43
-
44
- $output .= '<iframe src="//www.facebook.com/plugins/likebox.php?href=' . urlencode($fblike_url) . '&amp;width=' . trim($fblike_size[0]) . '&amp;height=' . trim($fblike_size[1]) . '&amp;colorscheme=' . $fblike_color . '&amp;show_faces=' . $fblike_showfaces . '&amp;border_color=' . $fblike_border . '&amp;stream=' . $fblike_showstream . '&amp;header=' . $fblike_showheader . '" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:' . trim($fblike_size[0]) . 'px; height:' . trim($fblike_size[1]) . 'px;" allowTransparency="true"></iframe>';
45
-
46
- }elseif($widget_type == 'googleplus-badge'){
47
-
48
- $output .= '<script type="text/javascript">(function() {var po = document.createElement("script");po.type = "text/javascript"; po.async = true;po.src = "https://apis.google.com/js/plusone.js";var s = document.getElementsByTagName("script")[0];s.parentNode.insertBefore(po, s);})()</script>';
49
- $output .= '<div class="g-page" data-width="250" data-rel="publisher" data-href="https://plus.google.com/' . $gplus_pageid .'" ' . (($gplus_badgetype == 'smallbadge') ? 'data-layout="landscape"' : '') . '></div>';
50
-
51
- }
52
- $output .= "\n<!-- End WP Socializer Widget v" . WPSR_VERSION . "-->\n\n";
53
-
54
- echo $output;
55
- echo $after_widget;
56
- }
57
-
58
- /** @see WP_Widget::update */
59
- function update( $new_instance, $old_instance ) {
60
- $instance = $old_instance;
61
- $instance['title'] = strip_tags($new_instance['title']);
62
- $instance['widget_type'] = strip_tags($new_instance['widget_type']);
63
-
64
- $instance['fblike_url'] = strip_tags($new_instance['fblike_url']);
65
- $instance['fblike_color'] = strip_tags($new_instance['fblike_color']);
66
- $instance['fblike_border'] = strip_tags($new_instance['fblike_border']);
67
- $instance['fblike_size'] = strip_tags($new_instance['fblike_size']);
68
- $instance['fblike_showfaces'] = strip_tags($new_instance['fblike_showfaces']);
69
- $instance['fblike_showstream'] = strip_tags($new_instance['fblike_showstream']);
70
- $instance['fblike_showheader'] = strip_tags($new_instance['fblike_showheader']);
71
-
72
- $instance['gplus_pageid'] = strip_tags($new_instance['gplus_pageid']);
73
- $instance['gplus_badgetype'] = strip_tags($new_instance['gplus_badgetype']);
74
-
75
- return $instance;
76
- }
77
-
78
- /** @see WP_Widget::form */
79
- function form($instance){
80
- $instance = wp_parse_args( (array) $instance, array(
81
- 'title' => '', 'widget_type' => 'facebook-like', 'fblike_url' => '',
82
- 'fblike_color' => 'light', 'fblike_border' => '', 'fblike_size' => '300,290',
83
- 'fblike_showfaces' => 1, 'fblike_showstream' => 1, 'fblike_showheader' => 1,
84
- 'gplus_pageid' => '', 'gplus_badgetype' => 'badge'
85
- ));
86
-
87
- $title = $instance['title'];
88
- $widget_type = $instance['widget_type'];
89
-
90
- $fblike_url = $instance['fblike_url'];
91
- $fblike_color = $instance['fblike_color'];
92
- $fblike_border = $instance['fblike_border'];
93
- $fblike_size = $instance['fblike_size'];
94
- $fblike_showfaces = $instance['fblike_showfaces'];
95
- $fblike_showstream = $instance['fblike_showstream'];
96
- $fblike_showheader = $instance['fblike_showheader'];
97
-
98
- $gplus_pageid = $instance['gplus_pageid'];
99
- $gplus_badgetype = $instance['gplus_badgetype'];
100
-
101
- ?>
102
- <p>
103
- <label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:'); ?></label>
104
- <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $title; ?>" />
105
- </p>
106
-
107
- <h4>Select the type of Widget</h4>
108
- <select id="<?php echo $this->get_field_id('widget_type'); ?>" class="widefat" name="<?php echo $this->get_field_name('widget_type'); ?>" onChange="wpsr_widgettype(this);">
109
- <option <?php echo $widget_type == 'facebook-like' ? ' selected="selected"' : ''; ?> value="facebook-like">Facebook Like Box</option>
110
- <option <?php echo $widget_type == 'googleplus-badge' ? ' selected="selected"' : ''; ?> value="googleplus-badge">Google+ Badge</option>
111
- </select>
112
-
113
- <div class="wpsr_settings wpsr_widget_facebook-like" <?php echo ($widget_type != 'facebook-like') ? 'style="display:none"' : '' ; ?>>
114
- <h4>Settings</h4>
115
- <table width="100%" height="266" border="0">
116
- <tr>
117
- <td height="34">Facebook Page URL</td>
118
- <td><input class="widefat" id="<?php echo $this->get_field_id('fblike_url'); ?>" name="<?php echo $this->get_field_name('fblike_url'); ?>" type="text" value="<?php echo $fblike_url; ?>" /></td>
119
- </tr>
120
- <tr>
121
- <td height="37">Width, Height</td>
122
- <td><input class="widefat" id="<?php echo $this->get_field_id('fblike_size'); ?>" name="<?php echo $this->get_field_name('fblike_size'); ?>" type="text" value="<?php echo $fblike_size; ?>" /></td>
123
- </tr>
124
- <tr>
125
- <td height="37">Color Scheme</td>
126
- <td><select id="<?php echo $this->get_field_id('fblike_color'); ?>" class="widefat" name="<?php echo $this->get_field_name('fblike_color'); ?>">
127
- <option <?php echo $fblike_color == 'light' ? ' selected="selected"' : ''; ?> value="light">Light</option>
128
- <option <?php echo $fblike_color == 'dark' ? ' selected="selected"' : ''; ?> value="dark">Dark</option>
129
- </select></td>
130
- </tr>
131
- <tr>
132
- <td height="34">Border Color</td>
133
- <td><input class="widefat" id="<?php echo $this->get_field_id('fblike_border'); ?>" name="<?php echo $this->get_field_name('fblike_border'); ?>" type="text" value="<?php echo $fblike_border; ?>" /></td>
134
- </tr>
135
- <tr>
136
- <td height="35">Show Faces</td>
137
- <td><input id="<?php echo $this->get_field_id('fblike_showfaces'); ?>" type="checkbox" name="<?php echo $this->get_field_name('fblike_showfaces'); ?>" value="true" <?php echo $fblike_showfaces == "true" ? 'checked="checked"' : ""; ?>/></td>
138
- </tr>
139
- <tr>
140
- <td height="37">Show Stream</td>
141
- <td><input id="<?php echo $this->get_field_id('fblike_showstream'); ?>" type="checkbox" name="<?php echo $this->get_field_name('fblike_showstream'); ?>" value="true" <?php echo $fblike_showstream == "true" ? 'checked="checked"' : ""; ?>/></td>
142
- </tr>
143
- <tr>
144
- <td>Show Header</td>
145
- <td><input id="<?php echo $this->get_field_id('fblike_showheader'); ?>" type="checkbox" name="<?php echo $this->get_field_name('fblike_showheader'); ?>" value="true" <?php echo $fblike_showheader == "true" ? 'checked="checked"' : ""; ?>/></td>
146
- </tr>
147
- </table>
148
- </div>
149
-
150
- <div class="wpsr_settings wpsr_widget_googleplus-badge" <?php echo ($widget_type != 'googleplus-badge') ? 'style="display:none"' : '' ; ?>>
151
- <h4>Settings</h4>
152
- <table width="100%" height="81" border="0">
153
- <tr>
154
- <td height="35">Google+ Page ID</td>
155
- <td><input class="widefat" id="<?php echo $this->get_field_id('gplus_pageid'); ?>" name="<?php echo $this->get_field_name('gplus_pageid'); ?>" type="text" value="<?php echo $gplus_pageid; ?>" /></td>
156
- </tr>
157
- <tr>
158
- <td>Badge type</td>
159
- <td><select id="<?php echo $this->get_field_id('gplus_badgetype'); ?>" class="widefat" name="<?php echo $this->get_field_name('gplus_badgetype'); ?>">
160
- <option <?php echo $gplus_badgetype == 'badge' ? ' selected="selected"' : ''; ?> value="badge">Standard Badge</option>
161
- <option <?php echo $gplus_badgetype == 'smallbadge' ? ' selected="selected"' : ''; ?> value="smallbadge">Small Badge</option>
162
- </select></td>
163
- </tr>
164
- </table>
165
- </div>
166
-
167
- <div class="wpsr_support"><a href="http://bit.ly/hjadonate" target="_blank">Donate</a> | <a href="http://www.aakashweb.com/wordpress-plugins/wp-socializer/" target="_blank">Support</a> | <a href="http://facebook.com/aakashweb" target="_blank">Like</a><br />
168
- <small style="opacity: 0.7">For using other buttons in the widget, use the <a href="http://www.aakashweb.com/wordpress-plugins/html-javascript-adder/" target="_blank">HTML Javascript Adder</a> plugin.</small> </div>
169
-
170
-
171
- <?php
172
- }
173
-
174
- }
175
-
176
- // register Foo_Widget widget
177
- add_action( 'widgets_init', create_function( '', 'register_widget("WPSR_Widget");' ) );
178
-
179
- function wpsr_widget_admin_scripts(){
180
- ?>
181
- <script type="text/javascript">
182
- jQuery(document).ready(function(){
183
-
184
- });
185
- function wpsr_widgettype(obj){
186
- jQuery('.wpsr_settings').hide();
187
- jQuery('.wpsr_widget_' + jQuery(obj).val()).fadeIn();
188
- }
189
- </script>
190
-
191
- <style type="text/css">
192
- .wpsr_settings h4{
193
- border-bottom: 1px solid #DFDFDF;
194
- margin: 20px -11px 10px -11px;
195
- padding: 5px 11px 5px 11px;
196
- border-top: 1px solid #DFDFDF;
197
- background-color: #fff;
198
- background-image: -ms-linear-gradient(top,#fff,#f9f9f9);
199
- background-image: -moz-linear-gradient(top,#fff,#f9f9f9);
200
- background-image: -o-linear-gradient(top,#fff,#f9f9f9);
201
- background-image: -webkit-gradient(linear,left top,left bottom,from(#fff),to(#f9f9f9));
202
- background-image: -webkit-linear-gradient(top,#fff,#f9f9f9);
203
- background-image: linear-gradient(top,#fff,#f9f9f9);
204
- }
205
- .wpsr_support{
206
- border: 1px solid #DFDFDF;
207
- padding: 5px 13px;
208
- background: #F9F9F9;
209
- text-decoration:none;
210
- margin: 10px -13px;
211
- }
212
- .wpsr_support a{
213
- text-decoration: none;
214
- }
215
- .wpsr_support a:hover{
216
- text-decoration: underline;
217
- }
218
- </style>
219
- <?php
220
- }
221
- add_action('sidebar_admin_page', 'wpsr_widget_admin_scripts');
222
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
public/buttons/digg-bt.png DELETED
Binary file
public/buttons/facebook-bt.png DELETED
Binary file
public/buttons/linkedin-bt.png DELETED
Binary file
public/buttons/min-floatbar.png DELETED
Binary file
public/buttons/reddit-bt.gif DELETED
Binary file
public/buttons/retweet-bt.png DELETED
Binary file
public/buttons/sharethis-bt.png DELETED
Binary file
public/buttons/stumbleupon-bt.gif DELETED
Binary file
public/css/images/comments-bg.png DELETED
Binary file
public/css/images/dark-bg.png DELETED
Binary file
public/css/images/grey-bg.png DELETED
Binary file
public/css/images/grey-toggle.png DELETED
Binary file
public/css/wp-socializer-buttons-css.css DELETED
@@ -1,332 +0,0 @@
1
- /*
2
- * WP Socializer Social buttons - CSS File - v2.7
3
- * Author: Aakash Chakravarthy
4
- */
5
-
6
- .wp-socializer{
7
- display: block;
8
- margin: 0px 0px 10px;
9
- padding: 0px;
10
- }
11
- .wp-socializer ul {
12
- display: inline;
13
- margin: 0 !important;
14
- padding: 0 !important;
15
- }
16
- .wp-socializer ul li {
17
- background: none;
18
- list-style-type: none !important;
19
- margin: 0px 5px 5px 0px !important;
20
- padding: 0px !important;
21
- float: left !important;
22
- }
23
- .wp-socializer ul li:before, .wp-socializer ul li:after{
24
- display: none !important;
25
- }
26
- .wp-socializer img, .wp-socializer-single img{
27
- float: none;
28
- vertical-align:middle;
29
- margin: 0px 5px 0px 0px !important;
30
- padding: 0px !important;
31
- max-width: none\9; /* IE max-width fix on v2.1 */
32
- }
33
- .wp-socializer-single{
34
- margin-right: 10px;
35
- }
36
- .addthis_button img{
37
- border: 0;
38
- margin: 0;
39
- padding: 0;
40
- }
41
- .wp-socializer-clearer{
42
- clear: left;
43
- }
44
-
45
- /** EFFECTS **/
46
- .wp-socializer-opacity li {
47
- -webkit-opacity: 0.5;
48
- -moz-opacity: 0.5;
49
- filter:alpha(opacity=50);
50
- opacity: 0.5;
51
- }
52
- .wp-socializer-opacity li:hover {
53
- -webkit-opacity: 1;
54
- -moz-opacity: 1;
55
- filter:alpha(opacity=100);
56
- opacity: 1;
57
- }
58
- .wp-socializer-jump li img{
59
- -webkit-transition: all 200ms linear;
60
- -moz-transition: all 200ms linear;
61
- -o-transition: all 200ms linear;
62
- transition: all 200ms linear;
63
- }
64
- .wp-socializer-jump li:hover img{
65
- transform: translateY(-5px);
66
- -ms-transform: translateY(-5px);
67
- -webkit-transform: translateY(-5px);
68
- -o-transform: translateY(-5px);
69
- -moz-transform: translateY(-5px);
70
- }
71
- .wp-socializer-magnify li img{
72
- -webkit-transition: all 200ms linear;
73
- -moz-transition: all 200ms linear;
74
- -o-transition: all 200ms linear;
75
- transition: all 200ms linear;
76
- }
77
- .wp-socializer-magnify li:hover img{
78
- transform: scale(1.3);
79
- -ms-transform: scale(1.3);
80
- -webkit-transform: scale(1.3);
81
- -o-transform: scale(1.3);
82
- -moz-transform: scale(1.3);
83
- }
84
- /** Columns **/
85
- .columns-5 li{
86
- width: 19%;
87
- }
88
- .columns-4 li{
89
- width: 24%;
90
- }
91
- .columns-3 li{
92
- width: 32% !important;
93
- }
94
- .columns-2 li{
95
- width: 48%;
96
- }
97
-
98
- /** TEMPLATES **/
99
- .wp-socializer-buttons{
100
- margin: 0px 0px 10px !important;
101
- padding: 0px !important;
102
- }
103
- .wp-socializer-buttons .wpsr-btn{
104
- margin: 0px;
105
- padding: 0px;
106
- float: left;
107
- margin-right: 10px;
108
- }
109
- .wp-socializer-buttons .wpsr-btn iframe{
110
- margin: 0px !important; /** Fix for Facebook v2.4.2 **/
111
- }
112
-
113
- /* FLOATING SHARE BAR */
114
- .wpsr-floatbar-float_left{
115
- position: absolute;
116
- border: 1px solid;
117
- border-color: #ccc;
118
- background-color: #fff;
119
- padding: 0px 5px 0px 6px !important;
120
- width: 60px;
121
- margin: 0px 0px 0px 0px !important;
122
- z-index: 9999;
123
- border-radius: 10px;
124
- box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.2);
125
- text-align: center;
126
- }
127
- .wpsr-floatbar-float_left .wpsr_floatbt{
128
- margin: 10px 0px;
129
- padding: 0px;
130
- }
131
- .wpsr-floatbar-bottom_fixed{
132
- position: fixed;
133
- border: 1px solid;
134
- border-color: #ccc;
135
- background-color: #fff;
136
- background-image: url(images/grey-bg.png);
137
- background-repeat: repeat-x;
138
- background-position: 0px -30px;
139
- bottom: -1px;
140
- width: 900px;
141
- z-index: 9999;
142
- padding: 0px 0px 0px 15px;
143
- border-radius: 10px 10px 0px 0px;
144
- box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.2);
145
- left: 0px;
146
- right: 0px;
147
- margin: 0 auto;
148
- height: 35px;
149
- }
150
- .wpsr-floatbar-bottom_fixed .wpsr_floatbt{
151
- float: left;
152
- margin-right: 10px;
153
- border-right: 1px solid;
154
- border-color: #ccc;
155
- padding: 8px 5px 0px 0px;
156
- text-align: center;
157
- height: 35px;
158
- }
159
-
160
- /* FLOATING BAR THEMES */
161
- .wpsr-floatbar-bottom_fixed.wpsr-floatbar-dark{
162
- border-color: #333;
163
- background-color: #333;
164
- background-image: url(images/dark-bg.png);
165
- background-position: 0px 0px;
166
- box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.5);
167
- }
168
- .wpsr-floatbar-float_left.wpsr-floatbar-dark{
169
- border-color: #333;
170
- background-color: #333;
171
- }
172
- .wpsr-floatbar-dark .wpsr_floatbt{
173
- border-color: #333;
174
- }
175
- .wpsr-floatbar-dark .wpsr_floatbt a{
176
- color: white !important;
177
- }
178
- .wpsr-floatbar-dark .wpsr_floatbt .wpsr_commentsbt a{
179
- color: black !important;
180
- }
181
-
182
- /* LINK BACK */
183
- .wpsr-floatbar-float_left .wpsr-linkback{
184
- margin: 15px 0 0 0;
185
- position: absolute;
186
- }
187
- .wpsr-floatbar-float_left .wpsr-linkback a{
188
- font-size: 8px;
189
- color: #ccc;
190
- text-decoration: none;
191
- opacity: 0.05;
192
- -webkit-transition: opacity .8s linear;
193
- display: block;
194
- margin: 0px;
195
- padding: 0px;
196
- }
197
- .wpsr-floatbar-float_left .wpsr-linkback a:hover{
198
- opacity: 1;
199
- }
200
- .wpsr-floatbar-float_left .wpsr_linkaw{
201
- margin: -5px 0 0 0 !important;
202
- }
203
- .wpsr-floatbar-bottom_fixed .wpsr-linkback{
204
- margin: 6px 0 0 0;
205
- position: absolute;
206
- bottom: -70px;
207
- }
208
- .wpsr-floatbar-bottom_fixed .wpsr-linkback a{
209
- font-size: 8px;
210
- color: #ccc;
211
- text-decoration: none;
212
- opacity: 0.05;
213
- -webkit-transition: opacity .8s linear;
214
- display: block;
215
- margin: 0px;
216
- padding: 0px;
217
- }
218
-
219
- /* Hide btn */
220
- .wpsr_hidebt{
221
- background: url(images/grey-toggle.png) no-repeat center center;
222
- float: right;
223
- height: 35px;
224
- width: 35px;
225
- cursor: pointer;
226
- }
227
- .wpsr_hidebt:hover{
228
- opacity: 0.5;
229
- }
230
-
231
- /* Comments Button */
232
- .wpsr_commentsbt .wpsr_cmt_bubble{
233
- background: url(images/comments-bg.png) no-repeat center top;
234
- height: 35px;
235
- width: 50px;
236
- text-align: center;
237
- margin: 0 auto;
238
- line-height: 0px;
239
- }
240
- .wpsr_commentsbt .wpsr_cmt_bubble a{
241
- display: inline-block;
242
- margin-top: 15px;
243
- text-decoration: none;
244
- }
245
- .wpsr_commentsbt .wpsr_cmt_button{
246
- background: url(images/grey-bg.png) repeat-x -70px;
247
- border: 1px solid #ccc;
248
- -webkit-border-radius: 3px;
249
- border-radius: 3px;
250
- padding: 2px;
251
- line-height: 0px;
252
- }
253
- .wpsr_commentsbt .wpsr_cmt_button:hover, .wpsr_commentsbt .wpsr_cmt_bubble:hover{
254
- opacity: 0.5;
255
- }
256
- .wpsr_commentsbt .wpsr_cmt_button a{
257
- color: #666666;
258
- text-decoration: none;
259
- font: 10px Arial, Helvetica, sans-serif;
260
- border: 0px;
261
- }
262
-
263
- /* Left float min mode */
264
- .wpsr_floatbt_min{
265
- left: 50% !important;
266
- top: 50% !important;
267
- position: fixed !important;
268
- width: 200px;
269
- margin-left: -100px !important;
270
- margin-top: -100px !important;
271
- display: none;
272
- }
273
- .wpsr_floatbt_min .wpsr_floatbt{
274
- float: left;
275
- margin: 10px 1%;
276
- width: 31%;
277
- min-height: 70px;
278
- max-height: 70px;
279
- overflow: hidden;
280
- }
281
- .wpsr_floatbt_min .wpsr-linkback{
282
- display: none;
283
- }
284
- .wpsr_shareminbt{
285
- display: none;
286
- background: url(../buttons/min-floatbar.png);
287
- position: fixed;
288
- top: 50%;
289
- left: 0;
290
- width: 64px;
291
- height: 64px;
292
- margin-top: -32px;
293
- }
294
-
295
- /* ADJUSTMENTS */
296
- .wpsr-floatbar-float_left .wpsr_floatbt .fb-like{
297
- width: 50px !important;
298
- overflow: hidden; /* FB locale buttons fix */
299
- }
300
- .wpsr-floatbar-float_left .wpsr_floatbt .fb-like:hover{
301
- overflow: visible;
302
- }
303
-
304
- .wpsr_floatbt .wp-socializer-single{
305
- margin: 0px;
306
- }
307
- /* Fix fbpop cliping*/
308
- .fb-like span > iframe{
309
- max-width: none !important;
310
- position: static !important;
311
- z-index: 9999 !important;
312
- }
313
- /* Hide fbpop to bottom_fixed */
314
- .wpsr-floatbar-bottom_fixed .fb-like > span{
315
- overflow: hidden !important;
316
- }
317
- /* Pintrest push down, since v2.4.9.5 */
318
- .wpsr-btn a[data-pin-config="above"]{
319
- margin-bottom: -45px !important;
320
- }
321
-
322
- /* Clearfix */
323
- .clearfix:after {
324
- visibility: hidden;
325
- display: block;
326
- font-size: 0;
327
- content: " ";
328
- clear: both;
329
- height: 0;
330
- }
331
- * html .clearfix { zoom: 1; } /* IE6 */
332
- *:first-child+html .clearfix { zoom: 1; } /* IE7 */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
public/css/wp-socializer.css ADDED
@@ -0,0 +1,416 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .wp-socializer:after{
2
+ clear: both;
3
+ content: '';
4
+ display: block;
5
+ }
6
+ .wpsr-buttons{
7
+ display: block;
8
+ margin: 0 0 1.5em 0;
9
+ }
10
+ .wpsr-buttons .wpsr-btn{
11
+ float: left;
12
+ margin: 0 1em 0 0;
13
+ padding: 0;
14
+ line-height: 0;
15
+ display: inline-block;
16
+ }
17
+
18
+ .wpsr-sharebar{
19
+ transition: all 0.5s;
20
+ box-sizing: border-box;
21
+ z-index: 9999;
22
+ }
23
+ .wpsr-sb-inner:after{
24
+ content: '';
25
+ display: block;
26
+ clear: both;
27
+ }
28
+ .wpsr-sb-vl{
29
+ z-index: 9999;
30
+ width: 82px;
31
+ top: 50%;
32
+ transform: translateY(-50%);
33
+ position: fixed;
34
+ }
35
+ .wpsr-sb-vl .wpsr-btn{
36
+ margin-bottom: 0.5em;
37
+ display: inline-block;
38
+ }
39
+ .wpsr-sb-vl .wpsr-btn:last-child{
40
+ margin: 0;
41
+ }
42
+ .wpsr-sb-vl-wleft{
43
+ left: 0;
44
+ }
45
+ .wpsr-sb-vl-wright{
46
+ right: 0;
47
+ }
48
+ .wpsr-sb-vl-static{
49
+ position: absolute;
50
+ }
51
+
52
+ .wpsr-sb-hl{
53
+ left: 50%;
54
+ transform: translateX(-50%);
55
+ position: fixed;
56
+ }
57
+ .wpsr-sb-hl .wpsr-btn{
58
+ float: left;
59
+ margin: 0 1em 0 0;
60
+ padding: 0;
61
+ line-height: 0;
62
+ display: inline-block;
63
+ }
64
+ .wpsr-sb-hl > .wpsr-btn:last-child{
65
+ margin: 0;
66
+ }
67
+ .wpsr-sb-hl-wtop{
68
+ top: 0;
69
+ }
70
+ .wpsr-sb-hl-wbottom{
71
+ bottom: 0;
72
+ }
73
+
74
+ .wpsr-icon{
75
+ display: inline-block;
76
+ background: url( 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAAAgCAYAAADaInAlAAAFXUlEQVR4Xu2aTcgVVRzG3/tqYVlhaGlWZOFCEhQNF/bluxHETasgwkVEUAqiVkpJBJktQjdBmxZt2oQgfmItXPj2BRF9G7QoKKFUSBfhRvq4r7/ncuYy73Bnzn/uPf/xhXcOPMzcOeee5//8zzPnzjlzO2NtmdUZ6Mxq9a34sdYAs9wErQFaA7hkYCW9vgk2hN4nOb4GfnZhK3Q6NTU1kL/T6TTC34TGVBweM8A6gjsD5heCvBIM8V2q4Af1w+CvA2cY7Gn8XLvCtQ3Ald9Tm0ffHgb4hkDXlgT7JdfXewjJ+mSgK/kxgCf/vcRxAlz11lli/j6/VWdqAywlsD8jA3wn9X95mIDBN/GTHA/+NWg6Be4K2lLntjJlaF8DTqGtx8/RxG9qVGOwdOfrDqwqD1D5W40+zU1JgImf3KTm30yQh8AtuWBT57Y0D+jeDA6hq8/ftAEWE91LYGshCcWgL3FhCfjfPKqGhojv8XPcmk9C8avUX6J+CUjJ/wI874I5Bb5GDICmgfxNGeAeRO8Bz4GbDGO1kzbvGNqZmiC+Nj+JScWvAX4b7C4J1tUAaK/kT2EAOXoFEJGWT/m75n4+vwKeATfmEvAZ5/vBI+BVcEOo+4fjW2CfaWRphMBp/Pm7lrqh+OnDzB+Jcx71H4AnK9q5GQD9Uf5RDbAFYQeApmuVi+BF8C3YC54Gc3PiT4eB/zR3TdPywxpL8AUwP3ghcAs4oOla/XF+kfNSfupPU78f9PnDz0KfP+GD30JCOg5k8qriYgB0mfhHMcBTqPqwRFmX6+O5upNh4L+KJMNcjUAzP21PhoFPxh8JdDn1HwMdYyW5AdBr5h/WAAr6HNB6sqzIBEfCwP8Qy0Kdev2ugXMEX8lPmyNh4JPyR2LV/oHW+IuMmpIaAM3rwQl0m/iHNcAyxMWWSBO0+cSYhFrNEGjiR5wLfyTY89Rna3yLrqQG6Ha757M1vol8yH2A++j89wjBE+FOsMRRqw0GMPGjTXdi0+UPCO+uQZrUAOSmFv+wM4D0/QJiv3Ha69cT9WSNhJiaItTMj8jk/BVBPkSddvr0cGspqQ1Qi38UA2hXSw93+Yc9CdYy8F+gJUhWtOzTWz+tApIU7WrV5UdsMv6IiGXBBA8axCY1gPjCT6RMGOUfxQDi2gQOAr1WVTkLtNP3E9DGx/Pg5lwS9JJHRvgod03TpZZKWgZ+Di4YktZrgtBN4CAievycn+U8yk+bPj/fmcZPnZk/EucC6o+CiUi75AYIuViAtqPoqeQf1QCZtuyJU1u4+aIXOhqQbSC///01n7URpCfml0G2Pfof59o1038CzAWhPX7ETOPneo+f4zbqzPy0rcVfEag2v94H2i8pKy4GCCaI8qcyQGywtCmxC2wHt8UaU6/ZQzNLkhI2RXZx3I5gEz/tkvEjQrNemancDJAlD92l/E0ZIItF0+KOgNsrRvcydXqISvkyRj8RJn7aXSYxi0FK/mfR8x7I74wqBe4GCLPBQP6mDZCN+WpOvo/c3p6vg038JCe211F3htrIFw4XZsFGDBBMsBFzH87PgtfLANoo0YZJVbmDyuIzRd2ED2xPEkz8xWeKJORjY6voR0/oekPZ2AyQxY72VUB/COnxXy8DiFv78vpf4KCil0KPJkp4mQkq+UmMJ79WHseA/hL2mKfOQX2Hlc8xjlfHx8dN/B7TlP6VMwluLQT5N58fBz96Jgbxa8EkAz2Qn+uu/J7aPPr2MIDi1P8I3gATQC+PtHP4OvjVQ0SxTwzQ5+e8y6D3+Dk2wt+ExlQcXgZIFV/bj3MGWgM4J3imd98aYKaPkHN8rQGcEzzTu78GECWwMOl+C0QAAAAASUVORK5CYII=' ) no-repeat;
77
+ width: 32px;
78
+ height: 32px;
79
+ overflow: hidden;
80
+ transform: scale( 0.5 );
81
+ background-position-x: -64px;
82
+ }
83
+
84
+ .wpsr-sb-simple{
85
+ padding: 10px;
86
+ text-align: center;
87
+ border-radius: 10px;
88
+ box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.2);
89
+ border: 1px solid transparent;
90
+ }
91
+ .wpsr-sb-simple-sq{
92
+ padding: 10px;
93
+ text-align: center;
94
+ box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.2);
95
+ border: 1px solid transparent;
96
+ }
97
+ .wpsr-sb-simple-ns{
98
+ text-align: center;
99
+ border: 1px solid transparent;
100
+ }
101
+
102
+ .wpsr-sb-wocbtn .wpsr-icon{
103
+ background-position-x: -96px;
104
+ }
105
+
106
+ .wpsr-sharebar::-webkit-scrollbar{
107
+ width: 5px;
108
+ height: 5px;
109
+ }
110
+
111
+ .wpsr-sharebar::-webkit-scrollbar-thumb{
112
+ background: #999;
113
+ border-radius: 10px;
114
+ }
115
+
116
+
117
+ .wpsr-sb-close{
118
+ position: absolute;
119
+ cursor: pointer;
120
+ }
121
+ .wpsr-sb-vl .wpsr-sb-close{
122
+ bottom: -36px;
123
+ transform: translateX(-50%);
124
+ left: 50%;
125
+ }
126
+ .wpsr-sb-hl .wpsr-sb-close{
127
+ right: -36px;
128
+ transform: translateY(-50%);
129
+ top: 50%;
130
+ }
131
+
132
+ /** When Sharebar is hidden **/
133
+ .wpsr-sb-hide{
134
+ width: 48px;
135
+ height: 48px;
136
+ border-radius: 50%;
137
+ }
138
+ .wpsr-sb-hide .wpsr-sb-inner{
139
+ display: none;
140
+ }
141
+ .wpsr-sb-hide .wpsr-icon{
142
+ background-position-x: 0;
143
+ }
144
+ .wpsr-sb-hide.wpsr-sb-wocbtn .wpsr-icon{
145
+ background-position-x: -32px;
146
+ }
147
+ .wpsr-sb-hide .wpsr-sb-close{
148
+ top: 0;
149
+ margin-top: 0;
150
+ transform: none;
151
+ right: 0;
152
+ left: 0;
153
+ bottom: 0;
154
+ padding-top: 8px;
155
+ }
156
+
157
+ .wpsr-counter{
158
+ line-height: 2em;
159
+ text-align: center;
160
+ }
161
+ .wpsr-counter .scount{
162
+ font-size: 2em;
163
+ font-weight: bold;
164
+ }
165
+ .wpsr-counter .stext{
166
+ display: block;
167
+ line-height: 1em;
168
+ color: #888;
169
+ }
170
+
171
+ .socializer span.sr-cicon a{
172
+ background: none;
173
+ border: none;
174
+ }
175
+
176
+ /* Follow bar */
177
+ .wpsr-followbar{
178
+ position: fixed;
179
+ z-index: 999999;
180
+ line-height: 0;
181
+ }
182
+ .sr-fb-tl{
183
+ top: 10px;
184
+ left: 10px;
185
+ }
186
+ .sr-fb-tm{
187
+ top: 10px;
188
+ left: 50%;
189
+ transform: translateX( -50% );
190
+ }
191
+ .sr-fb-tr{
192
+ top: 10px;
193
+ right: 10px;
194
+ }
195
+ .sr-fb-rm{
196
+ top: 50%;
197
+ right: 10px;
198
+ transform: translateY( -50% );
199
+ }
200
+ .sr-fb-br{
201
+ bottom: 10px;
202
+ right: 10px;
203
+ }
204
+ .sr-fb-bm{
205
+ bottom: 10px;
206
+ left: 50%;
207
+ transform: translateX( -50% );
208
+ }
209
+ .sr-fb-bl{
210
+ bottom: 10px;
211
+ left: 10px;
212
+ }
213
+ .sr-fb-lm{
214
+ left: 10px;
215
+ top: 50%;
216
+ transform: translateY( -50% );
217
+ }
218
+ .wpsr-followbar div.sr-fb-title{
219
+ font-size: 0.8em;
220
+ margin: 0 0 0.8em 0;
221
+ }
222
+ .wpsr-followbar.sr-fb-hl .sr-fb-title{
223
+ position: absolute;
224
+ bottom: 0;
225
+ transform: translateX(-100%);
226
+ left: -1em;
227
+ top: 50%;
228
+ margin: 0;
229
+ }
230
+
231
+ .wpsr-text-sb{
232
+ background: #fff;
233
+ margin: 0;
234
+ padding: 0 10px;
235
+ border-radius: 5px;
236
+ display: inline-block;
237
+ position: absolute;
238
+ transform: translate( -50%, -150% );
239
+ margin-top: -10px;
240
+ transition: margin-top 0.5s;
241
+ display: none;
242
+ animation: wpsr-fadeout 1s;
243
+ box-shadow: 0 3px 6px -3px #000;
244
+ background-image: linear-gradient(rgba(0, 0, 0, 0.1),rgba(0, 0, 0, 0));
245
+ }
246
+ .wpsr-text-sb:before {
247
+ position: absolute;
248
+ content: '';
249
+ display: block;
250
+ background-color: inherit;
251
+ width: 10px;
252
+ height: 10px;
253
+ bottom: -5px;
254
+ transform: rotate(45deg) translateX(-50%);
255
+ left: 50%;
256
+ z-index: -1;
257
+ transform-origin: left;
258
+ box-shadow: 2px 2px 4px -2px #000
259
+ }
260
+ .wpsr-text-sb li{
261
+ list-style: none;
262
+ float: left;
263
+ line-height: 0;
264
+ }
265
+ .wpsr-text-sb li a{
266
+ text-align: center;
267
+ display: inline-block;
268
+ }
269
+ .wpsr-text-sb li a:hover{
270
+ background-image: linear-gradient(rgba(0, 0, 0, 0.4),rgba(0, 0, 0, 0));
271
+ }
272
+ .wpsr-tsb-32px a{
273
+ width: 32px;
274
+ height: 32px;
275
+ line-height: 32px;
276
+ font-size: 16px;
277
+ }
278
+ .wpsr-tsb-48px a{
279
+ width: 48px;
280
+ height: 48px;
281
+ line-height: 48px;
282
+ font-size: 24px;
283
+ }
284
+ .wpsr-tsb-64px a{
285
+ width: 64px;
286
+ height: 64px;
287
+ line-height: 64px;
288
+ font-size: 32px;
289
+ }
290
+ .wpsr-text-sb.wpsr-tsb-active{
291
+ margin-top: 0;
292
+ transition: margin-top 0.5s;
293
+ display: block;
294
+ animation: wpsr-fadein 1s;
295
+ }
296
+
297
+ .wpsr-mobile-sb{
298
+ position: fixed;
299
+ bottom: 0;
300
+ left: 0;
301
+ right: 0;
302
+ line-height: 0;
303
+ background: #fff;
304
+ box-shadow: 0 3px 5px 3px #000;
305
+ transition: margin 1s ease-out;
306
+ margin-bottom: 0;
307
+ }
308
+ .wpsr-mobile-sb.wpsr-msb-hide{
309
+ transition: margin 2s ease-out;
310
+ margin-bottom: -68px;
311
+ }
312
+
313
+ .wpsr-clearfix:after{
314
+ display: block;
315
+ clear: both;
316
+ content: '';
317
+ }
318
+
319
+ @keyframes wpsr-fadein {
320
+ 0% {opacity: 0;}
321
+ 100% {opacity: 1;}
322
+ }
323
+ @keyframes wpsr-fadeout {
324
+ 0% {opacity: 1;}
325
+ 100% {opacity: 0;}
326
+ }
327
+
328
+ .wpsr-btn .fb_iframe_widget {
329
+ margin-bottom: 0;
330
+ }
331
+
332
+ @media only screen and (max-width : 800px){
333
+ .wpsr-sb-hl{
334
+ bottom: 0 !important;
335
+ top: auto !important;
336
+ left: -1px !important;
337
+ right: -1px !important;
338
+ border-radius: 0;
339
+ overflow: auto;
340
+ transform: none;
341
+ padding-left: 70px;
342
+ }
343
+ .wpsr-sb-hl .wpsr-sb-inner{
344
+ width: 2000px;
345
+ }
346
+ .wpsr-sb-hl .wpsr-sb-close {
347
+ display: block;
348
+ position: absolute;
349
+ left: 0;
350
+ top: 0;
351
+ bottom: 0;
352
+ width: 50px;
353
+ border-right: 1px solid #ccc;
354
+ transform: none;
355
+ }
356
+ .wpsr-sb-hl .wpsr-icon{
357
+ position: absolute;
358
+ top: 50%;
359
+ left: 50%;
360
+ margin: -16px;
361
+ }
362
+
363
+ .wpsr-sb-vl{
364
+ bottom: 0 !important;
365
+ top: 0 !important;
366
+ left: -1px !important;
367
+ right: auto !important;
368
+ margin-left: 0 !important;
369
+ border-radius: 0;
370
+ overflow: auto;
371
+ transform: none;
372
+ padding-top: 70px;
373
+ }
374
+ .wpsr-sb-vl .wpsr-sb-inner{
375
+ height: 2000px;
376
+ }
377
+ .wpsr-sb-vl .wpsr-sb-close {
378
+ display: block;
379
+ position: absolute;
380
+ left: 0 !important;
381
+ top: 0;
382
+ right: 0;
383
+ border-bottom: 1px solid #ccc;
384
+ margin: 0 !important;
385
+ transform: none;
386
+ height: 50px;
387
+ }
388
+ .wpsr-sb-vl .wpsr-icon{
389
+ position: absolute;
390
+ top: 50%;
391
+ left: 50%;
392
+ margin: -16px;
393
+ }
394
+
395
+ /** Hidden sharebar -mobile **/
396
+ .wpsr-sb-hide {
397
+ width: 50px;
398
+ height: 50px;
399
+ padding: 0;
400
+ overflow: hidden;
401
+ border-radius: 0;
402
+ opacity: 0.4;
403
+ }
404
+ .wpsr-sb-hide:hover{
405
+ opacity: 1;
406
+ }
407
+
408
+
409
+ /** Horizontal **/
410
+ .wpsr-sb-hl.wpsr-sb-hide .wpsr-sb-close{
411
+ top: 0;
412
+ right: 0;
413
+ }
414
+
415
+
416
+ }
public/css/wp-socializer.min.css ADDED
@@ -0,0 +1 @@
 
1
+ .wp-socializer:after{clear:both;content:'';display:block}.wpsr-buttons{display:block;margin:0 0 1.5em 0}.wpsr-buttons .wpsr-btn{float:left;margin:0 1em 0 0;padding:0;line-height:0;display:inline-block}.wpsr-sharebar{transition:all 0.5s;box-sizing:border-box;z-index:9999}.wpsr-sb-inner:after{content:'';display:block;clear:both}.wpsr-sb-vl{z-index:9999;width:82px;top:50%;transform:translateY(-50%);position:fixed}.wpsr-sb-vl .wpsr-btn{margin-bottom:0.5em;display:inline-block}.wpsr-sb-vl .wpsr-btn:last-child{margin:0}.wpsr-sb-vl-wleft{left:0}.wpsr-sb-vl-wright{right:0}.wpsr-sb-vl-static{position:absolute}.wpsr-sb-hl{left:50%;transform:translateX(-50%);position:fixed}.wpsr-sb-hl .wpsr-btn{float:left;margin:0 1em 0 0;padding:0;line-height:0;display:inline-block}.wpsr-sb-hl > .wpsr-btn:last-child{margin:0}.wpsr-sb-hl-wtop{top:0}.wpsr-sb-hl-wbottom{bottom:0}.wpsr-icon{display:inline-block;background:url( 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAAAgCAYAAADaInAlAAAFXUlEQVR4Xu2aTcgVVRzG3/tqYVlhaGlWZOFCEhQNF/bluxHETasgwkVEUAqiVkpJBJktQjdBmxZt2oQgfmItXPj2BRF9G7QoKKFUSBfhRvq4r7/ncuYy73Bnzn/uPf/xhXcOPMzcOeee5//8zzPnzjlzO2NtmdUZ6Mxq9a34sdYAs9wErQFaA7hkYCW9vgk2hN4nOb4GfnZhK3Q6NTU1kL/T6TTC34TGVBweM8A6gjsD5heCvBIM8V2q4Af1w+CvA2cY7Gn8XLvCtQ3Ald9Tm0ffHgb4hkDXlgT7JdfXewjJ+mSgK/kxgCf/vcRxAlz11lli/j6/VWdqAywlsD8jA3wn9X95mIDBN/GTHA/+NWg6Be4K2lLntjJlaF8DTqGtx8/RxG9qVGOwdOfrDqwqD1D5W40+zU1JgImf3KTm30yQh8AtuWBT57Y0D+jeDA6hq8/ftAEWE91LYGshCcWgL3FhCfjfPKqGhojv8XPcmk9C8avUX6J+CUjJ/wI874I5Bb5GDICmgfxNGeAeRO8Bz4GbDGO1kzbvGNqZmiC+Nj+JScWvAX4b7C4J1tUAaK/kT2EAOXoFEJGWT/m75n4+vwKeATfmEvAZ5/vBI+BVcEOo+4fjW2CfaWRphMBp/Pm7lrqh+OnDzB+Jcx71H4AnK9q5GQD9Uf5RDbAFYQeApmuVi+BF8C3YC54Gc3PiT4eB/zR3TdPywxpL8AUwP3ghcAs4oOla/XF+kfNSfupPU78f9PnDz0KfP+GD30JCOg5k8qriYgB0mfhHMcBTqPqwRFmX6+O5upNh4L+KJMNcjUAzP21PhoFPxh8JdDn1HwMdYyW5AdBr5h/WAAr6HNB6sqzIBEfCwP8Qy0Kdev2ugXMEX8lPmyNh4JPyR2LV/oHW+IuMmpIaAM3rwQl0m/iHNcAyxMWWSBO0+cSYhFrNEGjiR5wLfyTY89Rna3yLrqQG6Ha757M1vol8yH2A++j89wjBE+FOsMRRqw0GMPGjTXdi0+UPCO+uQZrUAOSmFv+wM4D0/QJiv3Ha69cT9WSNhJiaItTMj8jk/BVBPkSddvr0cGspqQ1Qi38UA2hXSw93+Yc9CdYy8F+gJUhWtOzTWz+tApIU7WrV5UdsMv6IiGXBBA8axCY1gPjCT6RMGOUfxQDi2gQOAr1WVTkLtNP3E9DGx/Pg5lwS9JJHRvgod03TpZZKWgZ+Di4YktZrgtBN4CAievycn+U8yk+bPj/fmcZPnZk/EucC6o+CiUi75AYIuViAtqPoqeQf1QCZtuyJU1u4+aIXOhqQbSC///01n7URpCfml0G2Pfof59o1038CzAWhPX7ETOPneo+f4zbqzPy0rcVfEag2v94H2i8pKy4GCCaI8qcyQGywtCmxC2wHt8UaU6/ZQzNLkhI2RXZx3I5gEz/tkvEjQrNemancDJAlD92l/E0ZIItF0+KOgNsrRvcydXqISvkyRj8RJn7aXSYxi0FK/mfR8x7I74wqBe4GCLPBQP6mDZCN+WpOvo/c3p6vg038JCe211F3htrIFw4XZsFGDBBMsBFzH87PgtfLANoo0YZJVbmDyuIzRd2ED2xPEkz8xWeKJORjY6voR0/oekPZ2AyQxY72VUB/COnxXy8DiFv78vpf4KCil0KPJkp4mQkq+UmMJ79WHseA/hL2mKfOQX2Hlc8xjlfHx8dN/B7TlP6VMwluLQT5N58fBz96Jgbxa8EkAz2Qn+uu/J7aPPr2MIDi1P8I3gATQC+PtHP4OvjVQ0SxTwzQ5+e8y6D3+Dk2wt+ExlQcXgZIFV/bj3MGWgM4J3imd98aYKaPkHN8rQGcEzzTu78GECWwMOl+C0QAAAAASUVORK5CYII=' ) no-repeat;width:32px;height:32px;overflow:hidden;transform:scale( 0.5 );background-position-x:-64px}.wpsr-sb-simple{padding:10px;text-align:center;border-radius:10px;box-shadow:0 0 5px 0 rgba(0,0,0,0.2);border:1px solid transparent}.wpsr-sb-simple-sq{padding:10px;text-align:center;box-shadow:0 0 5px 0 rgba(0,0,0,0.2);border:1px solid transparent}.wpsr-sb-simple-ns{text-align:center;border:1px solid transparent}.wpsr-sb-wocbtn .wpsr-icon{background-position-x:-96px}.wpsr-sharebar::-webkit-scrollbar{width:5px;height:5px}.wpsr-sharebar::-webkit-scrollbar-thumb{background:#999;border-radius:10px}.wpsr-sb-close{position:absolute;cursor:pointer}.wpsr-sb-vl .wpsr-sb-close{bottom:-36px;transform:translateX(-50%);left:50%}.wpsr-sb-hl .wpsr-sb-close{right:-36px;transform:translateY(-50%);top:50%}.wpsr-sb-hide{width:48px;height:48px;border-radius:50%}.wpsr-sb-hide .wpsr-sb-inner{display:none}.wpsr-sb-hide .wpsr-icon{background-position-x:0}.wpsr-sb-hide.wpsr-sb-wocbtn .wpsr-icon{background-position-x:-32px}.wpsr-sb-hide .wpsr-sb-close{top:0;margin-top:0;transform:none;right:0;left:0;bottom:0;padding-top:8px}.wpsr-counter{line-height:2em;text-align:center}.wpsr-counter .scount{font-size:2em;font-weight:bold}.wpsr-counter .stext{display:block;line-height:1em;color:#888}.socializer span.sr-cicon a{background:none;border:none}.wpsr-followbar{position:fixed;z-index:999999;line-height:0}.sr-fb-tl{top:10px;left:10px}.sr-fb-tm{top:10px;left:50%;transform:translateX( -50% )}.sr-fb-tr{top:10px;right:10px}.sr-fb-rm{top:50%;right:10px;transform:translateY( -50% )}.sr-fb-br{bottom:10px;right:10px}.sr-fb-bm{bottom:10px;left:50%;transform:translateX( -50% )}.sr-fb-bl{bottom:10px;left:10px}.sr-fb-lm{left:10px;top:50%;transform:translateY( -50% )}.wpsr-followbar div.sr-fb-title{font-size:0.8em;margin:0 0 0.8em 0}.wpsr-followbar.sr-fb-hl .sr-fb-title{position:absolute;bottom:0;transform:translateX(-100%);left:-1em;top:50%;margin:0}.wpsr-text-sb{background:#fff;margin:0;padding:0 10px;border-radius:5px;display:inline-block;position:absolute;transform:translate( -50%,-150% );margin-top:-10px;transition:margin-top 0.5s;display:none;animation:wpsr-fadeout 1s;box-shadow:0 3px 6px -3px #000;background-image:linear-gradient(rgba(0,0,0,0.1),rgba(0,0,0,0))}.wpsr-text-sb:before{position:absolute;content:'';display:block;background-color:inherit;width:10px;height:10px;bottom:-5px;transform:rotate(45deg) translateX(-50%);left:50%;z-index:-1;transform-origin:left;box-shadow:2px 2px 4px -2px #000}.wpsr-text-sb li{list-style:none;float:left;line-height:0}.wpsr-text-sb li a{text-align:center;display:inline-block}.wpsr-text-sb li a:hover{background-image:linear-gradient(rgba(0,0,0,0.4),rgba(0,0,0,0))}.wpsr-tsb-32px a{width:32px;height:32px;line-height:32px;font-size:16px}.wpsr-tsb-48px a{width:48px;height:48px;line-height:48px;font-size:24px}.wpsr-tsb-64px a{width:64px;height:64px;line-height:64px;font-size:32px}.wpsr-text-sb.wpsr-tsb-active{margin-top:0;transition:margin-top 0.5s;display:block;animation:wpsr-fadein 1s}.wpsr-mobile-sb{position:fixed;bottom:0;left:0;right:0;line-height:0;background:#fff;box-shadow:0 3px 5px 3px #000;transition:margin 1s ease-out;margin-bottom:0}.wpsr-mobile-sb.wpsr-msb-hide{transition:margin 2s ease-out;margin-bottom:-68px}.wpsr-clearfix:after{display:block;clear:both;content:''}@keyframes wpsr-fadein{0%{opacity:0}100%{opacity:1}}@keyframes wpsr-fadeout{0%{opacity:1}100%{opacity:0}}.wpsr-btn .fb_iframe_widget{margin-bottom:0}@media only screen and (max-width:800px){.wpsr-sb-hl{bottom:0!important;top:auto!important;left:-1px!important;right:-1px!important;border-radius:0;overflow:auto;transform:none;padding-left:70px}.wpsr-sb-hl .wpsr-sb-inner{width:2000px}.wpsr-sb-hl .wpsr-sb-close{display:block;position:absolute;left:0;top:0;bottom:0;width:50px;border-right:1px solid #ccc;transform:none}.wpsr-sb-hl .wpsr-icon{position:absolute;top:50%;left:50%;margin:-16px}.wpsr-sb-vl{bottom:0!important;top:0!important;left:-1px!important;right:auto!important;margin-left:0!important;border-radius:0;overflow:auto;transform:none;padding-top:70px}.wpsr-sb-vl .wpsr-sb-inner{height:2000px}.wpsr-sb-vl .wpsr-sb-close{display:block;position:absolute;left:0!important;top:0;right:0;border-bottom:1px solid #ccc;margin:0!important;transform:none;height:50px}.wpsr-sb-vl .wpsr-icon{position:absolute;top:50%;left:50%;margin:-16px}.wpsr-sb-hide{width:50px;height:50px;padding:0;overflow:hidden;border-radius:0;opacity:0.4}.wpsr-sb-hide:hover{opacity:1}.wpsr-sb-hl.wpsr-sb-hide .wpsr-sb-close{top:0;right:0}}
public/js/wp-socializer-bookmark-js.js DELETED
@@ -1,16 +0,0 @@
1
- /*
2
- * Copyright 2012 Aakash Chakravarthy - www.aakashweb.com
3
- * Created for WP Socializer - Wordpress Plugin
4
- */
5
-
6
- function addBookmark(e) {
7
- var ua = navigator.userAgent.toLowerCase();
8
- var isMac = (ua.indexOf('mac') != -1), str = '';
9
- e.preventDefault();
10
- if(ua.indexOf('konqueror') != -1){
11
- str = 'CTRL + B'; // Konqueror
12
- }else{
13
- str = (isMac ? 'Command/Cmd' : 'CTRL') + ' + D';
14
- }
15
- alert('Press ' + str + ' to bookmark this page');
16
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
public/js/wp-socializer-floating-bar-js.js DELETED
@@ -1,116 +0,0 @@
1
- /*
2
- * Copyright 2013 Aakash Chakravarthy - www.aakashweb.com
3
- * Created for WP Socializer - Wordpress Plugin
4
- * v1.5
5
- */
6
-
7
- if(typeof jQuery == 'undefined'){
8
- if(typeof document.getElementsByClassName == 'function'){
9
- document.getElementsByClassName('wpsr-floatbar-float_left')[0].style.display = 'none';
10
- console.log('WP Socializer float bar: There is a Javascript error in the page and the floatbar is hidden');
11
- }
12
- }
13
-
14
- jQuery(document).ready(function(){
15
- var $floatbar = jQuery(".wpsr-floatbar-float_left");
16
- var $anchor = jQuery('.wpsr_floatbts_anchor');
17
-
18
- // Init effects
19
- $floatbar.hide().fadeIn(2000);
20
-
21
- // Position the left float bar to the anchor
22
- var wpsr_position_floatbar = function(){
23
- anchorOffset = jQuery('.wpsr_floatbts_anchor').offset();
24
- barDistance = jQuery('.wpsr_floatbts_anchor').attr('data-offset');
25
-
26
- $floatbar.css({
27
- position: "absolute",
28
- top: anchorOffset.top + "px",
29
- left: (anchorOffset.left - $floatbar.outerWidth() - barDistance)
30
- });
31
- }
32
-
33
- // On window scroll
34
- if(jQuery(".wpsr-floatbar-movable").length > 0){
35
- jQuery(window).scroll(function(){
36
- var b = jQuery(window).scrollTop();
37
- var d = anchorOffset.top;
38
- var c = $floatbar;
39
- if(b>d-30){
40
- c.css({position:"fixed", top: "30px"});
41
- }else{
42
- if(b<=d){
43
- c.css({position:"absolute", top: anchorOffset.top + "px"});
44
- }
45
- }
46
- });
47
- }
48
-
49
- // MINIMIZE THE FLOATING BAR
50
- jQuery('.wpsr_shareminbt').click(function(){
51
- $floatbar.fadeToggle();
52
- });
53
-
54
- // **
55
- jQuery(window).resize(function(){
56
- wpsr_position_floatbar();
57
- minLeftShareBar(); // Since v2.4.9
58
- });
59
-
60
- // **
61
- var minLeftShareBar = function(){
62
-
63
- if( $floatbar.attr('data-mobmode') == 0 ) // Since v2.4.9.5
64
- return '';
65
-
66
- if(typeof window.innerWidth !== 'undefined' && window.innerWidth < 800 ){
67
- $floatbar.addClass('wpsr_floatbt_min').hide();
68
- jQuery('.wpsr_shareminbt').fadeIn();
69
- }else{
70
- $floatbar.removeClass('wpsr_floatbt_min').fadeIn();
71
- jQuery('.wpsr_shareminbt').hide();
72
- };
73
- }
74
-
75
- // ONLOAD POSITIONING
76
- if(window.addEventListener){
77
- window.addEventListener("load", wpsr_position_floatbar, false);}
78
- else if (window.attachEvent){
79
- window.attachEvent("onload", wpsr_position_floatbar);
80
- }
81
-
82
- // INITS
83
- wpsr_position_floatbar();
84
- minLeftShareBar();
85
-
86
- // BOTTOM FIXED MINIMIZING
87
- var shareBarWidth = jQuery('.wpsr-floatbar-bottom_fixed').width();
88
-
89
- var hideShareBar = function(){
90
- var $this = jQuery('.wpsr_hidebt');
91
- $this.siblings().fadeOut('slow', function(){
92
- $this.parent().animate({
93
- width: '20px'
94
- }).attr('data-hidden', 1);
95
- });
96
- };
97
-
98
- var showShareBar = function(){
99
- var $this = jQuery('.wpsr_hidebt');
100
- $this.parent().animate({
101
- width: shareBarWidth
102
- }, function(){
103
- $this.siblings().fadeIn('slow');
104
- }).attr('data-hidden', 0);
105
-
106
- };
107
-
108
- jQuery('.wpsr_hidebt').click(function(){
109
- if(jQuery(this).parent().attr('data-hidden') == 1){
110
- showShareBar();
111
- }else{
112
- hideShareBar();
113
- }
114
- });
115
-
116
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
public/js/wp-socializer.js ADDED
@@ -0,0 +1,240 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ window.wpsr_helpers = {
2
+ addClass: function( ele, className ){
3
+ if ( ele.classList )
4
+ ele.classList.add( className );
5
+ else
6
+ ele.className += ' ' + className;
7
+ },
8
+
9
+ removeClass: function( ele, className ){
10
+ if (ele.classList)
11
+ ele.classList.remove(className);
12
+ else
13
+ ele.className = ele.className.replace(new RegExp('(^|\\b)' + className.split(' ').join('|') + '(\\b|$)', 'gi'), ' ');
14
+ },
15
+
16
+ popup: function( url, target, w, h ){
17
+ var left = ( screen.width/2 )-( w/2 );
18
+ var top = ( screen.height/2 )-( h/2 );
19
+ return window.open( url, target, 'toolbar=no,location=no,menubar=no,width='+w+',height='+h+',top='+top+',left='+left );
20
+ }
21
+
22
+ };
23
+
24
+ document.addEventListener( 'DOMContentLoaded', function(){
25
+
26
+ // Socializer links
27
+ scr_links = document.querySelectorAll( '.socializer.sr-popup a' );
28
+
29
+ for( i=0; i<scr_links.length; i++ ){
30
+ var atag = scr_links[i];
31
+ atag.addEventListener( 'click', function(e){
32
+ var href = this.getAttribute( 'href' );
33
+ if( !( href == '#' || this.hasAttribute( 'onclick' ) ) ){
34
+ wpsr_helpers.popup( href, '_blank', 800, 500 );
35
+ }
36
+ e.preventDefault();
37
+ });
38
+ }
39
+
40
+ // Sharebar
41
+ the_sb = document.querySelector( '.wpsr-sharebar' );
42
+
43
+ if( the_sb ){
44
+
45
+ var hide_class = 'wpsr-sb-hide';
46
+
47
+ var sb_resize = function(){
48
+ vlsb = document.querySelector( '.wpsr-sb-vl-scontent' );
49
+ if( vlsb ){
50
+ stick = vlsb.getAttribute( 'data-stickto' );
51
+ stick_ele = document.querySelector( stick );
52
+ if( stick_ele ){
53
+ vlsb.style.left = stick_ele.offsetLeft + 'px';
54
+ }
55
+ }
56
+
57
+ if( the_sb && window.innerWidth <= 800 ){
58
+ wpsr_helpers.addClass( the_sb, hide_class );
59
+ }
60
+ }
61
+
62
+ sb_resize();
63
+ window.addEventListener( 'resize', sb_resize );
64
+
65
+ sb_close_btn = the_sb.querySelector( '.wpsr-sb-close' );
66
+ sb_close_btn.addEventListener( 'click', function(){
67
+ if( the_sb.classList.contains( hide_class ) ){
68
+ wpsr_helpers.removeClass( the_sb, hide_class );
69
+ }else{
70
+ wpsr_helpers.addClass( the_sb, hide_class );
71
+ }
72
+ });
73
+ }
74
+
75
+ // Text sharebar
76
+ tsb = document.querySelector( '.wpsr-text-sb' );
77
+
78
+ if( tsb ){
79
+
80
+ window.wpsr_tsb = {
81
+ stext: '',
82
+ startx: 0,
83
+ starty: 0
84
+ };
85
+
86
+ var tsb_attr = {
87
+ ptitle: tsb.getAttribute( 'data-title' ),
88
+ purl: tsb.getAttribute( 'data-url' ),
89
+ psurl: tsb.getAttribute( 'data-surl' ),
90
+ ptuname: tsb.getAttribute( 'data-tuname' ),
91
+ cnt_sel: tsb.getAttribute( 'data-content' ),
92
+ word_count: tsb.getAttribute( 'data-tcount' )
93
+ };
94
+
95
+ var get_selection_text = function() {
96
+ var text = '';
97
+ if( window.getSelection ){
98
+ text = window.getSelection().toString();
99
+ }else if( document.selection && document.selection.type != 'Control' ){
100
+ text = document.selection.createRange().text;
101
+ }
102
+ return text;
103
+ };
104
+
105
+ var tsb_show = function( x, y ){
106
+ tsb.style.left = x + 'px';
107
+ tsb.style.top = y + 'px';
108
+ wpsr_helpers.addClass( tsb, 'wpsr-tsb-active' );
109
+ };
110
+
111
+ var tsb_hide = function(){
112
+ wpsr_helpers.removeClass( tsb, 'wpsr-tsb-active' );
113
+ };
114
+
115
+ var sel_link_text = function(){
116
+ var sel_text = wpsr_tsb.stext;
117
+ var wcount = parseInt( tsb_attr.word_count );
118
+
119
+ if( wcount == 0 ){
120
+ return sel_text;
121
+ }else{
122
+ return sel_text.split( ' ' ).slice( 0, wcount ).join( ' ' );
123
+ }
124
+ };
125
+
126
+ var replace_link = function( link ){
127
+ var to_replace = {
128
+ '{title}': tsb_attr.ptitle,
129
+ '{url}': tsb_attr.purl,
130
+ '{s-url}': tsb_attr.psurl,
131
+ '{twitter-username}': tsb_attr.ptuname,
132
+ '{excerpt}': sel_link_text()
133
+ };
134
+
135
+ for( var key in to_replace ){
136
+ if( to_replace.hasOwnProperty( key ) ){
137
+ link = link.replace( RegExp( key, "g" ), to_replace[ key ] );
138
+ }
139
+ }
140
+
141
+ return link;
142
+
143
+ }
144
+
145
+ if( tsb_attr.cnt_sel != '' ){
146
+
147
+ var tsb_cnt_sel = tsb_attr.cnt_sel.replace( /[\[\]<>"'/\\=&%]/g,'' );
148
+ var tsb_content = document.querySelectorAll( tsb_cnt_sel );
149
+
150
+ for( var i = 0; i < tsb_content.length; i++ ){
151
+
152
+ var content = tsb_content[i];
153
+
154
+ content.addEventListener( 'mousedown', function(e){
155
+ wpsr_tsb.startx = e.pageX;
156
+ wpsr_tsb.starty = e.pageY;
157
+ });
158
+
159
+ content.addEventListener( 'mouseup', function(e){
160
+ var sel_text = get_selection_text();
161
+
162
+ if( sel_text != '' ){
163
+
164
+ tsb_x = ( e.pageX + parseInt( wpsr_tsb.startx ) )/2;
165
+ tsb_y = Math.min( wpsr_tsb.starty, e.pageY );
166
+
167
+ if( sel_text != wpsr_tsb.stext ){
168
+ tsb_show( tsb_x, tsb_y );
169
+ wpsr_tsb.stext = sel_text;
170
+ }else{
171
+ tsb_hide();
172
+ }
173
+
174
+ }else{
175
+
176
+ tsb_hide();
177
+
178
+ }
179
+ });
180
+ }
181
+ }
182
+
183
+ document.body.addEventListener( 'mousedown', function(e){
184
+ tsb_hide();
185
+ });
186
+
187
+ tsb.addEventListener( 'mousedown', function(e){
188
+ e.stopPropagation();
189
+ });
190
+
191
+ var atags = tsb.querySelectorAll( 'a' );
192
+ for( var i = 0; i < atags.length; i++ ){
193
+ var atag = atags[i];
194
+ atag.addEventListener( 'click', function(e){
195
+ var alink = this.getAttribute( 'data-link' );
196
+
197
+ if( alink != '#' ){
198
+ rep_link = replace_link( alink );
199
+ wpsr_helpers.popup( rep_link, 800, 500 );
200
+ }
201
+
202
+ e.preventDefault();
203
+ });
204
+ }
205
+
206
+ }
207
+
208
+ // Mobile sharebar
209
+ msb = document.querySelector( '.wpsr-mobile-sb' );
210
+ if( msb ){
211
+ var lastScrollTop = 0;
212
+
213
+ window.addEventListener( "scroll", function(){
214
+ var st = window.pageYOffset || document.documentElement.scrollTop;
215
+ if ( st > lastScrollTop ){
216
+ wpsr_helpers.addClass( msb, 'wpsr-msb-hide' );
217
+ } else {
218
+ wpsr_helpers.removeClass( msb, 'wpsr-msb-hide' );
219
+ }
220
+ lastScrollTop = st;
221
+ }, false );
222
+
223
+ }
224
+
225
+ });
226
+
227
+ function socializer_addbookmark( e ){
228
+ var ua = navigator.userAgent.toLowerCase();
229
+ var isMac = (ua.indexOf('mac') != -1), str = '';
230
+ e.preventDefault();
231
+ str = (isMac ? 'Command/Cmd' : 'CTRL') + ' + D';
232
+ alert('Press ' + str + ' to bookmark this page');
233
+ }
234
+
235
+ function socializer_shortlink( e, t ){
236
+ e.preventDefault();
237
+ link = t.getAttribute( 'href' );
238
+ if( link != '#' )
239
+ prompt( 'Short link', link );
240
+ }
public/js/wp-socializer.min.js ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ function socializer_addbookmark(t){var e=navigator.userAgent.toLowerCase(),s=e.indexOf("mac")!=-1,r=""
2
+ t.preventDefault(),r=(s?"Command/Cmd":"CTRL")+" + D",alert("Press "+r+" to bookmark this page")}function socializer_shortlink(t,e){t.preventDefault(),link=e.getAttribute("href"),"#"!=link&&prompt("Short link",link)}window.wpsr_helpers={addClass:function(t,e){t.classList?t.classList.add(e):t.className+=" "+e},removeClass:function(t,e){t.classList?t.classList.remove(e):t.className=t.className.replace(new RegExp("(^|\\b)"+e.split(" ").join("|")+"(\\b|$)","gi")," ")},popup:function(t,e,s,r){var n=screen.width/2-s/2,o=screen.height/2-r/2
3
+ return window.open(t,e,"toolbar=no,location=no,menubar=no,width="+s+",height="+r+",top="+o+",left="+n)}},document.addEventListener("DOMContentLoaded",function(){for(scr_links=document.querySelectorAll(".socializer.sr-popup a"),p=0;p<scr_links.length;p++){var t=scr_links[p]
4
+ t.addEventListener("click",function(t){var e=this.getAttribute("href")
5
+ "#"==e||this.hasAttribute("onclick")||wpsr_helpers.popup(e,"_blank",800,500),t.preventDefault()})}if(the_sb=document.querySelector(".wpsr-sharebar"),the_sb){var e=function(){vlsb=document.querySelector(".wpsr-sb-vl-scontent"),vlsb&&(stick=vlsb.getAttribute("data-stickto"),stick_ele=document.querySelector(stick),stick_ele&&(vlsb.style.left=stick_ele.offsetLeft+"px")),the_sb&&window.innerWidth<=800&&wpsr_helpers.addClass(the_sb,"wpsr-sb-hide")}
6
+ e(),window.addEventListener("resize",e),sb_close_btn=the_sb.querySelector(".wpsr-sb-close"),sb_close_btn.addEventListener("click",function(){the_sb.classList.contains("wpsr-sb-hide")?wpsr_helpers.removeClass(the_sb,"wpsr-sb-hide"):wpsr_helpers.addClass(the_sb,"wpsr-sb-hide")})}if(tsb=document.querySelector(".wpsr-text-sb"),tsb){window.wpsr_tsb={stext:"",startx:0,starty:0}
7
+ var s={ptitle:tsb.getAttribute("data-title"),purl:tsb.getAttribute("data-url"),psurl:tsb.getAttribute("data-surl"),ptuname:tsb.getAttribute("data-tuname"),cnt_sel:tsb.getAttribute("data-content"),word_count:tsb.getAttribute("data-tcount")},r=function(){var t=""
8
+ return window.getSelection?t=window.getSelection().toString():document.selection&&"Control"!=document.selection.type&&(t=document.selection.createRange().text),t},n=function(t,e){tsb.style.left=t+"px",tsb.style.top=e+"px",wpsr_helpers.addClass(tsb,"wpsr-tsb-active")},o=function(){wpsr_helpers.removeClass(tsb,"wpsr-tsb-active")},i=function(){var t=wpsr_tsb.stext,e=parseInt(s.word_count)
9
+ return 0==e?t:t.split(" ").slice(0,e).join(" ")},a=function(t){var e={"{title}":s.ptitle,"{url}":s.purl,"{s-url}":s.psurl,"{twitter-username}":s.ptuname,"{excerpt}":i()}
10
+ for(var r in e)e.hasOwnProperty(r)&&(t=t.replace(RegExp(r,"g"),e[r]))
11
+ return t}
12
+ if(""!=s.cnt_sel)for(var l=s.cnt_sel.replace(/[\[\]<>"'\/\\=&%]/g,""),c=document.querySelectorAll(l),p=0;p<c.length;p++){var u=c[p]
13
+ u.addEventListener("mousedown",function(t){wpsr_tsb.startx=t.pageX,wpsr_tsb.starty=t.pageY}),u.addEventListener("mouseup",function(t){var e=r()
14
+ ""!=e?(tsb_x=(t.pageX+parseInt(wpsr_tsb.startx))/2,tsb_y=Math.min(wpsr_tsb.starty,t.pageY),e!=wpsr_tsb.stext?(n(tsb_x,tsb_y),wpsr_tsb.stext=e):o()):o()})}document.body.addEventListener("mousedown",function(t){o()}),tsb.addEventListener("mousedown",function(t){t.stopPropagation()})
15
+ for(var d=tsb.querySelectorAll("a"),p=0;p<d.length;p++){var t=d[p]
16
+ t.addEventListener("click",function(t){var e=this.getAttribute("data-link")
17
+ "#"!=e&&(rep_link=a(e),wpsr_helpers.popup(rep_link,800,500)),t.preventDefault()})}}if(msb=document.querySelector(".wpsr-mobile-sb"),msb){var b=0
18
+ window.addEventListener("scroll",function(){var t=window.pageYOffset||document.documentElement.scrollTop
19
+ t>b?wpsr_helpers.addClass(msb,"wpsr-msb-hide"):wpsr_helpers.removeClass(msb,"wpsr-msb-hide"),b=t},!1)}})
public/social-icons/16/addtofavorites.png DELETED
Binary file
public/social-icons/16/barrapunto.png DELETED
Binary file
public/social-icons/16/bitacoras.png DELETED
Binary file
public/social-icons/16/blinklist.png DELETED
Binary file
public/social-icons/16/blip.png DELETED
Binary file
public/social-icons/16/blogger.png DELETED
Binary file
public/social-icons/16/blogmarks.png DELETED
Binary file
public/social-icons/16/blogospherenews.png DELETED
Binary file
public/social-icons/16/blogter.png DELETED
Binary file
public/social-icons/16/bluedot.png DELETED
Binary file
public/social-icons/16/box.png DELETED
Binary file
public/social-icons/16/connotea.png DELETED
Binary file
public/social-icons/16/current.png DELETED
Binary file
public/social-icons/16/delicious.png DELETED
Binary file
public/social-icons/16/designbump.png DELETED
Binary file
public/social-icons/16/designfloat.png DELETED
Binary file
public/social-icons/16/digg.png DELETED
Binary file
public/social-icons/16/diggita.png DELETED
Binary file
public/social-icons/16/diigo.png DELETED
Binary file
public/social-icons/16/dotnetkicks.png DELETED
Binary file
public/social-icons/16/dzone.png DELETED
Binary file
public/social-icons/16/ekudos.png DELETED
Binary file
public/social-icons/16/email.png DELETED
Binary file
public/social-icons/16/facebook.png DELETED
Binary file
public/social-icons/16/fark.png DELETED
Binary file
public/social-icons/16/fleck.png DELETED
Binary file
public/social-icons/16/friendfeed.png DELETED
Binary file
public/social-icons/16/friendster.png DELETED
Binary file
public/social-icons/16/fsdaily.png DELETED
Binary file
public/social-icons/16/gadugadu.png DELETED
Binary file
public/social-icons/16/globalgrind.png DELETED
Binary file
public/social-icons/16/google.png DELETED
Binary file
public/social-icons/16/googleplus.png DELETED
Binary file
public/social-icons/16/googlereader.png DELETED
Binary file
public/social-icons/16/grono.png DELETED
Binary file
public/social-icons/16/gwar.png DELETED
Binary file
public/social-icons/16/hackernews.png DELETED
Binary file
public/social-icons/16/haohao.png DELETED
Binary file
public/social-icons/16/healthranker.png DELETED
Binary file
public/social-icons/16/hellotxt.png DELETED
Binary file
public/social-icons/16/hemidemi.png DELETED
Binary file
public/social-icons/16/hyves.png DELETED
Binary file
public/social-icons/16/identica.png DELETED
Binary file
public/social-icons/16/im.png DELETED
Binary file
public/social-icons/16/indianpad.png DELETED
Binary file
public/social-icons/16/instapaper.png DELETED
Binary file
public/social-icons/16/kciuk.png DELETED
Binary file
public/social-icons/16/kirtsy.png DELETED
Binary file
public/social-icons/16/laaikit.png DELETED
Binary file
public/social-icons/16/latafanera.png DELETED
Binary file
public/social-icons/16/linkagogo.png DELETED
Binary file
public/social-icons/16/linkarena.png DELETED
Binary file
public/social-icons/16/linkedin.png DELETED
Binary file
public/social-icons/16/linkter.png DELETED
Binary file
public/social-icons/16/live.png DELETED
Binary file
public/social-icons/16/meneame.png DELETED
Binary file
public/social-icons/16/misterwong.png DELETED
Binary file
public/social-icons/16/mixx.png DELETED
Binary file
public/social-icons/16/mob.png DELETED
Binary file
public/social-icons/16/msnreporter.png DELETED
Binary file
public/social-icons/16/muti.png DELETED
Binary file
public/social-icons/16/myshare.png DELETED
Binary file
public/social-icons/16/myspace.png DELETED
Binary file
public/social-icons/16/n4g.png DELETED
Binary file
public/social-icons/16/netvibes.png DELETED
Binary file
public/social-icons/16/netvouz.png DELETED
Binary file
public/social-icons/16/newsvine.png DELETED
Binary file
public/social-icons/16/nk.png DELETED
Binary file
public/social-icons/16/nujij.png DELETED
Binary file
public/social-icons/16/oknotizie.png DELETED
Binary file
public/social-icons/16/orkut.png DELETED
Binary file
public/social-icons/16/osnews.png DELETED
Binary file
public/social-icons/16/pdf.png DELETED
Binary file
public/social-icons/16/ping.png DELETED
Binary file
public/social-icons/16/pinterest.png DELETED
Binary file
public/social-icons/16/posterous.png DELETED
Binary file
public/social-icons/16/printfriendly.png DELETED
Binary file
public/social-icons/16/propeller.png DELETED
Binary file
public/social-icons/16/ratimarks.png DELETED
Binary file
public/social-icons/16/readme.html DELETED
@@ -1,44 +0,0 @@
1
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2
- <html>
3
- <head>
4
- <title>WP Socializer - Plugin - Icons</title>
5
- <style>
6
- body{
7
- font: 13px/2em Arial, Helvetica, sans-serif;
8
- background: #DDF1FF;
9
- }
10
- #wrap{
11
- margin: 0px auto;
12
- padding: 10px;
13
- width: 750px;
14
- background: #FFFFFF;
15
- border: 1px solid #0099FF;
16
- }
17
- h1, h2{
18
- font-weight: normal;
19
- border-bottom: 1px solid #E0E0E0;
20
- }
21
- .grey{
22
- color: #999999;
23
- }
24
- </style>
25
- </head>
26
- <body>
27
- <div id="wrap">
28
- <h1>Changing the default Icons - WP Socializer </h1>
29
- <p>Default Icons in this folder can be replaced with custom <a href="http://www.aakashweb.com/wordpress-plugins/wp-socializer/">WP Socializer</a> icons. To replace the default icons please note these steps</p>
30
- <ul>
31
- <li>Replace the icons with the same name of the default.</li>
32
- <li>Replace with only 16px Icons.</li>
33
- </ul>
34
- <p>Otherwise you can choose another folder containing the custom 16px Icons with the same name. The path of the new folder should be changed in the admin page. </p>
35
- <h2>Contact Author </h2>
36
- <ul>
37
- <li>Website: <a href="http://www.aakashweb.com/" rel="follow">Aakash Web</a></li>
38
- <li>Support: <a href="http://www.aakashweb.com/forum/">Forum</a> </li>
39
- <li>Email: aakash.19493 AT gmail DOT com</li>
40
- <li>Twitter: <a href="http://twitter.com/vaakash">vaakash</a></li>
41
- </ul>
42
- </div>
43
- </body>
44
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
public/social-icons/16/rec6.png DELETED
Binary file
public/social-icons/16/reddit.png DELETED
Binary file
public/social-icons/16/rss.png DELETED
Binary file
public/social-icons/16/scoopeo.png DELETED
Binary file
public/social-icons/16/segnalo.png DELETED
Binary file
public/social-icons/16/shetoldme.png DELETED
Binary file
public/social-icons/16/simpy.png DELETED
Binary file
public/social-icons/16/slashdot.png DELETED
Binary file
public/social-icons/16/socialogs.png DELETED
Binary file
public/social-icons/16/sphere.png DELETED
Binary file
public/social-icons/16/sphinn.png DELETED
Binary file
public/social-icons/16/stumbleupon.png DELETED
Binary file
public/social-icons/16/techmeme.png DELETED
Binary file
public/social-icons/16/technorati.png DELETED
Binary file
public/social-icons/16/tipd.png DELETED
Binary file
public/social-icons/16/tumblr.png DELETED
Binary file
public/social-icons/16/twitter.png DELETED
Binary file
public/social-icons/16/upnews.png DELETED
Binary file
public/social-icons/16/viadeo.png DELETED
Binary file
public/social-icons/16/vkontakte.png DELETED
Binary file
public/social-icons/16/webnews.png DELETED
Binary file
public/social-icons/16/webride.png DELETED
Binary file
public/social-icons/16/wikio.png DELETED
Binary file
public/social-icons/16/wists.png DELETED
Binary file
public/social-icons/16/wykop.png DELETED
Binary file
public/social-icons/16/xerpi.png DELETED
Binary file
public/social-icons/16/yahoobuzz.png DELETED
Binary file
public/social-icons/16/yahoomyweb.png DELETED
Binary file
public/social-icons/16/yiggit.png DELETED
Binary file
public/social-icons/32/addtofavorites.png DELETED
Binary file
public/social-icons/32/blinklist.png DELETED
Binary file
public/social-icons/32/blip.png DELETED
Binary file
public/social-icons/32/blogger.png DELETED
Binary file
public/social-icons/32/delicious.png DELETED
Binary file
public/social-icons/32/designbump.png DELETED
Binary file
public/social-icons/32/designfloat.png DELETED
Binary file
public/social-icons/32/digg.png DELETED
Binary file
public/social-icons/32/dzone.png DELETED
Binary file
public/social-icons/32/email.png DELETED
Binary file
public/social-icons/32/facebook.png DELETED
Binary file
public/social-icons/32/friendfeed.png DELETED
Binary file
public/social-icons/32/friendster.png DELETED
Binary file
public/social-icons/32/gadugadu.png DELETED
Binary file
public/social-icons/32/google.png DELETED
Binary file
public/social-icons/32/googleplus.png DELETED
Binary file
public/social-icons/32/googlereader.png DELETED
Binary file
public/social-icons/32/grono.png DELETED
Binary file
public/social-icons/32/hyves.png DELETED
Binary file
public/social-icons/32/instapaper.png DELETED
Binary file
public/social-icons/32/kciuk.png DELETED
Binary file
public/social-icons/32/linkedin.png DELETED
Binary file
public/social-icons/32/live.png DELETED
Binary file
public/social-icons/32/misterwong.png DELETED
Binary file
public/social-icons/32/mixx.png DELETED
Binary file
public/social-icons/32/myspace.png DELETED
Binary file
public/social-icons/32/netvibes.png DELETED
Binary file
public/social-icons/32/newsvine.png DELETED
Binary file
public/social-icons/32/nk.png DELETED
Binary file
public/social-icons/32/oknotizie.png DELETED
Binary file
public/social-icons/32/orkut.png DELETED
Binary file
public/social-icons/32/osnews.png DELETED
Binary file
public/social-icons/32/ping.png DELETED
Binary file
public/social-icons/32/pinterest.png DELETED
Binary file
public/social-icons/32/posterous.png DELETED
Binary file
public/social-icons/32/printfriendly.png DELETED
Binary file
public/social-icons/32/readme.html DELETED
@@ -1,44 +0,0 @@
1
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2
- <html>
3
- <head>
4
- <title>WP Socializer - Plugin - Icons</title>
5
- <style>
6
- body{
7
- font: 13px/2em Arial, Helvetica, sans-serif;
8
- background: #DDF1FF;
9
- }
10
- #wrap{
11
- margin: 0px auto;
12
- padding: 10px;
13
- width: 750px;
14
- background: #FFFFFF;
15
- border: 1px solid #0099FF;
16
- }
17
- h1, h2{
18
- font-weight: normal;
19
- border-bottom: 1px solid #E0E0E0;
20
- }
21
- .grey{
22
- color: #999999;
23
- }
24
- </style>
25
- </head>
26
- <body>
27
- <div id="wrap">
28
- <h1>Changing the default Icons - WP Socializer </h1>
29
- <p>Default Icons in this folder can be replaced with custom <a href="http://www.aakashweb.com/wordpress-plugins/wp-socializer/">WP Socializer</a> icons. To replace the default icons please note these steps</p>
30
- <ul>
31
- <li>Replace the icons with the same name of the default.</li>
32
- <li>Replace with only 32px Icons.</li>
33
- </ul>
34
- <p>Otherwise you can choose another folder containing the custom 32px Icons with the same name. The path of the new folder should be changed in the admin page. </p>
35
- <h2>Contact Author </h2>
36
- <ul>
37
- <li>Website: <a href="http://www.aakashweb.com/" rel="follow">Aakash Web</a></li>
38
- <li>Support: <a href="http://www.aakashweb.com/forum/">Forum</a> </li>
39
- <li>Email: aakash.19493 AT gmail DOT com</li>
40
- <li>Twitter: <a href="http://twitter.com/vaakash">vaakash</a></li>
41
- </ul>
42
- </div>
43
- </body>
44
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
public/social-icons/32/reddit.png DELETED
Binary file
public/social-icons/32/rss.png DELETED
Binary file
public/social-icons/32/sphinn.png DELETED
Binary file
public/social-icons/32/stumbleupon.png DELETED
Binary file
public/social-icons/32/technorati.png DELETED
Binary file
public/social-icons/32/tumblr.png DELETED
Binary file
public/social-icons/32/twitter.png DELETED
Binary file
public/social-icons/32/vkontakte.png DELETED
Binary file
public/social-icons/32/wykop.png DELETED
Binary file
public/social-icons/32/yahoo.png DELETED
Binary file
public/social-icons/32/yahoobuzz.png DELETED
Binary file
public/social-icons/wp-socializer-sprite-16px.png DELETED
Binary file
public/social-icons/wp-socializer-sprite-32px.png DELETED
Binary file
public/social-icons/wp-socializer-sprite-mask-16px.gif DELETED
Binary file
public/social-icons/wp-socializer-sprite-mask-32px.gif DELETED
Binary file
readme.txt CHANGED
@@ -1,290 +1,135 @@
1
  === WP Socializer ===
2
  Contributors: vaakash
3
- Author URI: http://www.aakashweb.com/
4
- 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, yahoo, reddit, dzone, vkontakte, vk, sphinn, addthis, template, socializer, sociable, wp, wordpress, sexy bookmarks
 
 
6
  License: GPLv2 or later
7
- Donate Link: http://bit.ly/wpsrDonation
8
- Requires at least: 3.1
9
- Tested up to: 4.6
10
- Stable tag: 2.4.9.9
11
 
12
- Super Cool Plugin for inserting all kinds of Social Bookmarking & Sharing buttons. Has customizable Floating Share Bar, Widgets, Shortcodes also.
13
 
14
  == Description ==
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
- = Next release of WP Socializer =
19
 
20
- > After nearly 2 years of design and development the next version of WP Socializer 3.x is about get released in a couple of months. It is rewritten from scratch and has a brand new UI, cool new features. WP Socializer is in active development only. Please follow my [twitter account](https://twitter.com/vaakash) or [subscribe here](http://www.aakashweb.com/) if you want to get latst updates on the next brand new version.
21
 
22
- = Notable features =
23
 
24
- * Insert all kinds of social buttons in posts & pages.
25
- * **Floating share bar** (both horizontal & vertical - with left side and right side float support)
26
- * Faster and Optimized loading with **Smart load** feature.
27
- * Has Shortcodes for all buttons.
28
- * Widgets for inserting FB like box & G+ badges in sidebar.
29
- * Template functions are available for advanced placements.
30
- * Floating sharebar now optimized for mobile devices also.
31
 
32
- [Changelog](changelog)
33
 
34
- = Future of WP Socializer =
35
 
36
- Planned for a complete change in the plugin with simple UI, more buttons and features (may be in v2.5). Hoping to see it in action.
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
- **108** 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 (both left and right side support)
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/wpsrDonation), it will make me happy for this plugin!!
73
-
74
- [More changes listed in Changelog](changelog)
75
 
76
- = Reference links =
77
- For more information on the plugin, you can use the below links.
78
 
79
- * [**Homepage**](http://www.aakashweb.com/wordpress-plugins/wp-socializer/)
80
- * [**Support Forum**](http://www.aakashweb.com/forum/)
 
 
 
 
 
81
 
82
- Documentation:
83
 
84
- * [Template function reference](http://www.aakashweb.com/docs/wp-socializer-docs/function-reference/).
85
- * [Manual placement](http://www.aakashweb.com/docs/wp-socializer-docs/manual-placement/).
86
- * [FAQs](http://www.aakashweb.com/docs/wp-socializer-docs/wp-socializer-faq/)
87
 
88
  == Installation ==
89
 
90
- 1. Upload `wp-socializer` to the `/wp-content/plugins/` directory
91
- 1. Activate the plugin through the `Plugins` menu in WordPress
92
- 1. Go to the WP Socializer Admin Page.
93
- 1. Customize the settings.
94
- 1. Use the corresponding button code in the placement template.
95
- 1. That's all. Enjoy !
96
 
97
- [Documentation](http://www.aakashweb.com/docs/wp-socializer-docs/)
98
 
99
  == Frequently Asked Questions ==
100
 
101
- Frequently Asked Questions can be seen [here](http://www.aakashweb.com/docs/wp-socializer-docs/wp-socializer-faq/).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102
 
103
- For custom placement in theme files and posts, check out the following documentations
104
 
105
- * [Template function reference](http://www.aakashweb.com/docs/wp-socializer-docs/function-reference/).
106
- * [Manual placement](http://www.aakashweb.com/docs/wp-socializer-docs/manual-placement/).
107
 
108
  == Screenshots ==
109
 
110
- 1. A post showing Social bookmarking and sharing buttons added with WP Socializer plugin.
111
- 2. Another example showing the buttons in action.
112
- 3. Addthis and Sharethis buttons inserted in a post.
113
- 4. A Floating Share Bar created using WP Socializer in action.
114
- 5. A dark theme of the floating share bar.
115
- 6. The horizontal mode of the floating share bar.
116
- 7. Magnify, Jump effects and the "Comments" button.
117
- 8. The admin UI showing the buttons inserted into the posts.
118
- 9. The social bookmarking buttons selection page.
119
- 10. The floating share bar settings page.
120
- 11. Facebook like and Google+ widgets added using the WP Socializer plugin.
 
 
121
 
122
- [More Screenshots](http://www.aakashweb.com/wordpress-plugins/wp-socializer/#screenshots)
123
 
124
  == Changelog ==
125
 
126
- = 2.4.9.9 =
127
- * Admin interface width increased
128
- * Added note about the next release of WP Socializer
129
-
130
- = 2.4.9.8 =
131
- * (NEW) Social button site (**VKontakte**) (now contains 108 social bookmarking buttons)
132
- * Sharethis code fix.
133
- * Sharethis twitter handle fix.
134
- * Pinterest alignment fix.
135
- * Social buttons url encoding fix.
136
- * Facebook button code updated.
137
- * (NEW) Facebook like button for different languages.
138
- * Google plus button code updated
139
- * Removed outdated options in admin page
140
- * Minor UI changes
141
-
142
- = 2.4.9.7 =
143
- * Added option to Sharethis "CopyNshare" feature.
144
- * Fixed the issue in page URL outside the post loop. The wrong share count displayed for various buttons is therefore fixed.
145
- * Fixed small UI related bugs.
146
-
147
- = 2.4.9.6 =
148
- * Fix Facebook popup transparency.
149
- * Removed credit links.
150
- * Revised the email link.
151
- * Fixed some debug notices.
152
-
153
- = 2.4.9.5 =
154
- * Fixed Twitter title encoding bug.
155
- * Added Facebook like and send button to the floating sharebar.
156
- * Fixed bug in sharethis shortcode.
157
- * Added option to disable mobile mode for floating sharebar.
158
- * Fixed the irregular position of large pinterest button.
159
-
160
- = 2.4.9 =
161
- * Added mobile optimization or small screen support for the floating sharebar
162
- * Facebook comments popup clipping is fixed.
163
- * Sharethis "undefined" object issue is fixed.
164
- * Social button CSS file size is reduced and notable tweaks are made to the social buttons.
165
- * Scripts and styles are now loaded properly in the frontend as per the API
166
- * Source code is revised and optimized.
167
- * Some minor admin UI improvements are made.
168
-
169
- = 2.4.8 =
170
- * Added option to adjust the distance between the floating sharebar and the post.
171
- * Sharebar can be floated on right side also.
172
- * More than 90 Sharethis services are made available for selection.
173
- * Added option to hide the credit links.
174
- * Minor UI tweaks.
175
-
176
- = 2.4.7 =
177
- * Incompatibility of the "latest jQuery version" with other plugins is fixed.
178
- * Several WordPress notices are fixed.
179
- * Encoding of Hyphen to `&amp;#8211;` is now corrected for Twitter button.
180
-
181
- = 2.4.6 =
182
- * Retweet floating share bar "username" bug fixed
183
- * Smarter tracing of images in a post for pinterest
184
- * Revised code for getting post details
185
- * Bug fixed in the "title" tag for twitter in the urlencoding of hyphen.
186
- * Bug fixed in the mailto link for the "email" button
187
- * Changed hover title of "add to favorites"
188
- * Cleared various "error notices" in the front end
189
- * Fixed several "&" to "&amp" conversion for the social buttons
190
- * Fixed no "alt" attribute to retweet and pinterest buttons
191
- * Fixed several "W3 Validator" errors
192
- * Admin interface tweaked and now more helpful and easy
193
- * Admin page tabs are renamed
194
- * Admin page "In posts and pages" is renamed to "Shortcodes"
195
- * Bug fixed in the publisher key field in the admin page
196
- * Removed url encoding for Sharethis buttons
197
- * Fixed Facebook send form "Clipping"
198
-
199
- = 2.4.5 =
200
- * New "Smart Load" feature to load buttons faster using async method.
201
- * Can load button scripts after a specific time (Smart Load).
202
- * Facebook button now uses HTML5 code instead of iframe.
203
- * Facebook Send button now available.
204
- * TinyMCE toolbar button now updated.
205
-
206
- = 2.4.4 =
207
- * New CSS3 on-hover effects for social bookmarking buttons (Magnify and Jump).
208
- * New "Comments" button for the floating share bar.
209
- * Updated "Twitter" button icon.
210
- * Floating share bar Javascript is revised and fade effects are added.
211
-
212
- = 2.4.3 =
213
- * XSS Vulnerability issue in the "Services selector" page is fixed.
214
- * Added nounce to the Admin page forms.
215
- * Fixed bug in the Twitter social button template.
216
- * Fixed the collision of the quotes in the excerpt with the HTML tags for the email button.
217
-
218
- = 2.4.2 =
219
- * Facebook like button centered in the left float sharing bar.
220
- * Facebook like button iframe CSS zero margin fix is done for themes.
221
- * Bug fixed in the `wp_socializer();` function for printing templates.
222
- * Retweet button now traces the title of the post from the home page.
223
- * Small admin interface tweaks.
224
-
225
- = 2.4.1 =
226
- * Facebook like button bug is fixed.
227
- * Facebook send button not available.
228
- * Email button bug fixed.
229
- * Added query strings to all WP Socializer CSS and JS files.
230
-
231
- = 2.4 =
232
- * Admin UI is completely changed as per users request.
233
- * Floating share buttons are added.
234
- * Added a new social bookmarking buttons: Google+, Pinterest & OkNotizie
235
- * Pinterest button automatically recognizes the first image in the post.
236
- * Send button is included in Facebook.
237
- * Embed codes are updated for Facebook and StumbleUpon.
238
- * Removed Google Buzz completely.
239
- * Removed the "Retweet" (the unofficial button offered by retweet.com) service.
240
- * Two old inbuilt templates are removed and two new templates are added.
241
- * Lots and lots of bugs are fixed.
242
- * Email button problem is fixed.
243
- * Old translations (German & Chinese) are removed.
244
-
245
- = 2.3 =
246
- * Facebook like box, Google + badge widget is included.
247
- * LinkedIn buttons are added.
248
- * Google Buzz is removed.
249
- * Templates are updated.
250
- * Option to change the `rel="nofollow"` attribute.
251
- * Minor admin UI changes and improvements.
252
-
253
- = 2.2 =
254
- * Conflict with the tinyMCE editor fixed.
255
- * A "WP Socializer" button is added to the visual editing and code editing toolbar for inserting social buttons into posts easily.
256
-
257
- = 2.1 =
258
- * Admin Blank page error fixed in Firefox 3.6.x
259
- * Encoded title fix for Sharethis buttons.
260
- * Social buttons `max-width` bug fixed for IE 8.
261
- * Fixed broken link in the admin bar.
262
- * Updated the AW updates the notification widget.
263
- * Added useful notices and informaion bars to the administration page for beginners.
264
-
265
- = 2.0 =
266
- * Core code completely re-written for future supports and advancements.
267
- * Additional social bookmarking buttons are added.
268
- * Addthis buttons are updated and new type of buttons are available.
269
- * Sharethis buttons are introduced.
270
- * Twitter�s Official button is added.
271
- * Facebook like button code is updated.
272
- * Google +1 button, StumbleUpon, Reddit buttons are added.
273
- * Adminitration page completely redesiged.
274
- * Inbuilt menus are added for inserting buttons into template.
275
- * One-click templates are introduced.
276
- * Shortcodes feature is introduced.
277
- * and more..
278
-
279
- = 1.0 =
280
- * Initial Version
281
-
282
- == Upgrade Notice ==
283
-
284
- = 2.4.9.9 =
285
- Version 2.4.9.8 and above is a recommended upgrade to get all the latest social bookmarking and sharing buttons available in the Internet. Various bugs are fixed. Please dont ignore to update to it.
286
-
287
- == Credits ==
288
-
289
- * Full interface and coding by [Aakash Chakravarthy](http://www.aakashweb.com/)
290
- * Social buttons list taken from the old sociable plugin and updates are added by the author.
1
  === WP Socializer ===
2
  Contributors: vaakash
3
+ Donate link: https://paypal.me/vaakash
4
+ Tags: social, share, media, sharing, follow, profile, button, buttons, icons, links, count, counter, bookmark, widget, sidebar, post, posts, page, sharebar, promotion, marketing, plugin, follow buttons, share buttons, floating share buttons, profile buttons, mobile, mobile sharebar, profile icons, social plugins, share bar, social bar, share counter, vertical, horizontal, content, excerpt, description, widgets, shortcode, images, facebook, twitter, google, linkedin, pinterest, pocket, reddit, sharethis, stumbleupon, favorites, addthis, whatsapp, tweet, vkontakte, popup, socializer, messenger, wp socializer, cache, quote
5
+ Requires at least: 4.6
6
+ Tested up to: 4.7.3
7
+ Stable tag: 3.0
8
  License: GPLv2 or later
9
+ License URI: https://www.gnu.org/licenses/gpl-2.0.html
 
 
 
10
 
11
+ Add attractive fully customizable social media share buttons, floating sharebar, follow us icons & mobile sharebar in posts, pages & widgets.
12
 
13
  == Description ==
14
 
15
+ WP Socializer is an all in one complete social media plugin to add native social media buttons, icons, floating sharebar, follow us buttons, profile icons, mobile sharebar and selected text share popups easily with complete control and customization.
16
 
17
+ It powers a drag & drop admin interface to create buttons with customization and options to selectively display buttons in the desired post and pages.
18
 
19
+ [youtube https://www.youtube.com/watch?v=50aJq223TB0]
20
 
21
+ [Live working Demo of the plugin](http://www.aakashweb.com/demos/wp-socializer/)
22
 
23
+ = Native social media buttons =
 
 
 
 
 
 
24
 
25
+ > With WP Socializer plugin, you can add the native share buttons provided by leading social media websites like Facebook, Twitter, LinkedIn, Pinterest, Sharethis etc. Buttons settings can be changed inside the admin page itself.
26
 
27
+ = Social media share icons =
28
 
29
+ > Apart from native buttons, there are 45 high quality scalable social media icons which can also be added with desired icon size, shape, color, effects, share count, share text etc. to match the theme of the website.
30
 
31
+ = Vertical & Horizontal floating sharebars =
32
 
33
+ > With the plugin, we can also place floating sharebars either vertically or horizontally which can either be move or be fixed with selectable themes and colors. The sharebar is open to place any desired button or icons in it with no restriction.
34
 
35
+ = Conditional display =
36
 
37
+ > Social buttons can be placed conditionally by creating rules which allows it to display only on the desired posts. There is a wide selection of rules which gives complete control on where to display what kind of buttons.
38
 
39
+ = Share counter =
 
40
 
41
+ > WP Socializer also supports share counter for Facebook, LinkedIn, StumbleUpon, Google Plus and Pinterest. Share counter can be either displayed individually over icons or as a total count like in popular news sites.
 
42
 
43
+ = Follow us icons & selected text sharebar =
44
 
45
+ > There is also support for follow us / profile icons which can placed in widget or near the sides of the window. In addition to this, popups can also be added to share selected text which allows visitors to share the quoted text.
46
 
47
+ = Highly optimized for faster page loads =
48
 
49
+ > WP Socializer loads webpages faster since scripts required by buttons are loaded only once and also when necessary. This increases the page load faster even when multiple buttons are used in the same page.
 
 
50
 
51
  = Widgets =
52
 
53
+ > WP Socializer also supports widgets like Twitter timeline, Facebook page, Google+ Badge, follow us widget and all the native social media buttons.
 
 
54
 
55
+ = Support for Shortcodes =
56
 
57
+ > There is also support for shortcodes with which social media buttons can be placed anywhere in posts and even in themes directly.
58
 
 
 
 
59
 
60
+ = More links =
 
61
 
62
+ * [FAQs](https://www.aakashweb.com/docs/wp-socializer-docs/wp-socializer-faq/)
63
+ * [Support Forum](https://www.aakashweb.com/forum/)
64
+ * [Homepage](https://www.aakashweb.com/wordpress-plugins/wp-socializer/)
65
+ * [Donate](https://paypal.me/vaakash)
66
+ * [Submit translation](https://www.aakashweb.com/forum/viewforum.php?f=22)
67
+ * [YouTube demo videos](https://www.youtube.com/playlist?list=PLNwJ5cB8SX4yzB3XdvvC5SsCJsAZh5SF6)
68
+ * [Live Demo](http://www.aakashweb.com/demos/wp-socializer/)
69
 
 
70
 
 
 
 
71
 
72
  == Installation ==
73
 
74
+ 1. Upload the plugin files to the `/wp-content/plugins/wp-socializer` directory, or install the plugin through the WordPress plugins screen directly.
75
+ 1. Activate the plugin through the 'Plugins' screen in WordPress
76
+ 1. Use the Settings->WP Socializer screen to configure the plugin
77
+
 
 
78
 
 
79
 
80
  == Frequently Asked Questions ==
81
 
82
+ = Why are the share buttons not aligned properly ? =
83
+
84
+ Share buttons are aligned using CSS. This alignment can sometimes be disturbed by the active theme used. This can be corrected by CSS. Please refer [this image](https://www.aakashweb.com/docs/wp-socializer-docs/wp-socializer-faq/#css-classes) for the list of CSS classes used by plugin to modify it or else please post your issue in the [support forum](https://www.aakashweb.com/forum/) I'll try my best to give a quick CSS fix for the misalignment.
85
+
86
+ = Share buttons are not displayed in the page ! =
87
+
88
+ Share buttons or other feature may be hidden if the option "Hide in all pages" option is selected in "Conditions to display" section. Please select "Show in all pages" option to display the buttons. If the buttons are still not displayed, please raise an issue in the Support forum.
89
+
90
+ = How to disable a feature in specific page alone ? =
91
+
92
+ WP Socializer has a feature called "conditional display" where a feature can be made to shown only at desired places by creating rules. Please look for the section "Conditions to display the template" under every feature page to add rules as per the requirement.
93
+
94
+ = How to disable/hide share buttons in all pages ? =
95
+
96
+ Please select "Hide in all pages" option under "conditions to display the template" section in all the templates to hide them being displayed. For other features like floating sharebar, follow bar, text sharebar and mobile sharebar can be hidden by "disabling" them from the top most section available at their respective pages.
97
+
98
+ = How to add a custom share button which is not available already to the template ? =
99
+
100
+ Custom share buttons can be added using the "Custom HTML" service. Paste your button generation script in the text box and use that custom HTML button in the template.
101
+
102
+ Please refer [this page](https://www.aakashweb.com/docs/wp-socializer-docs/wp-socializer-faq/) for the full list of FAQs.
103
 
 
104
 
 
 
105
 
106
  == Screenshots ==
107
 
108
+ 1. Native social icon, buttons, share counters, icons styles in action
109
+ 2. WP Socializer in action with a dark theme
110
+ 3. Vertical sharebar
111
+ 4. Horizontal sharebar
112
+ 5. Sharebar with custom background color and design
113
+ 6. Follow us icons floating to the sides.
114
+ 7. Mobile sharebar in different themes
115
+ 8. Selected text sharebar with green theme selected.
116
+ 9. Admin UI to create buttons.
117
+ 10. Conditional display UI.
118
+ 11. Social button icons settings page.
119
+ 12. Follow bar admin page.
120
+
121
 
 
122
 
123
  == Changelog ==
124
 
125
+ = 3.0 =
126
+ * Plugin completely re-written from scratch
127
+ * New administration interface
128
+ * Support for modern buttons, icons
129
+
130
+
131
+
132
+ == Upgrade Notice ==
133
+
134
+ WP Socializer v3 is re-written from scratch with attractive lot more features.Please upgrade to the latest version ( 3.0+ ) to experience all the new features.
135
+ Please watch [this video](https://www.youtube.com/playlist?list=PLNwJ5cB8SX4yzB3XdvvC5SsCJsAZh5SF6) for more details.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
screenshot-1.png DELETED
Binary file
screenshot-10.png DELETED
Binary file
screenshot-11.png DELETED
Binary file
screenshot-2.png DELETED
Binary file
screenshot-3.png DELETED
Binary file
screenshot-4.png DELETED
Binary file
screenshot-5.png DELETED
Binary file
screenshot-6.png DELETED
Binary file
screenshot-7.png DELETED
Binary file
screenshot-8.png DELETED
Binary file
screenshot-9.png DELETED
Binary file
services/facebook.php ADDED
@@ -0,0 +1,275 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Facebook service for WP Socializer
4
+ *
5
+ */
6
+
7
+ class wpsr_service_facebook{
8
+
9
+ function __construct(){
10
+
11
+ WPSR_Services::register( 'facebook', array(
12
+ 'name' => 'Facebook',
13
+ 'icons' => WPSR_ADMIN_URL . '/images/icons/facebook.png',
14
+ 'desc' => __( 'Create Facebook like, share and send buttons', 'wpsr' ),
15
+ 'settings' => array( 'size' => '500x450' ),
16
+ 'callbacks' => array(
17
+ 'output' => array( $this, 'output' ),
18
+ 'includes' => array( $this, 'includes' ),
19
+ 'settings' => array( $this, 'settings' ),
20
+ 'validation' => array( $this, 'validation' ),
21
+ 'general_settings' => array( $this, 'general_settings' ),
22
+ 'general_settings_validation' => array( $this, 'general_settings_validation' ),
23
+ )
24
+ ));
25
+
26
+ $this->default_values = array(
27
+ 'type' => 'like',
28
+ 'like_type' => 'box_count',
29
+ 'like_share_btn' => 'false',
30
+ 'like_size' => 'small',
31
+ 'like_width' => '',
32
+ 'like_action' => 'like',
33
+ 'like_faces' => 'false',
34
+ 'share_type' => 'box_count'
35
+ );
36
+
37
+ }
38
+
39
+ function output( $settings = array(), $page_info = array() ){
40
+
41
+ $out = array();
42
+ $html = '';
43
+ $settings = wp_parse_args( $settings, $this->default_values );
44
+
45
+ if( $settings[ 'type' ] == 'like' ){
46
+ $html = '<div class="fb-like" data-href="' . esc_attr( $page_info[ 'url' ] ) . '" data-width="' . esc_attr( $settings[ 'like_width' ] ) . '" data-layout="' . esc_attr( $settings[ 'like_type' ] ) . '" data-action="' . esc_attr( $settings[ 'like_action' ] ) . '" data-show-faces="' . esc_attr( $settings[ 'like_faces' ] ) . '" data-share="' . esc_attr( $settings[ 'like_share_btn' ] ) . '" data-size="' . esc_attr( $settings[ 'like_size' ] ) . '"></div>';
47
+ }
48
+
49
+ if( $settings[ 'type' ] == 'share' ){
50
+ $html = '<div class="fb-share-button" data-href="' . esc_attr( $page_info[ 'url' ] ) . '" data-layout="' . esc_attr( $settings[ 'share_type' ] ) . '"></div>';
51
+ }
52
+
53
+ if( $settings[ 'type' ] == 'send' ){
54
+ $html = '<div class="fb-send" data-href="' . esc_attr( $page_info[ 'url' ] ) . '"></div>';
55
+ }
56
+
57
+ $out['html'] = $html;
58
+
59
+ $out['includes'] = array( 'facebook_main_js' );
60
+ return $out;
61
+
62
+ }
63
+
64
+ function includes(){
65
+
66
+ $includes = array(
67
+ 'facebook_main_js' => array(
68
+ 'type' => 'js',
69
+ 'code' => '<div id="fb-root"></div>
70
+ <script>(function(d, s, id) {
71
+ var js, fjs = d.getElementsByTagName(s)[0];
72
+ if (d.getElementById(id)) return;
73
+ js = d.createElement(s); js.id = id;
74
+ js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.8";
75
+ fjs.parentNode.insertBefore(js, fjs);
76
+ }(document, "script", "facebook-jssdk"));</script>'
77
+ )
78
+ );
79
+
80
+ return $includes;
81
+
82
+ }
83
+
84
+ function settings( $values ){
85
+
86
+ $values = wp_parse_args( $values, $this->default_values );
87
+
88
+ $yes_no = array(
89
+ 'true' => __( 'Yes', 'wpsr' ),
90
+ 'false' => __( 'No', 'wpsr' )
91
+ );
92
+
93
+ $section1 = array(
94
+ array( __( 'Button type', 'wpsr' ), WPSR_Admin::field( 'select', array(
95
+ 'name' => 'o[type]',
96
+ 'value' => $values['type'],
97
+ 'class' => 'fb_btn_type',
98
+ 'list' => array(
99
+ 'like' => __( 'Like button', 'wpsr' ),
100
+ 'share' => __( 'Share button', 'wpsr' ),
101
+ 'send' => __( 'Send button', 'wpsr' )
102
+ )
103
+ ))),
104
+ );
105
+
106
+ WPSR_Admin::build_table( $section1, '', '', true);
107
+
108
+ $section_like = array(
109
+
110
+ array( __( 'Like button type', 'wpsr' ), WPSR_Admin::field( 'select', array(
111
+ 'name' => 'o[like_type]',
112
+ 'value' => $values['like_type'],
113
+ 'list' => array(
114
+ 'box_count' => 'Box count',
115
+ 'button_count' => 'Button count',
116
+ 'button' => 'Button',
117
+ 'standard' => 'Standard',
118
+ ),
119
+ 'tip' => WPSR_ADMIN_URL . '/images/tips/fb-types.png'
120
+ ))),
121
+
122
+ array( __( 'Show share button', 'wpsr' ), WPSR_Admin::field( 'radio', array(
123
+ 'name' => 'o[like_share_btn]',
124
+ 'value' => $values['like_share_btn'],
125
+ 'list' => $yes_no,
126
+ ))),
127
+
128
+ array( __( 'Button size', 'wpsr' ), WPSR_Admin::field( 'select', array(
129
+ 'name' => 'o[like_size]',
130
+ 'value' => $values['like_size'],
131
+ 'list' => array( 'small' => 'Normal', 'large' => 'Large')
132
+ ))),
133
+
134
+ array( __( 'Width of the button', 'wpsr' ), WPSR_Admin::field( 'text', array(
135
+ 'type' => 'number',
136
+ 'name' => 'o[like_width]',
137
+ 'value' => $values['like_width'],
138
+ 'placeholder' => __( 'Width in pixels', 'wpsr' )
139
+ ))),
140
+
141
+ array( __( 'Action type', 'wpsr' ), WPSR_Admin::field( 'select', array(
142
+ 'name' => 'o[like_action]',
143
+ 'value' => $values['like_action'],
144
+ 'list' => array( 'like' => 'Like', 'recommend' => 'Recommend'),
145
+ ))),
146
+
147
+ array( __( 'Show Friends` faces', 'wpsr' ), WPSR_Admin::field( 'radio', array(
148
+ 'name' => 'o[like_faces]',
149
+ 'value' => $values['like_faces'],
150
+ 'list' => $yes_no,
151
+ ))),
152
+
153
+ );
154
+
155
+ echo '<div data-conditioner data-condr-input=".fb_btn_type" data-condr-value="like" data-condr-action="simple?show:hide" data-condr-events="click">';
156
+ echo '<h4>' . __( 'Like button settings', 'wpsr' ) . '</h4>';
157
+ WPSR_Admin::build_table( $section_like, '', '', true);
158
+ echo '</div>';
159
+
160
+
161
+ $section_share = array(
162
+ array( __( 'Share button type', 'wpsr' ), WPSR_Admin::field( 'select', array(
163
+ 'name' => 'o[share_type]',
164
+ 'value' => $values['share_type'],
165
+ 'list' => array(
166
+ 'box_count' => 'Box count',
167
+ 'button_count' => 'Button count',
168
+ 'button' => 'Button'
169
+ )
170
+ ))),
171
+ );
172
+
173
+ echo '<div data-conditioner data-condr-input=".fb_btn_type" data-condr-value="share" data-condr-action="simple?show:hide" data-condr-events="click">';
174
+ echo '<h4>' . __( 'Share button settings', 'wpsr' ) . '</h4>';
175
+ WPSR_Admin::build_table( $section_share, '', '', true);
176
+ echo '</div>';
177
+
178
+ echo '<script>if( jQuery.fn.conditioner ) jQuery("[data-conditioner]").conditioner();</script>';
179
+ }
180
+
181
+ function validation( $values ){
182
+
183
+ return $values;
184
+
185
+ }
186
+
187
+ function general_settings( $values ){
188
+
189
+
190
+ }
191
+
192
+ function general_settings_validation( $values ){
193
+ return $values;
194
+ }
195
+
196
+ }
197
+
198
+ new wpsr_service_facebook();
199
+
200
+ /**
201
+ * Facebook widget
202
+ */
203
+
204
+ class wpsr_widget_facebook{
205
+
206
+ function __construct(){
207
+
208
+ WPSR_Widgets::register( 'facebook', array(
209
+ 'name' => 'Facebook & messenger widget',
210
+ 'callbacks' => array(
211
+ 'widget' => array( $this, 'widget' ),
212
+ 'form' => array( $this, 'form' ),
213
+ 'update' => array( $this, 'update' )
214
+ )
215
+ ));
216
+
217
+ $this->defaults = array(
218
+ 'fb_page_url' => '',
219
+ 'fb_page_tabs' => 'timeline',
220
+ 'fb_page_width' => '400',
221
+ 'fb_page_height' => '400',
222
+ 'fb_page_small_header' => 'false',
223
+ 'fb_page_hide_cover' => 'false',
224
+ 'fb_page_show_faces' => 'true',
225
+ );
226
+
227
+ }
228
+
229
+ function widget( $args, $instance ){
230
+
231
+ $instance = wp_parse_args( $instance, $this->defaults );
232
+
233
+ echo '<div class="fb-page" data-href="' . $instance[ 'fb_page_url' ] . '"
234
+ data-tabs="' . $instance[ 'fb_page_tabs' ] . '"
235
+ data-width="' . $instance[ 'fb_page_width' ] . '"
236
+ data-height="' . $instance[ 'fb_page_height' ] . '"
237
+ data-hide-cover="' . $instance[ 'fb_page_hide_cover' ] . '"
238
+ data-show-facepile="' . $instance[ 'fb_page_show_faces' ] . '"
239
+ data-small-header="' . $instance[ 'fb_page_small_header' ] . '"></div>';
240
+
241
+ WPSR_Includes::add_active_includes( array( 'facebook_main_js' ) );
242
+
243
+ }
244
+
245
+ function form( $obj, $instance ){
246
+
247
+ $instance = wp_parse_args( $instance, $this->defaults );
248
+ $fields = new WPSR_Widget_Form_Fields( $obj, $instance );
249
+
250
+ $yesno = array(
251
+ 'true' => __( 'Yes', 'wpsr' ),
252
+ 'false' => __( 'No', 'wpsr' )
253
+ );
254
+
255
+ echo '<h4>' . __( 'Facebook Widget settings', 'wpsr' ) . '</h4>';
256
+ $fields->text( 'fb_page_url', 'Facebook page URL', array( 'placeholder' => 'Ex: https://facebook.com/facebook' ) );
257
+ $fields->text( 'fb_page_tabs', 'Tabs to display ( Enter tab names separated by comma. Example: timeline,events,messages )' );
258
+ $fields->number( 'fb_page_width', 'Widget width ( in pixels )' );
259
+ $fields->number( 'fb_page_height', 'Widget height ( in pixels )' );
260
+
261
+ $fields->select( 'fb_page_small_header', 'Display small header', $yesno, array( 'class' => 'smallfat' ) );
262
+ $fields->select( 'fb_page_hide_cover', 'Hide cover photo', $yesno, array( 'class' => 'smallfat' ) );
263
+ $fields->select( 'fb_page_show_faces', 'Show friend\'s faces', $yesno, array( 'class' => 'smallfat' ) );
264
+
265
+ }
266
+
267
+ function update( $instance ){
268
+ return $instance;
269
+ }
270
+
271
+ }
272
+
273
+ new wpsr_widget_facebook();
274
+
275
+ ?>
services/google_plus.php ADDED
@@ -0,0 +1,191 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Google Plus service for WP Socializer
4
+ *
5
+ */
6
+
7
+ class wpsr_service_google_plus{
8
+
9
+ function __construct(){
10
+
11
+ WPSR_Services::register( 'google_plus', array(
12
+ 'name' => 'Google Plus',
13
+ 'icons' => WPSR_ADMIN_URL . '/images/icons/google-plus.png',
14
+ 'desc' => __( 'Create Google Plus +1 buttons', 'wpsr' ),
15
+ 'settings' => array( 'size' => '500x280' ),
16
+ 'callbacks' => array(
17
+ 'output' => array( $this, 'output' ),
18
+ 'includes' => array( $this, 'includes' ),
19
+ 'settings' => array( $this, 'settings' ),
20
+ 'validation' => array( $this, 'validation' ),
21
+ 'general_settings' => array( $this, 'general_settings' ),
22
+ 'general_settings_validation' => array( $this, 'general_settings_validation' ),
23
+ )
24
+ ));
25
+
26
+ $this->default_values = array(
27
+ 'size' => 'standard',
28
+ 'annotation' => 'inline',
29
+ 'width' => '',
30
+ );
31
+
32
+ }
33
+
34
+ function output( $settings = array(), $page_info = array() ){
35
+
36
+ $out = array();
37
+ $settings = wp_parse_args( $settings, $this->default_values );
38
+
39
+ $width = ( $settings[ 'annotation' ] == 'inline' ) ? 'data-width="' . esc_attr( $settings[ 'width' ] ) . '"' : '';
40
+
41
+ $out['html'] = '<div class="g-plusone" data-size="' . esc_attr( $settings[ 'size' ] ) . '" data-annotation="' . esc_attr( $settings['annotation'] ) . '" ' . $width . '></div>';
42
+
43
+ $out['includes'] = array( 'google_plus_main_js' );
44
+ return $out;
45
+
46
+ }
47
+
48
+ function includes(){
49
+
50
+ $includes = array(
51
+ 'google_plus_main_js' => array(
52
+ 'type' => 'js',
53
+ 'code' => '<script src="https://apis.google.com/js/platform.js" async defer></script>'
54
+ )
55
+ );
56
+
57
+ return $includes;
58
+
59
+ }
60
+
61
+ function settings( $values ){
62
+
63
+ $values = wp_parse_args( $values, $this->default_values );
64
+
65
+ $section1 = array(
66
+ array( __( 'Button size', 'wpsr' ), WPSR_Admin::field( 'select', array(
67
+ 'name' => 'o[size]',
68
+ 'value' => $values['size'],
69
+ 'list' => array(
70
+ 'small' => 'Small',
71
+ 'medium' => 'Medium',
72
+ 'standard' => 'Standard',
73
+ 'tall' => 'Tall'
74
+ ),
75
+ 'tip' => WPSR_ADMIN_URL . '/images/tips/googleplus-sizes.png'
76
+ ))),
77
+
78
+ array( __( 'Bubble type', 'wpsr' ), WPSR_Admin::field( 'select', array(
79
+ 'name' => 'o[annotation]',
80
+ 'value' => $values['annotation'],
81
+ 'class' => 'gp_bubble_type',
82
+ 'list' => array(
83
+ 'bubble' => 'Normal',
84
+ 'inline' => 'Full',
85
+ 'none' => 'None'
86
+ )
87
+ ))),
88
+
89
+ array( __( 'Width of button', 'wpsr' ), WPSR_Admin::field( 'text', array(
90
+ 'type' => 'number',
91
+ 'name' => 'o[width]',
92
+ 'value' => $values['width'],
93
+ 'placeholder' => __( 'Width in pixels', 'wpsr' )
94
+ )), 'data-conditioner data-condr-input=".gp_bubble_type" data-condr-value="inline" data-condr-action="simple?show:hide" data-condr-events="click"'),
95
+
96
+ );
97
+
98
+ WPSR_Admin::build_table( $section1, '', '', true);
99
+
100
+ echo '<script>if( jQuery.fn.conditioner ) jQuery("[data-conditioner]").conditioner();</script>';
101
+
102
+ }
103
+
104
+ function validation( $values ){
105
+
106
+ return $values;
107
+
108
+ }
109
+
110
+ function general_settings( $values ){
111
+
112
+ }
113
+
114
+ function general_settings_validation( $values ){
115
+ return $values;
116
+ }
117
+
118
+ }
119
+
120
+ new wpsr_service_google_plus();
121
+
122
+ /**
123
+ * Google Plus widget
124
+ */
125
+
126
+ class wpsr_widget_googleplus{
127
+
128
+ function __construct(){
129
+
130
+ WPSR_Widgets::register( 'googleplus', array(
131
+ 'name' => 'Google Plus badge',
132
+ 'callbacks' => array(
133
+ 'widget' => array( $this, 'widget' ),
134
+ 'form' => array( $this, 'form' ),
135
+ 'update' => array( $this, 'update' )
136
+ )
137
+ ));
138
+
139
+ $this->defaults = array(
140
+ 'gp_widget_url' => '',
141
+ 'gp_widget_layout' => 'potrait',
142
+ 'gp_widget_width' => '300',
143
+ 'gp_widget_theme' => 'light',
144
+ 'gp_widget_cover_photo' => 'true',
145
+ 'gp_widget_tag_line' => 'true',
146
+ );
147
+
148
+ }
149
+
150
+ function widget( $args, $instance ){
151
+
152
+ $instance = wp_parse_args( $instance, $this->defaults );
153
+
154
+ echo '<div class="g-person" data-width="' . $instance[ 'gp_widget_width' ] . '" data-href="' . $instance[ 'gp_widget_url' ] . '" data-theme="' . $instance[ 'gp_widget_theme' ] . '" data-layout="' . $instance[ 'gp_widget_layout' ] . '" data-showtagline="' . $instance[ 'gp_widget_tag_line' ] . '" data-showcoverphoto="' . $instance[ 'gp_widget_cover_photo' ] . '" data-rel="publisher"></div>';
155
+
156
+ WPSR_Includes::add_active_includes( array( 'google_plus_main_js' ) );
157
+
158
+ }
159
+
160
+ function form( $obj, $instance ){
161
+
162
+ $instance = wp_parse_args( $instance, $this->defaults );
163
+ $fields = new WPSR_Widget_Form_Fields( $obj, $instance );
164
+
165
+ $yesno = array(
166
+ 'true' => __( 'Yes', 'wpsr' ),
167
+ 'false' => __( 'No', 'wpsr' )
168
+ );
169
+
170
+ echo '<h4>' . __( 'Google Plus widget settings', 'wpsr' ) . '</h4>';
171
+ $fields->text( 'gp_widget_url', 'Enter a Google+ profile or page URL', array( 'placeholder' => 'Ex: https://plus.google.com/u/0/101375276491818686057' ) );
172
+ $fields->number( 'gp_widget_width', 'Widget width ( in pixels )' );
173
+ $fields->select( 'gp_widget_theme', 'Widget theme', array( 'light' => 'Light', 'dark' => 'Dark' ), array( 'class' => 'smallfat' ) );
174
+ $fields->select( 'gp_widget_layout', 'Widget layout', array( 'potrait' => 'Potrait', 'landscape' => 'Landscape' ), array( 'class' => 'smallfat' ) );
175
+
176
+ echo '<h5>If layout is potrait</h5>';
177
+
178
+ $fields->select( 'gp_widget_cover_photo', 'Show cover photo', $yesno, array( 'class' => 'smallfat' ) );
179
+ $fields->select( 'gp_widget_tag_line', 'Show tag line', $yesno, array( 'class' => 'smallfat' ) );
180
+
181
+ }
182
+
183
+ function update( $instance ){
184
+ return $instance;
185
+ }
186
+
187
+ }
188
+
189
+ new wpsr_widget_googleplus();
190
+
191
+ ?>
services/html.php ADDED
@@ -0,0 +1,115 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * HTML service for WP Socializer
4
+ *
5
+ */
6
+
7
+ class wpsr_service_html{
8
+
9
+ function __construct(){
10
+
11
+ WPSR_Services::register( 'html', array(
12
+ 'name' => 'Custom HTML',
13
+ 'icons' => WPSR_ADMIN_URL . '/images/icons/html.png',
14
+ 'desc' => __( 'Add custom HTML snippets like "heading" within the template', 'wpsr' ),
15
+ 'settings' => array( 'size' => 'popup' ),
16
+ 'callbacks' => array(
17
+ 'output' => array( $this, 'output' ),
18
+ 'includes' => array( $this, 'includes' ),
19
+ 'settings' => array( $this, 'settings' ),
20
+ 'validation' => array( $this, 'validation' ),
21
+ 'general_settings' => array( $this, 'general_settings' ),
22
+ 'general_settings_validation' => array( $this, 'general_settings_validation' ),
23
+ )
24
+ ));
25
+
26
+ $this->default_values = array(
27
+ 'html' => '<h3>' . __( 'Share this article', 'wpsr' ) . '</h3>',
28
+ '_wrap_tag' => 0
29
+ );
30
+
31
+ }
32
+
33
+ function output( $settings = array(), $page_info = array() ){
34
+
35
+ $out = array();
36
+ $settings = wp_parse_args( $settings, $this->default_values );
37
+
38
+ $tags = array();
39
+ $replace_with = array();
40
+ foreach( $page_info as $id => $val ){
41
+ array_push( $tags, '{' . $id . '}' );
42
+ array_push( $replace_with, $val );
43
+ }
44
+ $final_html = str_replace( $tags, $replace_with, $settings[ 'html' ] );
45
+
46
+ $out['html'] = balanceTags( $final_html );
47
+ $out['includes'] = array();
48
+ return $out;
49
+
50
+ }
51
+
52
+ function includes(){
53
+
54
+ $includes = array();
55
+
56
+ return $includes;
57
+
58
+ }
59
+
60
+ function settings( $values ){
61
+
62
+ $values = wp_parse_args( $values, $this->default_values );
63
+
64
+ echo '<p>' . __( 'Enter custom HTML below', 'wpsr' ) . '</p>';
65
+ echo '<textarea class="custom_html_editor" name="o[html]" >' . $values[ 'html' ] . '</textarea>';
66
+
67
+ echo '
68
+ <script>
69
+ wpsr_load_css( "wpsr_tbg_css", "' . WPSR_ADMIN_URL . 'js/trumbowyg/trumbowyg.min.css" );
70
+ wpsr_load_js( "wpsr_tbg_js", "' . WPSR_ADMIN_URL . 'js/trumbowyg/trumbowyg.min.js", function(){
71
+ jQuery.trumbowyg.svgPath = "' . WPSR_ADMIN_URL . 'js/trumbowyg/icons.svg";
72
+ jQuery( ".custom_html_editor" ).trumbowyg({
73
+ autogrow: true,
74
+ btns: [
75
+ ["viewHTML"],
76
+ ["formatting"],
77
+ "btnGrp-semantic",
78
+ ["superscript", "subscript"],
79
+ ["link"],
80
+ ["insertImage"],
81
+ "btnGrp-justify",
82
+ "btnGrp-lists",
83
+ ["horizontalRule"],
84
+ ["removeformat"]
85
+ ]
86
+ });
87
+ });
88
+ </script>
89
+ ';
90
+
91
+ echo '<h4>' . __( 'Note', 'wpsr' ) . ':</h4>';
92
+ echo __( 'Placeholders <code>{url}</code> and <code>{title}</code> can be used in the HTML to replace them with post URL and title respectively', 'wpsr' );
93
+
94
+ }
95
+
96
+ function validation( $values ){
97
+ $values[ '_wrap_tag' ] = 0;
98
+ return $values;
99
+
100
+ }
101
+
102
+
103
+ function general_settings( $values ){
104
+
105
+ }
106
+
107
+ function general_settings_validation( $values ){
108
+ return $values;
109
+ }
110
+
111
+ }
112
+
113
+ new wpsr_service_html();
114
+
115
+ ?>
services/linkedin.php ADDED
@@ -0,0 +1,95 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * LinkedIn service for WP Socializer
4
+ *
5
+ */
6
+
7
+ class wpsr_service_linkedin{
8
+
9
+ function __construct(){
10
+
11
+ WPSR_Services::register( 'linkedin', array(
12
+ 'name' => 'LinkedIn',
13
+ 'icons' => WPSR_ADMIN_URL . '/images/icons/linkedin.png',
14
+ 'desc' => __( 'Create LinkedIn buttons', 'wpsr' ),
15
+ 'settings' => array( 'size' => '500x200' ),
16
+ 'callbacks' => array(
17
+ 'output' => array( $this, 'output' ),
18
+ 'includes' => array( $this, 'includes' ),
19
+ 'settings' => array( $this, 'settings' ),
20
+ 'validation' => array( $this, 'validation' ),
21
+ 'general_settings' => array( $this, 'general_settings' ),
22
+ 'general_settings_validation' => array( $this, 'general_settings_validation' ),
23
+ )
24
+ ));
25
+
26
+ $this->default_values = array(
27
+ 'type' => 'right'
28
+ );
29
+
30
+ }
31
+
32
+ function output( $settings = array(), $page_info = array() ){
33
+
34
+ $out = array();
35
+ $settings = wp_parse_args( $settings, $this->default_values );
36
+
37
+ $out['html'] = '<script type="IN/Share" data-url="' . esc_attr( $page_info[ 'url' ] ) . '" data-counter="' . esc_attr( $settings[ 'type' ] ) . '"></script>';
38
+ $out['includes'] = array( 'linkedin_main_js' );
39
+ return $out;
40
+
41
+ }
42
+
43
+ function includes(){
44
+
45
+ $includes = array(
46
+ 'linkedin_main_js' => array(
47
+ 'type' => 'js',
48
+ 'code' => '<script src="//platform.linkedin.com/in.js" type="text/javascript"> lang: en_US</script>'
49
+ )
50
+ );
51
+
52
+ return $includes;
53
+
54
+ }
55
+
56
+ function settings( $values ){
57
+
58
+ $values = wp_parse_args( $values, $this->default_values );
59
+
60
+ $section1 = array(
61
+ array( __( 'Counter position', 'wpsr' ), WPSR_Admin::field( 'select', array(
62
+ 'name' => 'o[type]',
63
+ 'value' => $values['type'],
64
+ 'list' => array(
65
+ 'right' => __( 'Horizontal', 'wpsr' ),
66
+ 'top' => __( 'Top', 'wpsr' ),
67
+ 'none' => __( 'No count', 'wpsr' ),
68
+ )
69
+ ))),
70
+ );
71
+
72
+ WPSR_Admin::build_table( $section1, '', '', true);
73
+
74
+ }
75
+
76
+ function validation( $values ){
77
+
78
+ return $values;
79
+
80
+ }
81
+
82
+
83
+ function general_settings( $values ){
84
+
85
+ }
86
+
87
+ function general_settings_validation( $values ){
88
+ return $values;
89
+ }
90
+
91
+ }
92
+
93
+ new wpsr_service_linkedin();
94
+
95
+ ?>
services/pinterest.php ADDED
@@ -0,0 +1,169 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Pinterest service for WP Socializer
4
+ *
5
+ */
6
+
7
+ class wpsr_service_pinterest{
8
+
9
+ function __construct(){
10
+
11
+ WPSR_Services::register( 'pinterest', array(
12
+ 'name' => 'Pinterest',
13
+ 'icons' => WPSR_ADMIN_URL . '/images/icons/pinterest.png',
14
+ 'desc' => 'A simple description for the Pinterest button',
15
+ 'settings' => array( 'size' => '500x300' ),
16
+ 'callbacks' => array(
17
+ 'output' => array( $this, 'output' ),
18
+ 'includes' => array( $this, 'includes' ),
19
+ 'settings' => array( $this, 'settings' ),
20
+ 'validation' => array( $this, 'validation' ),
21
+ 'general_settings' => array( $this, 'general_settings' ),
22
+ 'general_settings_validation' => array( $this, 'general_settings_validation' ),
23
+ )
24
+ ));
25
+
26
+ $this->default_values = array(
27
+ 'type' => 'normal',
28
+ );
29
+
30
+ }
31
+
32
+ function output( $settings = array(), $page_info = array() ){
33
+
34
+ $out = array();
35
+ $settings = wp_parse_args( $settings, $this->default_values );
36
+ $html = '';
37
+
38
+ $btn_type = $settings[ 'type'];
39
+
40
+ if ( $btn_type == 'save' ){
41
+ $pin_save = ( $settings[ 'save_shape' ] == 'round' ) ? ' data-pin-round="true" data-pin-save="false"' : ' data-pin-save="true"';
42
+ $pin_size = ( $settings[ 'save_size' ] == 'large' ) ? ' data-pin-tall="true"' : '';
43
+
44
+ $html = '<a data-pin-do="buttonBookmark" ' . $pin_save . $pin_size . ' href="https://www.pinterest.com/pin/create/button/"><img src="//assets.pinterest.com/images/pidgets/pinit_fg_en_round_red_16.png" /></a>';
45
+
46
+ $out['includes'] = array( 'pinterest_main_js' );
47
+ }
48
+
49
+ if ( $btn_type == 'follow' ){
50
+ $html = '<a data-pin-do="buttonFollow" href="' . esc_attr( $settings[ 'follow_url' ] ) . '">' . $settings[ 'follow_name' ] . '</a>';
51
+ $out['includes'] = array( 'pinterest_main_js' );
52
+ }
53
+
54
+ if ( $btn_type == 'image_hover' ){
55
+ $html = '';
56
+ $out['includes'] = array( 'pinterest_image_hover_js' );
57
+ }
58
+
59
+ $out['html'] = $html;
60
+ return $out;
61
+
62
+ }
63
+
64
+ function includes(){
65
+
66
+ $includes = array(
67
+ 'pinterest_main_js' => array(
68
+ 'type' => 'js',
69
+ 'code' => '<script async defer src="//assets.pinterest.com/js/pinit.js"></script>'
70
+ ),
71
+ 'pinterest_image_hover_js' => array(
72
+ 'type' => 'js',
73
+ 'code' => '<script async defer data-pin-hover="true" data-pin-round="true" data-pin-save="false" src="//assets.pinterest.com/js/pinit.js"></script>'
74
+ )
75
+ );
76
+
77
+ return $includes;
78
+
79
+ }
80
+
81
+ function settings( $values ){
82
+
83
+ $values = wp_parse_args( $values, $this->default_values );
84
+
85
+ $section1 = array(
86
+ array( 'Button type', WPSR_Admin::field( 'select', array(
87
+ 'name' => 'o[type]',
88
+ 'value' => $values['type'],
89
+ 'list' => array(
90
+ 'save' => 'Save Button',
91
+ 'follow' => 'Follow button',
92
+ 'image_hover' => 'Image hover button',
93
+ ),
94
+ 'class' => 'pt_btn_type'
95
+ ))),
96
+ );
97
+
98
+ WPSR_Admin::build_table( $section1, '', '', true);
99
+
100
+ echo '<div data-conditioner data-condr-input=".pt_btn_type" data-condr-value="save" data-condr-action="simple?show:hide" data-condr-events="click">';
101
+
102
+ $section2 = array(
103
+ array( 'Save button size', WPSR_Admin::field( 'select', array(
104
+ 'name' => 'o[save_size]',
105
+ 'value' => $values['save_size'],
106
+ 'list' => array(
107
+ 'normal' => 'Normal',
108
+ 'large' => 'Large'
109
+ ),
110
+ ))),
111
+
112
+ array( 'Save button Shape', WPSR_Admin::field( 'select', array(
113
+ 'name' => 'o[save_shape]',
114
+ 'value' => $values['save_shape'],
115
+ 'list' => array(
116
+ 'normal' => 'Normal',
117
+ 'round' => 'Round'
118
+ ),
119
+ ))),
120
+
121
+ );
122
+
123
+ WPSR_Admin::build_table( $section2, '', '', true);
124
+
125
+ echo '</div>';
126
+
127
+ echo '<div data-conditioner data-condr-input=".pt_btn_type" data-condr-value="follow" data-condr-action="simple?show:hide" data-condr-events="click">';
128
+
129
+ $section3 = array(
130
+ array( 'Pinterest URL', WPSR_Admin::field( 'text', array(
131
+ 'name' => 'o[follow_url]',
132
+ 'value' => $values['follow_url'],
133
+ 'placeholder' => 'URL of the pinterest profile'
134
+ ))),
135
+
136
+ array( 'Name on button', WPSR_Admin::field( 'text', array(
137
+ 'name' => 'o[follow_name]',
138
+ 'value' => $values['follow_name'],
139
+ 'placeholder' => 'Name to be displayed on follow button'
140
+ ))),
141
+
142
+ );
143
+
144
+ WPSR_Admin::build_table( $section3, '', '', true);
145
+
146
+ echo '</div>';
147
+
148
+ echo '<script>if( jQuery.fn.conditioner ) jQuery("[data-conditioner]").conditioner();</script>';
149
+ }
150
+
151
+ function validation( $values ){
152
+
153
+ return $values;
154
+
155
+ }
156
+
157
+ function general_settings( $values ){
158
+
159
+ }
160
+
161
+ function general_settings_validation( $values ){
162
+ return $values;
163
+ }
164
+
165
+ }
166
+
167
+ new wpsr_service_pinterest();
168
+
169
+ ?>
services/pocket.php ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Pocket service for WP Socializer
4
+ *
5
+ */
6
+
7
+ class wpsr_service_pocket{
8
+
9
+ function __construct(){
10
+
11
+ WPSR_Services::register( 'pocket', array(
12
+ 'name' => 'Pocket',
13
+ 'icons' => WPSR_ADMIN_URL . '/images/icons/pocket.png',
14
+ 'desc' => __( 'Create Pocket buttons', 'wpsr' ),
15
+ 'settings' => array( 'size' => '500x200' ),
16
+ 'callbacks' => array(
17
+ 'output' => array( $this, 'output' ),
18
+ 'includes' => array( $this, 'includes' ),
19
+ 'settings' => array( $this, 'settings' ),
20
+ 'validation' => array( $this, 'validation' ),
21
+ 'general_settings' => array( $this, 'general_settings' ),
22
+ 'general_settings_validation' => array( $this, 'general_settings_validation' ),
23
+ )
24
+ ));
25
+
26
+ $this->default_values = array(
27
+ 'type' => 'horizontal',
28
+ );
29
+
30
+ }
31
+
32
+ function output( $settings = array(), $page_info = array() ){
33
+
34
+ $out = array();
35
+ $settings = wp_parse_args( $settings, $this->default_values );
36
+ $html = '';
37
+
38
+ $html = '<a data-pocket-label="pocket" data-pocket-count="' . esc_attr( $settings[ 'type' ] ) . '" class="pocket-btn" data-save-url="' . esc_attr( $page_info[ 'url' ] ) . '" data-lang="en">Pocket</a>';
39
+ $html .= '<script type="text/javascript">!function(d,i){if(!d.getElementById(i)){var j=d.createElement("script");j.id=i;j.src="https://widgets.getpocket.com/v1/j/btn.js?v=1";var w=d.getElementById(i);d.body.appendChild(j);}}(document,"pocket-btn-js");</script>';
40
+
41
+ $out['html'] = $html;
42
+
43
+ $out['includes'] = array();
44
+ return $out;
45
+
46
+ }
47
+
48
+ function includes(){
49
+
50
+ $includes = array();
51
+
52
+ return $includes;
53
+
54
+ }
55
+
56
+ function settings( $values ){
57
+
58
+ $values = wp_parse_args( $values, $this->default_values );
59
+
60
+ $section1 = array(
61
+ array( __( 'Button type', 'wpsr' ), WPSR_Admin::field( 'select', array(
62
+ 'name' => 'o[type]',
63
+ 'value' => $values['type'],
64
+ 'list' => array(
65
+ 'horizontal' => 'Horizontal counter',
66
+ 'vertical' => 'Vertical counter',
67
+ 'none' => 'No counter',
68
+ ),
69
+ ))),
70
+ );
71
+
72
+ WPSR_Admin::build_table( $section1, '', '', true);
73
+
74
+ }
75
+
76
+ function validation( $values ){
77
+
78
+ return $values;
79
+
80
+ }
81
+
82
+ function general_settings( $values ){
83
+
84
+ }
85
+
86
+ function general_settings_validation( $values ){
87
+ return $values;
88
+ }
89
+
90
+ }
91
+
92
+ new wpsr_service_pocket();
93
+
94
+ ?>
services/reddit.php ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Reddit service for WP Socializer
4
+ *
5
+ */
6
+
7
+ class wpsr_service_reddit{
8
+
9
+ function __construct(){
10
+
11
+ WPSR_Services::register( 'reddit', array(
12
+ 'name' => 'Reddit',
13
+ 'icons' => WPSR_ADMIN_URL . '/images/icons/reddit.png',
14
+ 'desc' => __( 'Create Reddit share buttons', 'wpsr' ),
15
+ 'settings' => array( 'size' => '500x200' ),
16
+ 'callbacks' => array(
17
+ 'output' => array( $this, 'output' ),
18
+ 'includes' => array( $this, 'includes' ),
19
+ 'settings' => array( $this, 'settings' ),
20
+ 'validation' => array( $this, 'validation' ),
21
+ 'general_settings' => array( $this, 'general_settings' ),
22
+ 'general_settings_validation' => array( $this, 'general_settings_validation' ),
23
+ )
24
+ ));
25
+
26
+ $this->default_values = array(
27
+ 'type' => 'button1',
28
+ );
29
+
30
+ }
31
+
32
+ function output( $settings = array(), $page_info = array() ){
33
+
34
+ $out = array();
35
+ $settings = wp_parse_args( $settings, $this->default_values );
36
+ $html = '';
37
+
38
+ $html = '<script type="text/javascript">reddit_url = "' . esc_attr( $page_info[ 'url' ] ) . '"; reddit_title = "' . esc_attr( $page_info[ 'title' ] ) . '"; reddit_newwindow="1"</script>';
39
+ $html .= '<script type="text/javascript" src="//www.redditstatic.com/button/' . esc_attr( $settings[ 'type' ] ) . '.js"></script>';
40
+
41
+ $out['html'] = $html;
42
+ $out['includes'] = array( '' );
43
+ return $out;
44
+
45
+ }
46
+
47
+ function includes(){
48
+
49
+ $includes = array();
50
+
51
+ return $includes;
52
+
53
+ }
54
+
55
+ function settings( $values ){
56
+
57
+ $values = wp_parse_args( $values, $this->default_values );
58
+
59
+ $section1 = array(
60
+ array( __( 'Button type', 'wpsr' ), WPSR_Admin::field( 'select', array(
61
+ 'name' => 'o[type]',
62
+ 'value' => $values['type'],
63
+ 'list' => array(
64
+ 'button1' => 'Horizontal',
65
+ 'button2' => 'Vertical - Type 1',
66
+ 'button3' => 'Vertical - Type 2',
67
+ ),
68
+ 'tip' => WPSR_ADMIN_URL . '/images/tips/reddit-types.png'
69
+ ))),
70
+ );
71
+
72
+ WPSR_Admin::build_table( $section1, '', '', true);
73
+
74
+ }
75
+
76
+ function validation( $values ){
77
+
78
+ return $values;
79
+
80
+ }
81
+
82
+ function general_settings( $values ){
83
+
84
+ }
85
+
86
+ function general_settings_validation( $values ){
87
+ return $values;
88
+ }
89
+
90
+ }
91
+
92
+ new wpsr_service_reddit();
93
+
94
+ ?>
services/share_counter.php ADDED
@@ -0,0 +1,131 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Share counter service for WP Socializer
4
+ *
5
+ */
6
+
7
+ class wpsr_service_share_counter{
8
+
9
+ function __construct(){
10
+
11
+ WPSR_Services::register( 'share_counter', array(
12
+ 'name' => 'Share Counter',
13
+ 'icons' => WPSR_ADMIN_URL . '/images/icons/share_counter.png',
14
+ 'desc' => __( 'Display share counter', 'wpsr' ),
15
+ 'settings' => array( 'size' => '500x300' ),
16
+ 'callbacks' => array(
17
+ 'output' => array( $this, 'output' ),
18
+ 'includes' => array( $this, 'includes' ),
19
+ 'settings' => array( $this, 'settings' ),
20
+ 'validation' => array( $this, 'validation' ),
21
+ 'general_settings' => array( $this, 'general_settings' ),
22
+ 'general_settings_validation' => array( $this, 'general_settings_validation' ),
23
+ )
24
+ ));
25
+
26
+ $this->default_values = array(
27
+ 'text' => 'Shares',
28
+ 'counter_color' => '#000',
29
+ 'add_services' => array()
30
+ );
31
+
32
+ }
33
+
34
+ function output( $settings = array(), $page_info = array() ){
35
+
36
+ $out = array();
37
+ $settings = wp_parse_args( $settings, $this->default_values );
38
+ $html = '';
39
+
40
+ $total_count = WPSR_Share_Counter::total_count( $page_info[ 'url' ], $settings[ 'add_services' ] );
41
+
42
+ $html .= '<div class="wpsr-counter">';
43
+ $html .= '<span class="scount" style="color:' . esc_attr( $settings[ 'counter_color' ] ) . '">' . $total_count[ 'formatted' ] . '</span>';
44
+ $html .= '<small class="stext">' . $settings[ 'text' ] . '</small>';
45
+ $html .= '</div>';
46
+
47
+ $out['html'] = $html;
48
+ $out['includes'] = array( '' );
49
+ return $out;
50
+
51
+ }
52
+
53
+ function includes(){
54
+
55
+ $includes = array();
56
+
57
+ return $includes;
58
+
59
+ }
60
+
61
+ function settings( $values ){
62
+
63
+ $values = wp_parse_args( $values, $this->default_values );
64
+
65
+ $counter_services = WPSR_Share_Counter::counter_services();
66
+ $available_counters = array();
67
+
68
+ foreach( $counter_services as $cid => $cprop ){
69
+ $available_counters[ $cid ] = $cprop[ 'name' ];
70
+ }
71
+
72
+ $section1 = array(
73
+ array( __( 'Share counts to add', 'wpsr' ), WPSR_Admin::field( 'checkbox', array(
74
+ 'name' => 'o[add_services]',
75
+ 'value' => $values['add_services'],
76
+ 'list' => $available_counters
77
+ ))),
78
+
79
+ array( __( 'Counter text', 'wpsr' ), WPSR_Admin::field( 'text', array(
80
+ 'name' => 'o[text]',
81
+ 'value' => $values['text']
82
+ ))),
83
+
84
+ array( __( 'Counter color', 'wpsr' ), WPSR_Admin::field( 'text', array(
85
+ 'name' => 'o[counter_color]',
86
+ 'value' => $values['counter_color'],
87
+ 'class' => 'wp-color'
88
+ ))),
89
+
90
+ );
91
+
92
+ WPSR_Admin::build_table( $section1, '', '', true);
93
+
94
+ }
95
+
96
+ function validation( $values ){
97
+
98
+ return $values;
99
+
100
+ }
101
+
102
+ function general_settings( $values ){
103
+
104
+ $values = wp_parse_args( $values, WPSR_Share_Counter::$default_settings );
105
+
106
+ $section1 = array(
107
+ array( __( 'Counter cache expiration duration', 'wpsr' ), WPSR_Admin::field( 'text', array(
108
+ 'name' => 'counter_expiration',
109
+ 'value' => $values['counter_expiration'],
110
+ 'helper' => __( 'Enter the number of seconds to cache the social service counter in DB. Note: If duration is small, counter synchronization will be frequent and site can slow down. Ideal duration to cache the entries would be 86400 seconds ( 1 day ). Min duration which can be set is 1800 secs ( 1/2 hrs )', 'wpsr' ),
111
+ ))),
112
+ );
113
+
114
+ WPSR_Admin::build_table( $section1, 'Counter settings');
115
+
116
+ }
117
+
118
+ function general_settings_validation( $values ){
119
+
120
+ if( intval( $values[ 'counter_expiration' ] ) < 1800 ){
121
+ $values[ 'counter_expiration' ] = 1800;
122
+ }
123
+
124
+ return $values;
125
+ }
126
+
127
+ }
128
+
129
+ new wpsr_service_share_counter();
130
+
131
+ ?>
services/sharethis.php ADDED
@@ -0,0 +1,158 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Share this service for WP Socializer
4
+ *
5
+ */
6
+
7
+ class wpsr_service_sharethis{
8
+
9
+ function __construct(){
10
+
11
+ WPSR_Services::register( 'sharethis', array(
12
+ 'name' => 'Share this',
13
+ 'icons' => WPSR_ADMIN_URL . '/images/icons/sharethis.png',
14
+ 'desc' => __( 'Create Sharethis buttons like social buttons with counter', 'wpsr' ),
15
+ 'settings' => array( 'size' => 'popup' ),
16
+ 'callbacks' => array(
17
+ 'output' => array( $this, 'output' ),
18
+ 'includes' => array( $this, 'includes' ),
19
+ 'settings' => array( $this, 'settings' ),
20
+ 'validation' => array( $this, 'validation' ),
21
+ 'general_settings' => array( $this, 'general_settings' ),
22
+ 'general_settings_validation' => array( $this, 'general_settings_validation' ),
23
+ )
24
+ ));
25
+
26
+ $this->sites = WPSR_Lists::sharethis();
27
+
28
+ $this->default_values = array(
29
+ 'type' => 'large',
30
+ );
31
+
32
+ }
33
+
34
+ function output( $settings = array(), $page_info = array() ){
35
+
36
+ $out = array();
37
+ $html = '';
38
+ $settings = wp_parse_args( $settings, $this->default_values );
39
+ $saved = json_decode( base64_decode( $settings[ 'selected_sites' ] ) );
40
+
41
+ if( $settings[ 'type' ] == 'none' ){
42
+ $type = '';
43
+ }else{
44
+ $type = '_' . $settings[ 'type' ];
45
+ }
46
+
47
+ foreach( $saved as $site ){
48
+ $html .= '<span class="st_' . $site . $type . '" displayText="' . esc_attr( $this->sites[ $site ][ 'name' ] ) . '" st_url="' . esc_attr( $page_info[ 'url' ] ) . '" st_title="' . esc_attr( $page_info[ 'title' ] ) . '"></span>';
49
+ }
50
+
51
+ $out['html'] = $html;
52
+ $out['includes'] = array( 'sharethis_main_js' );
53
+ return $out;
54
+
55
+ }
56
+
57
+ function includes(){
58
+
59
+ $gs = wp_parse_args( get_option( 'wpsr_general_settings' ), WPSR_Lists::defaults( 'gsettings_sharethis' ) );
60
+
61
+ $includes = array(
62
+ 'sharethis_main_js' => array(
63
+ 'type' => 'js',
64
+ 'code' => '<script type="text/javascript">var switchTo5x=true;</script>
65
+ <script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>
66
+ <script type="text/javascript">stLight.options({publisher: "' . esc_attr( $gs[ 'st_pub_key' ] ) . '", doNotHash: false, doNotCopy: false, hashAddressBar: false});</script>'
67
+ )
68
+ );
69
+
70
+ return $includes;
71
+
72
+ }
73
+
74
+ function settings( $values ){
75
+
76
+ ?>
77
+
78
+ <h4><?php _e( 'Selected buttons', 'wpsr' ); ?></h4>
79
+ <button class="mini_section_select"><span class="dashicons dashicons-plus"></span> <?php _e( 'Click to open the list of buttons', 'wpsr' ); ?> <span class="dashicons dashicons-arrow-down fright"></span></button>
80
+
81
+ <div class="mini_section">
82
+ <p><?php _e( 'Drag and drop social buttons into the box below', 'wpsr' ); ?></p>
83
+ <div class="mini_filters"><input type="text" class="list_search" data-list=".list_available" placeholder="<?php _e( 'Search', 'wpsr' ); ?> ..." /></div>
84
+ <ul class="mini_btn_list list_available clearfix">
85
+ <?php
86
+ foreach( $this->sites as $site => $config ){
87
+ echo '<li data-id="' . $site . '"><span>' . $config[ 'name' ] . '</span><i class="dashicons dashicons-trash item_action item_delete" title="' . __( 'Delete button', 'wpsr' ) . '"></i></li>';
88
+ }
89
+ ?>
90
+ </ul>
91
+ </div>
92
+
93
+ <ul class="mini_btn_list list_selected clearfix" data-callback="wpsr_st_process_list" data-input=".st_selected_list"><?php
94
+ $saved = json_decode( base64_decode( $values[ 'selected_sites' ] ) );
95
+ foreach( $saved as $site ){
96
+ echo '<li data-id="' . $site . '"><span>' . $this->sites[ $site ][ 'name' ] . '</span><i class="dashicons dashicons-trash item_action item_delete" title="' . __( 'Delete button', 'wpsr' ) . '"></i></li>';
97
+ }
98
+ ?></ul>
99
+
100
+ <input type="hidden" name="o[selected_sites]" class="st_selected_list" value="<?php echo $values[ 'selected_sites' ]; ?>" />
101
+
102
+ <script>
103
+ wpsr_list_selector_init();
104
+ </script>
105
+
106
+ <h4>Settings</h4>
107
+
108
+ <?php
109
+
110
+ $values = wp_parse_args( $values, $this->default_values );
111
+
112
+ $section1 = array(
113
+ array( __( 'Button type', 'wpsr' ), WPSR_Admin::field( 'select', array(
114
+ 'name' => 'o[type]',
115
+ 'value' => $values['type'],
116
+ 'list' => array(
117
+ 'none' => __( '16px icons', 'wpsr' ),
118
+ 'large' => __( '32px icons', 'wpsr' ),
119
+ 'hcount' => __( 'Horizontal buttons', 'wpsr' ),
120
+ 'vcount' => __( 'Vertical buttons', 'wpsr' ),
121
+ )
122
+ ))),
123
+ );
124
+
125
+ WPSR_Admin::build_table( $section1, '', '', true);
126
+
127
+ }
128
+
129
+ function validation( $values ){
130
+
131
+ return $values;
132
+
133
+ }
134
+
135
+ function general_settings( $values ){
136
+
137
+ $values = wp_parse_args( $values, WPSR_Lists::defaults( 'gsettings_sharethis' ) );
138
+
139
+ $section1 = array(
140
+ array( __( 'Publisher Key', 'wpsr' ), WPSR_Admin::field( 'text', array(
141
+ 'name' => 'st_pub_key',
142
+ 'value' => $values['st_pub_key'],
143
+ 'helper' => sprintf( __( 'Publisher key can be found <a href="%s" target="_blank">in this page</a>. Enter without brackets.','wpsr' ), 'https://www.sharethis.com/account/' )
144
+ )))
145
+ );
146
+
147
+ WPSR_Admin::build_table( $section1, 'Sharethis settings');
148
+ }
149
+
150
+ function general_settings_validation( $values ){
151
+ return $values;
152
+ }
153
+
154
+ }
155
+
156
+ new wpsr_service_sharethis();
157
+
158
+ ?>
services/social_buttons.php ADDED
@@ -0,0 +1,581 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Social buttons service for WP Socializer
4
+ *
5
+ */
6
+
7
+ class wpsr_service_social_buttons{
8
+
9
+ var $sites;
10
+
11
+ function __construct(){
12
+
13
+ WPSR_Services::register( 'social_buttons', array(
14
+ 'name' => 'Social Buttons',
15
+ 'icons' => WPSR_ADMIN_URL . '/images/icons/social_buttons.png',
16
+ 'desc' => __( 'Create social buttons with 35 sites and combiniations of different shape, size and colors.', 'wpsr' ),
17
+ 'settings' => array( 'size' => 'popup' ),
18
+ 'callbacks' => array(
19
+ 'output' => array( $this, 'output' ),
20
+ 'includes' => array( $this, 'includes' ),
21
+ 'settings' => array( $this, 'settings' ),
22
+ 'validation' => array( $this, 'validation' ),
23
+ 'general_settings' => array( $this, 'general_settings' ),
24
+ 'general_settings_validation' => array( $this, 'general_settings_validation' ),
25
+ )
26
+ ));
27
+
28
+ $this->sites = WPSR_Lists::social_buttons();
29
+
30
+ $this->default_values = array(
31
+ 'selected_sites' => '',
32
+ 'sr-sizes' => '32px',
33
+ 'sr-shapes' => '',
34
+ 'sr-hover' => 'opacity',
35
+ 'sr-layout' => '',
36
+ 'sr-font-size' => '',
37
+ 'sr-icon-display' => '',
38
+ 'sr-icon-color' => 'icon-white',
39
+ 'sr-border-width' => '',
40
+ 'sr-border-color' => '',
41
+ 'sr-background-color' => '',
42
+ 'sr-shadow' => '',
43
+ 'sr-pad' => '',
44
+ 'text-styles' => '',
45
+ 'more_sites' => '0',
46
+ 'open_popup' => ''
47
+ );
48
+
49
+ }
50
+
51
+ function output( $settings = array(), $page_info = array() ){
52
+
53
+ $out = array();
54
+ $settings = wp_parse_args( $settings, $this->default_values );
55
+
56
+ $classes = array( 'socializer' );
57
+ foreach( $settings as $key => $val ){
58
+ if( substr( $key, 0, 3 ) == 'sr-' && $val != '' ){
59
+ array_push( $classes, 'sr-' . $val );
60
+ }
61
+ }
62
+
63
+ $sites_clist = array();
64
+ $sel_sites = json_decode( base64_decode( $settings[ 'selected_sites' ] ) );
65
+ $is_mobile = wp_is_mobile();
66
+ $text_style = $settings[ 'text-styles' ];
67
+ $def_site_options = array(
68
+ 'count' => 0,
69
+ 'icon' => '',
70
+ 'text' => 0,
71
+ 'custom_text' => '',
72
+ 'custom_url' => '',
73
+ );
74
+
75
+ foreach( $sel_sites as $site ){
76
+ $id = key( $site );
77
+ $opts = wp_parse_args( (array) $site->$id, $def_site_options );
78
+ $props = $this->sites[ $id ];
79
+
80
+ if( !$is_mobile && in_array( 'mobile_only', $props[ 'features' ] ) )
81
+ continue;
82
+
83
+ $temp_url = ( $opts[ 'custom_url' ] == '' ) ? $props[ 'link' ] : $opts[ 'custom_url' ];
84
+ $url = $this->get_url( $temp_url, $page_info );
85
+
86
+ $onclick = isset( $props[ 'onclick' ] ) ? 'onclick="' . $props[ 'onclick' ] . '"' : '';
87
+
88
+ $count_tag = '';
89
+ if( $opts[ 'count' ] == 1 && in_array( 'count', $props[ 'options' ] ) ){
90
+ $count = WPSR_Share_Counter::get_count( $id, $page_info[ 'url' ] );
91
+ $count_tag = '<em class="ctext">' . $count[ 'formatted' ] . '</em>';
92
+ }
93
+
94
+ $text_in = '';
95
+ $text_out = '';
96
+ $text_class = '';
97
+ $the_text = '';
98
+
99
+ if( intval( $opts[ 'text' ] ) == 1 ){
100
+ $the_text = empty( $opts[ 'custom_text' ] ) ? $props[ 'name' ] : $opts[ 'custom_text' ];
101
+ $text_class = 'sr-text-' . $text_style;
102
+ if( $text_style == 'in' ){
103
+ $text_in = '<span class="text">' . $the_text . '</span>';
104
+ }else{
105
+ $text_out = '<span class="text">' . $the_text . '</span>';
106
+ }
107
+ }
108
+
109
+ $icon = ( $opts[ 'icon' ] == '' ) ? '<i class="fa fa-' . esc_attr( $props[ 'icon' ] ) . '"></i>' : '<img src="' . esc_attr( $opts[ 'icon' ] ) . '" alt="' . esc_attr( $id ) . '" />';
110
+
111
+ $chtml = '<span class="sr-' . esc_attr( $id ) . ' ' . esc_attr( $text_class ) . '"><a rel="nofollow" href="' . esc_attr( $url ) . '" target="_blank" ' . $onclick . ' title="' . esc_attr( $props[ 'title' ] ) . '">' . $icon . $text_in . $count_tag . '</a>' . $text_out . '</span>';
112
+
113
+ array_push( $sites_clist, $chtml );
114
+ }
115
+
116
+ $more_html = '';
117
+ if( intval( $settings[ 'more_sites' ] ) > 0 ){
118
+ $more_count = intval( $settings[ 'more_sites' ] );
119
+ $more_sites = array_slice( $sites_clist, -$more_count, $more_count );
120
+ $more_html = '<span class="sr-more"><a href="#" target="_blank" title="More sites"><i class="fa fa-share-alt"></i></a><ul class="socializer">' . implode( "\n", $more_sites ) . '</ul></span>';
121
+ $sites_clist = array_slice( $sites_clist, 0, -$more_count );
122
+ array_push( $sites_clist, $more_html );
123
+ }
124
+
125
+ if( $settings[ 'open_popup' ] == '' ){
126
+ array_push( $classes, 'sr-popup' );
127
+ }
128
+
129
+ $html = '<div class="' . implode( " ", $classes ) . '">' . implode( "\n", $sites_clist ) . '</div>';
130
+
131
+ return $out = array(
132
+ 'html' => $html,
133
+ 'includes' => array( 'sb_css', 'sb_fa_css' )
134
+ );
135
+
136
+ }
137
+
138
+ function includes(){
139
+
140
+ return array(
141
+ 'sb_fa_css' => array(
142
+ 'type' => 'css',
143
+ 'link' => WPSR_Lists::ext_res( 'font-awesome' )
144
+ ),
145
+
146
+ 'sb_css' => array(
147
+ 'type' => 'css',
148
+ 'link' => WPSR_Lists::ext_res( 'socializer-css' )
149
+ ),
150
+ );
151
+
152
+ }
153
+
154
+ function settings( $values ){
155
+
156
+ $values = wp_parse_args( $values, $this->default_values );
157
+
158
+ if( is_array( $values ) ){
159
+ extract( $values );
160
+ }
161
+
162
+ $site_options = array(
163
+ 'count' => array(
164
+ 'type' => 'checkbox',
165
+ 'helper' => __( 'Show count', 'wpsr' ),
166
+ 'placeholder' => __( 'Select to show the share count of the service', 'wpsr' )
167
+ ),
168
+ 'icon' => array(
169
+ 'type' => 'text',
170
+ 'helper' => __( 'Icon URL', 'wpsr' ),
171
+ 'placeholder' => __( 'Enter a custom icon URL for this site, starting with http://. Leave blank to use default icon', 'wpsr' )
172
+ ),
173
+ 'text' => array(
174
+ 'type' => 'checkbox',
175
+ 'helper' => __( 'Show site title', 'wpsr' ),
176
+ 'placeholder' => __( 'Select to show site title next to icon', 'wpsr' )
177
+ ),
178
+ 'custom_text' => array(
179
+ 'type' => 'text',
180
+ 'helper' => __( 'Custom site title', 'wpsr' ),
181
+ 'placeholder' => __( 'The custom text to show if "show site title" is selected. Leave blank to use the default site title', 'wpsr' )
182
+ ),
183
+ 'custom_url' => array(
184
+ 'type' => 'text',
185
+ 'helper' => __( 'Custom URL', 'wpsr' ),
186
+ 'placeholder' => __( 'Enter a custom URL for this site, starting with http://. Leave blank to use default. Use {url}, {title} to use active page details in URL if needed.', 'wpsr' )
187
+ ),
188
+ );
189
+
190
+ $site_features = array(
191
+ 'all' => array(
192
+ 'title' => __( 'All buttons', 'wpsr' ),
193
+ 'desc' => __( 'All social media buttons', 'wpsr' )
194
+ ),
195
+ 'for_share' => array(
196
+ 'title' => __( 'Link sharing buttons', 'wpsr' ),
197
+ 'desc' => __( 'Buttons used for sharing page links', 'wpsr' )
198
+ ),
199
+ 'for_profile' => array(
200
+ 'title' => __( 'Social profile buttons', 'wpsr' ),
201
+ 'desc' => __( 'Buttons used for sharing social media profiles', 'wpsr' )
202
+ ),
203
+ 'mobile_only' => array(
204
+ 'title' => __( 'Mobile only buttons', 'wpsr' ),
205
+ 'desc' => __( 'Buttons which will be displayed only on mobile devices', 'wpsr' )
206
+ ),
207
+ );
208
+
209
+ $saved = array();
210
+ $sel_sites = json_decode( base64_decode( $values[ 'selected_sites' ] ) );
211
+
212
+ foreach( $sel_sites as $site ){
213
+ $id = key( $site );
214
+ $opts = (array) $site->$id;
215
+ array_push( $saved, array( $id => $opts ) );
216
+ }
217
+
218
+ ?>
219
+
220
+ <h4><?php _e( 'Select social buttons', 'wpsr' ); ?></h4>
221
+ <button class="mini_section_select"><span class="dashicons dashicons-plus"></span> <?php _e( 'Click to open the list of buttons', 'wpsr' ); ?><span class="dashicons dashicons-arrow-down fright"></span></button>
222
+
223
+ <div class="mini_section">
224
+ <p><?php _e( 'Drag and drop social buttons into the box below', 'wpsr' ); ?></p>
225
+ <div class="mini_filters"><select class="sb_features_list" data-list=".list_available" ><?php
226
+ foreach( $site_features as $k=>$v ){ echo '<option value="' . $k . '">' . $v[ 'title' ] . '</options>'; }
227
+ ?></select><input type="text" class="list_search" data-list=".list_available" placeholder="<?php _e( 'Search', 'wpsr' ); ?> ..." /></div>
228
+
229
+ <ul class="mini_btn_list list_available clearfix">
230
+ <?php
231
+ foreach( $this->sites as $site => $config ){
232
+ $datas = ' data-id="' . $site . '" data-opt_text="false" data-opt_custom_url="" data-opt_icon="" data-opt_custom_text="" ';
233
+
234
+ foreach( $config[ 'options' ] as $opt ){
235
+ $datas .= 'data-opt_' . $opt . '="false"';
236
+ }
237
+
238
+ echo '<li' . $datas . ' style="background-color: ' . $config[ 'colors' ][0] . ';" data-features="' . implode( ',', $config[ 'features' ] ) . '">';
239
+ echo '<i class="fa fa-' . $config[ 'icon' ] . ' item_icon" ></i> ';
240
+ echo '<span>' . $config[ 'name' ] . '</span>';
241
+ echo '<i class="fa fa-trash-o item_action item_delete" title="' . __( 'Delete button', 'wpsr' ) . '"></i> ';
242
+ echo '<i class="fa fa-cog item_action item_settings" title="' . __( 'Button settings', 'wpsr' ) . '"></i> ';
243
+ echo '</li>';
244
+ }
245
+ ?>
246
+ </ul>
247
+ </div>
248
+
249
+ <ul class="mini_btn_list list_selected clearfix" data-callback="wpsr_sb_process_list" data-input=".sb_selected_list"><?php
250
+
251
+ foreach( $saved as $i ){
252
+ foreach( $i as $site => $opts ){
253
+
254
+ $datas = ' data-id="' . $site . '"';
255
+ $site_prop = $this->sites[ $site ];
256
+
257
+ foreach( $opts as $k => $v ){
258
+ $datas .= ' data-opt_' . $k . '="' . $v . '"';
259
+ }
260
+
261
+ echo '<li' . $datas . ' style="background-color: ' . $site_prop[ 'colors' ][0] . ';">';
262
+ echo '<i class="fa fa-' . $site_prop[ 'icon' ] . ' item_icon"></i>';
263
+ echo '<span>' . $site_prop[ 'name' ] . '</span>';
264
+ echo '<i class="fa fa-trash-o item_action item_delete" title="' . __( 'Delete button', 'wpsr' ) . '"></i>';
265
+ echo '<i class="fa fa-cog item_action item_settings" title="' . __( 'Button settings', 'wpsr' ) . '"></i>';
266
+ echo '</li>';
267
+
268
+ }
269
+
270
+ }
271
+ ?></ul>
272
+
273
+ <input type="hidden" name="o[selected_sites]" class="sb_selected_list" value="<?php echo $values[ 'selected_sites' ]; ?>" />
274
+
275
+ <div class="item_popup">
276
+ <h4></h4>
277
+ <i class="fa fa-times item_popup_close" title="<?php _e( 'Close', 'wpsr' ); ?>"></i>
278
+ <div class="item_popup_cnt"></div>
279
+ <button class="button button-primary item_popup_save"><?php _e( 'Save button settings', 'wpsr' ); ?></button>
280
+ </div>
281
+
282
+ <script>
283
+ var sb_sites = <?php echo json_encode( $this->sites ); ?>;
284
+ var sb_site_options = <?php echo json_encode( $site_options ); ?>;
285
+ wpsr_list_selector_init( 'wpsr_sb_process_list', '.sb_selected_list' );
286
+ </script>
287
+
288
+ <p><i class="fa fa-cog"></i> <?php echo __( 'Use the settings icon to add text, share count, custom icon and URL to the button.', 'wpsr' ); ?></p>
289
+
290
+ <h4>Settings</h4>
291
+ <?php
292
+
293
+ $section1 = array(
294
+ array( __( 'Icon size', 'wpsr' ), WPSR_Admin::field( 'select', array(
295
+ 'name' => 'o[sr-sizes]',
296
+ 'value' => $values['sr-sizes'],
297
+ 'list' => array(
298
+ '32px' => '32px',
299
+ '16px' => '16px',
300
+ '48px' => '48px',
301
+ '64px' => '64px',
302
+ ),
303
+ 'custom' => 'data-scr-settings="sizes"',
304
+ 'tip' => WPSR_ADMIN_URL . '/images/tips/btn-sizes.png'
305
+ ))),
306
+
307
+ array( __( 'Icon shape', 'wpsr' ), WPSR_Admin::field( 'select', array(
308
+ 'name' => 'o[sr-shapes]',
309
+ 'value' => $values['sr-shapes'],
310
+ 'list' => array(
311
+ '' => 'Square',
312
+ 'circle' => 'Circle',
313
+ 'squircle' => 'Squircle',
314
+ 'squircle-2' => 'Squircle 2',
315
+ 'diamond' => 'Diamond',
316
+ 'ribbon' => 'Ribbon',
317
+ 'drop' => 'Drop',
318
+ ),
319
+ 'custom' => 'data-scr-settings="shapes"',
320
+ 'tip' => WPSR_ADMIN_URL . '/images/tips/btn-shapes.png'
321
+ ))),
322
+
323
+ array( __( 'Hover effects', 'wpsr' ), WPSR_Admin::field( 'select', array(
324
+ 'name' => 'o[sr-hover]',
325
+ 'value' => $values['sr-hover'],
326
+ 'list' => array(
327
+ '' => __( 'None', 'wpsr' ),
328
+ 'opacity' => 'Opacity',
329
+ 'rotate' => 'Rotate',
330
+ 'zoom' => 'Zoom',
331
+ 'shrink' => 'Shrink',
332
+ 'float' => 'Float',
333
+ 'sink' => 'Sink',
334
+ 'fade-white' => 'Fade to white',
335
+ 'fade-black' => 'Fade to black'
336
+ ),
337
+ 'custom' => 'data-scr-settings="hover"'
338
+ ))),
339
+
340
+ );
341
+
342
+ $section2 = array(
343
+
344
+ array( __( 'Button layout', 'wpsr' ), WPSR_Admin::field( 'select', array(
345
+ 'name' => 'o[sr-layout]',
346
+ 'value' => $values['sr-layout'],
347
+ 'list' => array(
348
+ '' => 'Normal',
349
+ 'fluid' => 'Fluid',
350
+ 'vertical' => __( 'Vertical', 'wpsr' )
351
+ ),
352
+ 'custom' => 'data-scr-settings="layouts"',
353
+ 'tip' => WPSR_ADMIN_URL . '/images/tips/btn-layouts.png'
354
+ ))),
355
+
356
+ array( __( 'Text styles', 'wpsr' ), WPSR_Admin::field( 'select', array(
357
+ 'name' => 'o[text-styles]',
358
+ 'value' => $values['text-styles'],
359
+ 'list' => array(
360
+ 'in' => __( 'Besides icon', 'wpsr' ),
361
+ 'out' => __( 'Besides icon 2', 'wpsr' ),
362
+ 'below' => __( 'Below icon', 'wpsr' ),
363
+ 'hover' => __( 'Text on hover', 'wpsr' )
364
+ ),
365
+ 'custom' => 'data-scr-settings="text-styles"',
366
+ 'tip' => WPSR_ADMIN_URL . '/images/tips/btn-text-types.png'
367
+ ))),
368
+
369
+ array( __( 'Font size', 'wpsr' ), WPSR_Admin::field( 'select', array(
370
+ 'name' => 'o[sr-font-size]',
371
+ 'value' => $values['sr-font-size'],
372
+ 'list' => array(
373
+ '' => 'Normal',
374
+ 'font-sm' => 'Small',
375
+ 'font-lg' => 'Large'
376
+ ),
377
+ 'custom' => 'data-scr-settings="font-size"'
378
+ ))),
379
+
380
+ array( __( 'Icon display', 'wpsr' ), WPSR_Admin::field( 'select', array(
381
+ 'name' => 'o[sr-icon-display]',
382
+ 'value' => $values['sr-icon-display'],
383
+ 'list' => array(
384
+ '' => __( 'Show icon', 'wpsr' ),
385
+ 'no-icon' => __( 'Hide icon', 'wpsr' )
386
+ )
387
+ ))),
388
+
389
+ );
390
+
391
+ $section3 = array(
392
+
393
+ array( __( 'Icon color', 'wpsr' ), WPSR_Admin::field( 'select', array(
394
+ 'name' => 'o[sr-icon-color]',
395
+ 'value' => $values['sr-icon-color'],
396
+ 'list' => array(
397
+ 'icon-white' => 'White icon',
398
+ 'icon-dark' => 'Dark icon',
399
+ 'icon-grey' => 'Grey icon',
400
+ '' => 'Color icon',
401
+ ),
402
+ 'custom' => 'data-scr-settings="icon-color"'
403
+ ))),
404
+
405
+ array( __( 'Border width', 'wpsr' ), WPSR_Admin::field( 'select', array(
406
+ 'name' => 'o[sr-border-width]',
407
+ 'value' => $values['sr-border-width'],
408
+ 'list' => array(
409
+ '' => 'No border',
410
+ 'bdr-sm' => 'Small size border',
411
+ 'bdr-md' => 'Medium size border',
412
+ 'bdr-lg' => 'Large size border'
413
+ ),
414
+ 'custom' => 'data-scr-settings="border-width"'
415
+ ))),
416
+
417
+ array( __( 'Border color', 'wpsr' ), WPSR_Admin::field( 'select', array(
418
+ 'name' => 'o[sr-border-color]',
419
+ 'value' => $values['sr-border-color'],
420
+ 'list' => array(
421
+ '' => 'Color border',
422
+ 'bdr-white' => 'White border',
423
+ 'bdr-dark' => 'Dark border',
424
+ 'bdr-grey' => 'Grey border'
425
+ ),
426
+ 'custom' => 'data-scr-settings="border-color"'
427
+ ))),
428
+
429
+ array( __( 'Background color', 'wpsr' ), WPSR_Admin::field( 'select', array(
430
+ 'name' => 'o[sr-background-color]',
431
+ 'value' => $values['sr-background-color'],
432
+ 'list' => array(
433
+ '' => 'Color background',
434
+ 'bg-none' => 'Transparent background',
435
+ 'bg-white' => 'White background',
436
+ 'bg-dark' => 'Dark background',
437
+ 'bg-grey' => 'Grey background'
438
+ ),
439
+ 'custom' => 'data-scr-settings="background-color"'
440
+ ))),
441
+
442
+ array( __( 'Shadow type', 'wpsr' ), WPSR_Admin::field( 'select', array(
443
+ 'name' => 'o[sr-shadow]',
444
+ 'value' => $values['sr-shadow'],
445
+ 'list' => array(
446
+ '' => 'No shadow',
447
+ 'sw-1' => 'Type 1',
448
+ 'sw-2' => 'Type 2',
449
+ 'sw-3' => 'Type 3',
450
+ 'sw-icon-1' => 'Icon shadow 1'
451
+ ),
452
+ 'custom' => 'data-scr-settings="shadow"'
453
+ ))),
454
+
455
+ );
456
+
457
+ $section4 = array(
458
+
459
+ array( __( 'Gutters', 'wpsr' ), WPSR_Admin::field( 'select', array(
460
+ 'name' => 'o[sr-pad]',
461
+ 'value' => $values['sr-pad'],
462
+ 'list' => array(
463
+ '' => 'No',
464
+ 'pad' => 'yes'
465
+ ),
466
+ 'helper' => __( 'Select to add space between buttons', 'wpsr' ),
467
+ 'custom' => 'data-scr-settings="pad"'
468
+ ))),
469
+
470
+ array( __( 'No of buttons in the last to group', 'wpsr' ), WPSR_Admin::field( 'select', array(
471
+ 'name' => 'o[more_sites]',
472
+ 'value' => $values['more_sites'],
473
+ 'list' => array(
474
+ '0' => 'No grouping',
475
+ '1' => '1',
476
+ '2' => '2',
477
+ '3' => '3',
478
+ '4' => '4',
479
+ '5' => '5',
480
+ '6' => '6',
481
+ '7' => '7',
482
+ '8' => '8',
483
+ '9' => '9',
484
+ '10' => '10',
485
+ ),
486
+ 'helper' => __( 'The last buttons grouped will be displayed in a "More" buttons menu', 'wpsr' )
487
+ ))),
488
+
489
+ array( __( 'Open links in popup', 'wpsr' ), WPSR_Admin::field( 'select', array(
490
+ 'name' => 'o[open_popup]',
491
+ 'value' => $values['open_popup'],
492
+ 'list' => array(
493
+ '' => 'yes',
494
+ 'no' => 'No',
495
+ ),
496
+ ))),
497
+
498
+ );
499
+
500
+ echo '<h5 class="scr_saction scr_templates_btn"><span class="dashicons dashicons-portfolio"></span> ' . __( 'Select a design template', 'wpsr' ) . '</h5>';
501
+ echo '<div class="scr_swrap scr_templates_wrap">';
502
+ echo '<ul class="scr_templates">';
503
+ echo '</ul>';
504
+ echo '</div>';
505
+
506
+ echo '<h5 class="scr_saction"><span class="dashicons dashicons-admin-tools"></span> ' . __( 'Customize the design manually', 'wpsr' ) . '</h5>';
507
+ echo '<div class="scr_swrap scr_msettings">';
508
+ echo '<h4 class="collapse_head">' . __( 'Size, shape and hover effects', 'wpsr' ) . '</h4>';
509
+ WPSR_Admin::build_table( $section1, '', '', true);
510
+
511
+ echo '<h4 class="collapse_head">' . __( 'Layouts, text and icon', 'wpsr' ) . '</h4>';
512
+ WPSR_Admin::build_table( $section2, '', '', true);
513
+
514
+ echo '<h4 class="collapse_head">' . __( 'Styles and colors', 'wpsr' ) . '</h4>';
515
+ WPSR_Admin::build_table( $section3, '', '', true);
516
+
517
+ echo '<h4 class="collapse_head">' . __( 'Other settings', 'wpsr' ) . '</h4>';
518
+ WPSR_Admin::build_table( $section4, '', '', true);
519
+ echo '</div>';
520
+ }
521
+
522
+ function get_url( $url, $pinfo ){
523
+
524
+ $g_settings = get_option( 'wpsr_general_settings' );
525
+ $g_settings = wp_parse_args( $g_settings, WPSR_Lists::defaults( 'gsettings_twitter' ) );
526
+ $t_username = ( $g_settings[ 'twitter_username' ] != '' ) ? '@' . $g_settings[ 'twitter_username' ] : '';
527
+
528
+ $search = array(
529
+ '{url}',
530
+ '{title}',
531
+ '{excerpt}',
532
+ '{s-url}',
533
+ '{rss-url}',
534
+ '{twitter-username}',
535
+ );
536
+
537
+ $replace = array(
538
+ $pinfo[ 'url' ],
539
+ $pinfo[ 'title' ],
540
+ $pinfo[ 'excerpt' ],
541
+ $pinfo[ 'short_url' ],
542
+ $pinfo[ 'rss_url' ],
543
+ $t_username
544
+ );
545
+
546
+ return str_replace( $search, $replace, $url );
547
+ }
548
+
549
+ function validation( $values ){
550
+
551
+ return $values;
552
+
553
+ }
554
+
555
+ function general_settings( $values ){
556
+
557
+ $values = wp_parse_args( $values, WPSR_Lists::defaults( 'gsettings_socialbuttons' ) );
558
+
559
+ $section1 = array(
560
+ array( __( 'ID or class name of the comment section', 'wpsr' ), WPSR_Admin::field( 'text', array(
561
+ 'name' => 'sb_comment_sec',
562
+ 'value' => $values['sb_comment_sec'],
563
+ 'placeholder' => 'Ex: #comments',
564
+ 'helper' => __( 'Enter the class name or ID of the comment section in the page.', 'wpsr' ),
565
+ 'qtip' => 'https://www.youtube.com/watch?v=GQ1YO0xZ7WA'
566
+ )))
567
+ );
568
+
569
+ WPSR_Admin::build_table( $section1, 'Social buttons settings' );
570
+
571
+ }
572
+
573
+ function general_settings_validation( $values ){
574
+ return $values;
575
+ }
576
+
577
+ }
578
+
579
+ new wpsr_service_social_buttons();
580
+
581
+ ?>
services/stumbleupon.php ADDED
@@ -0,0 +1,105 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * StumbleUpon service for WP Socializer
4
+ *
5
+ */
6
+
7
+ class wpsr_service_stumbleupon{
8
+
9
+ function __construct(){
10
+
11
+ WPSR_Services::register( 'stumbleupon', array(
12
+ 'name' => 'StumbleUpon',
13
+ 'icons' => WPSR_ADMIN_URL . '/images/icons/stumbleupon.png',
14
+ 'desc' => __( 'Create StumbleUpon buttons', 'wpsr' ),
15
+ 'settings' => array( 'size' => '500x200' ),
16
+ 'callbacks' => array(
17
+ 'output' => array( $this, 'output' ),
18
+ 'includes' => array( $this, 'includes' ),
19
+ 'settings' => array( $this, 'settings' ),
20
+ 'validation' => array( $this, 'validation' ),
21
+ 'general_settings' => array( $this, 'general_settings' ),
22
+ 'general_settings_validation' => array( $this, 'general_settings_validation' ),
23
+ )
24
+ ));
25
+
26
+ $this->default_values = array(
27
+ 'type' => '1'
28
+ );
29
+
30
+ }
31
+
32
+ function output( $settings = array(), $page_info = array() ){
33
+
34
+ $out = array();
35
+ $settings = wp_parse_args( $settings, $this->default_values );
36
+
37
+ $out['html'] = '<su:badge layout="' . esc_attr( $settings[ 'type' ] ) . '" location="' . esc_attr( $page_info[ 'url' ] ) . '"></su:badge>';
38
+ $out['includes'] = array( 'stumbleupon_main_js' );
39
+ return $out;
40
+
41
+ }
42
+
43
+ function includes(){
44
+
45
+ $includes = array(
46
+ 'stumbleupon_main_js' => array(
47
+ 'type' => 'js',
48
+ 'code' => "<script type='text/javascript'>
49
+ (function() {
50
+ var li = document.createElement('script'); li.type = 'text/javascript'; li.async = true;
51
+ li.src = ('https:' == document.location.protocol ? 'https:' : 'http:') + '//platform.stumbleupon.com/1/widgets.js';
52
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(li, s);
53
+ })();
54
+ </script>"
55
+ )
56
+ );
57
+
58
+ return $includes;
59
+
60
+ }
61
+
62
+ function settings( $values ){
63
+
64
+ $values = wp_parse_args( $values, $this->default_values );
65
+
66
+ $section1 = array(
67
+ array( __( 'Button type', 'wpsr' ), WPSR_Admin::field( 'select', array(
68
+ 'name' => 'o[type]',
69
+ 'value' => $values['type'],
70
+ 'list' => array(
71
+ '1' => 'Small, count on right, square box',
72
+ '2' => 'Small, count on right, round box',
73
+ '3' => 'Small, count on right, no box',
74
+ '4' => 'Small, no count',
75
+ '5' => 'Big, count on top, square box',
76
+ '6' => 'Big, no count',
77
+ ),
78
+ 'tip' => WPSR_ADMIN_URL . '/images/tips/stumbleupon-types.png'
79
+ ))),
80
+ );
81
+
82
+ WPSR_Admin::build_table( $section1, '', '', true);
83
+
84
+ }
85
+
86
+ function validation( $values ){
87
+
88
+ return $values;
89
+
90
+ }
91
+
92
+
93
+ function general_settings( $values ){
94
+
95
+ }
96
+
97
+ function general_settings_validation( $values ){
98
+ return $values;
99
+ }
100
+
101
+ }
102
+
103
+ new wpsr_service_stumbleupon();
104
+
105
+ ?>
services/twitter.php ADDED
@@ -0,0 +1,244 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Twitter service for WP Socializer
4
+ *
5
+ */
6
+
7
+ class wpsr_service_twitter{
8
+
9
+ function __construct(){
10
+
11
+ WPSR_Services::register( 'twitter', array(
12
+ 'name' => 'Twitter',
13
+ 'icons' => WPSR_ADMIN_URL . '/images/icons/twitter.png',
14
+ 'desc' => __( 'Create Twitter buttons like share, follow, hashtag and mention', 'wpsr' ),
15
+ 'settings' => array( 'size' => '500x350' ),
16
+ 'callbacks' => array(
17
+ 'output' => array( $this, 'output' ),
18
+ 'includes' => array( $this, 'includes' ),
19
+ 'settings' => array( $this, 'settings' ),
20
+ 'validation' => array( $this, 'validation' ),
21
+ 'general_settings' => array( $this, 'general_settings' ),
22
+ 'general_settings_validation' => array( $this, 'general_settings_validation' ),
23
+ )
24
+ ));
25
+
26
+ $gs = get_option( 'wpsr_general_settings' );
27
+ $gs = wp_parse_args( $gs, WPSR_Lists::defaults( 'gsettings_twitter' ) );
28
+
29
+ $this->default_values = array(
30
+ 'type' => 'share',
31
+ 'count' => 'false',
32
+ 'username' => $gs[ 'twitter_username' ],
33
+ 'recommend' => '',
34
+ 'hashtag' => '',
35
+ 'size' => 'small'
36
+ );
37
+
38
+ }
39
+
40
+ function output( $settings = array(), $page_info = array() ){
41
+
42
+ $out = array();
43
+ $settings = wp_parse_args( $settings, $this->default_values );
44
+ $href = '';
45
+ $count = '';
46
+ $text = '';
47
+
48
+ if( $settings[ 'type' ] == 'share' ){
49
+ $href = 'https://twitter.com/share';
50
+ $text = 'Tweet';
51
+ }
52
+
53
+ if( $settings[ 'type' ] == 'follow' ){
54
+ $href = 'https://twitter.com/' . $settings[ 'username' ];
55
+ $text = ( $settings[ 'username' ] != '' ) ? 'Follow @' . $settings[ 'username' ] : 'Follow';
56
+ }
57
+
58
+ if( $settings[ 'type' ] == 'hashtag' ){
59
+ $href = 'https://twitter.com/intent/tweet?button_hashtag=' . $settings[ 'hashtag' ];
60
+ $text = ( $settings[ 'hashtag' ] != '' ) ? 'Tweet #' . $settings[ 'hashtag' ] : 'Tweet';
61
+ }
62
+
63
+ if( $settings[ 'type' ] == 'mention' ){
64
+ $href = 'https://twitter.com/intent/tweet?screen_name=' . $settings[ 'username' ];
65
+ $text = ( $settings[ 'username' ] != '' ) ? 'Tweet to @' . $settings[ 'username' ] : 'Tweet';
66
+ }
67
+
68
+ $out['html'] = '<a href="' . esc_attr( $href ) . '" class="twitter-' . $settings[ 'type' ] . '-button" data-show-count="' . esc_attr( $settings[ 'count' ] ) . '" data-related="' . esc_attr( $settings[ 'recommend' ] ) . '" data-url="' . esc_attr( $page_info[ 'url' ] ) . '" data-size="' . esc_attr( $settings[ 'size' ] ) . '" data-via="' . esc_attr( $settings[ 'username' ] ) . '" data-hashtags="' . esc_attr( $settings[ 'hashtag' ] ) . '">' . $text . '</a>';
69
+
70
+ $out['includes'] = array( 'twitter_main_js' );
71
+ return $out;
72
+
73
+ }
74
+
75
+ function includes(){
76
+
77
+ $includes = array(
78
+ 'twitter_main_js' => array(
79
+ 'type' => 'js',
80
+ 'code' => "<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>"
81
+ )
82
+ );
83
+
84
+ return $includes;
85
+
86
+ }
87
+
88
+ function settings( $values ){
89
+
90
+ $values = wp_parse_args( $values, $this->default_values );
91
+
92
+ $section1 = array(
93
+ array( __( 'Button type', 'wpsr' ), WPSR_Admin::field( 'select', array(
94
+ 'name' => 'o[type]',
95
+ 'value' => $values['type'],
96
+ 'list' => array(
97
+ 'share' => 'Share button',
98
+ 'follow' => 'Follow button',
99
+ 'hashtag' => 'Hashtag button',
100
+ 'mention' => 'Mention button'
101
+ )
102
+ ))),
103
+
104
+ /*
105
+ array( 'Show count', WPSR_Admin::field( 'select', array(
106
+ 'name' => 'o[count]',
107
+ 'value' => $values['count'],
108
+ 'list' => array(
109
+ 'true' => 'Yes',
110
+ 'false' => 'No'
111
+ )
112
+ ))),
113
+ */
114
+
115
+ array( __( 'Twitter username', 'wpsr' ), WPSR_Admin::field( 'text', array(
116
+ 'name' => 'o[username]',
117
+ 'value' => $values['username'],
118
+ 'helper' => __( 'Your twitter username without @ sign', 'wpsr' )
119
+ ))),
120
+
121
+ array( 'Recommend', WPSR_Admin::field( 'text', array(
122
+ 'name' => 'o[recommend]',
123
+ 'value' => $values['recommend'],
124
+ 'helper' => __( 'Enter other twitter accounts to recommend without @ sign separated by comma.', 'wpsr' )
125
+ ))),
126
+
127
+ array( 'Hashtag in tweet', WPSR_Admin::field( 'text', array(
128
+ 'name' => 'o[hashtag]',
129
+ 'value' => $values['hashtag'],
130
+ 'helper' => __( 'Enter hashtag to place in tweet without # sign.', 'wpsr' )
131
+ ))),
132
+
133
+ array( __( 'Button size', 'wpsr' ), WPSR_Admin::field( 'select', array(
134
+ 'name' => 'o[size]',
135
+ 'value' => $values['size'],
136
+ 'list' => array( 'small' => 'Normal', 'large' => 'Large')
137
+ ))),
138
+
139
+ );
140
+
141
+ WPSR_Admin::build_table( $section1, '', '', true);
142
+
143
+ echo '<script>if( jQuery.fn.conditioner ) jQuery("[data-conditioner]").conditioner();</script>';
144
+
145
+ }
146
+
147
+ function validation( $values ){
148
+
149
+ $values['color'] .= 'formatted';
150
+ return $values;
151
+
152
+ }
153
+
154
+ function general_settings( $values ){
155
+
156
+ $values = wp_parse_args( $values, WPSR_Lists::defaults( 'gsettings_twitter' ) );
157
+
158
+ $section1 = array(
159
+ array( __( 'Twitter username', 'wpsr' ), WPSR_Admin::field( 'text', array(
160
+ 'name' => 'twitter_username',
161
+ 'value' => $values['twitter_username'],
162
+ 'helper' => __( 'Your twitter username without @ sign', 'wpsr' ),
163
+ ))),
164
+ );
165
+
166
+ WPSR_Admin::build_table( $section1, 'Twitter settings');
167
+
168
+ }
169
+
170
+ function general_settings_validation( $values ){
171
+ return $values;
172
+ }
173
+
174
+ }
175
+
176
+ new wpsr_service_twitter();
177
+
178
+ /**
179
+ * Twitter widget
180
+ */
181
+
182
+ class wpsr_widget_twitter{
183
+
184
+ function __construct(){
185
+
186
+ WPSR_Widgets::register( 'twitter', array(
187
+ 'name' => 'Twitter timeline widget',
188
+ 'callbacks' => array(
189
+ 'widget' => array( $this, 'widget' ),
190
+ 'form' => array( $this, 'form' ),
191
+ 'update' => array( $this, 'update' )
192
+ )
193
+ ));
194
+
195
+ $this->defaults = array(
196
+ 'twitter_widget_url' => '',
197
+ 'twitter_widget_height' => '600',
198
+ 'twitter_widget_theme' => 'light',
199
+ 'twitter_widget_link_color' => '#2B7BB9',
200
+ );
201
+
202
+ }
203
+
204
+ function widget( $args, $instance ){
205
+
206
+ $instance = wp_parse_args( $instance, $this->defaults );
207
+
208
+ echo '<a class="twitter-timeline" data-height="' . $instance[ 'twitter_widget_height' ] . '" data-theme="' . $instance[ 'twitter_widget_theme' ] . '" data-link-color="' . $instance[ 'twitter_widget_link_color' ] . '" href="' . $instance[ 'twitter_widget_url' ] . '">Twitter</a>';
209
+
210
+ WPSR_Includes::add_active_includes( array( 'twitter_main_js' ) );
211
+
212
+ }
213
+
214
+ function form( $obj, $instance ){
215
+
216
+ $instance = wp_parse_args( $instance, $this->defaults );
217
+ $fields = new WPSR_Widget_Form_Fields( $obj, $instance );
218
+
219
+ echo '<h4>' . __( 'Twitter Widget settings', 'wpsr' ) . '</h4>';
220
+ $fields->text( 'twitter_widget_url', 'Enter a twitter URL to embed', array( 'placeholder' => 'Ex: https://twitter.com/vaakash' ) );
221
+
222
+ echo '<h5>Examples:</h5>';
223
+ echo '<ul>';
224
+ echo '<li><code>Likes</code> - https://twitter.com/TwitterDev/likes</li>';
225
+ echo '<li><code>List</code> - https://twitter.com/TwitterDev/lists/national-parks</li>';
226
+ echo '<li><code>Profile</code> - https://twitter.com/TwitterDev</li>';
227
+ echo '<li><code>Collection</code> - https://twitter.com/TwitterDev/timelines/539487832448843776</li>';
228
+ echo '</ul>';
229
+
230
+ $fields->number( 'twitter_widget_height', 'Widget height ( in pixels )' );
231
+ $fields->select( 'twitter_widget_theme', 'Widget theme', array( 'light' => 'Light', 'dark' => 'Dark' ), array( 'class' => 'smallfat' ) );
232
+ $fields->text( 'twitter_widget_link_color', 'Link color', array( 'class' => 'smallfat wpsr-color-picker' ) );
233
+
234
+ }
235
+
236
+ function update( $instance ){
237
+ return $instance;
238
+ }
239
+
240
+ }
241
+
242
+ new wpsr_widget_twitter();
243
+
244
+ ?>
wp-socializer.php DELETED
@@ -1,1562 +0,0 @@
1
- <?php
2
- /*
3
- Plugin Name: WP Socializer
4
- Version: 2.4.9.9
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
8
- Author URI: http://www.aakashweb.com/
9
- */
10
-
11
- if(!defined('WP_CONTENT_URL')) {
12
- $wpsr_url = get_option('siteurl') . '/wp-content/plugins/' . plugin_basename(dirname(__FILE__)).'/';
13
- }else{
14
- $wpsr_url = WP_CONTENT_URL . '/plugins/' . plugin_basename(dirname(__FILE__)) . '/';
15
- }
16
-
17
- define('WPSR_VERSION', '2.4.9.9');
18
- define('WPSR_AUTHOR', 'Aakash Chakravarthy');
19
- define('WPSR_URL', $wpsr_url);
20
- define('WPSR_PUBLIC_URL', WPSR_URL . 'public/');
21
- define('WPSR_ADMIN_URL', WPSR_URL . 'admin/');
22
- define('WPSR_SOCIALBT_IMGPATH', WPSR_PUBLIC_URL . 'social-icons/');
23
-
24
- $wpsr_socialsites_list = array(
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,
32
- ),
33
-
34
- // B
35
-
36
- 'barrapunto' => array(
37
- 'name' => 'BarraPunto',
38
- 'titleText' => __('Share this on ', 'wpsr') . 'BarraPunto',
39
- 'icon' => 'barrapunto.png',
40
- 'url' => 'http://barrapunto.com/submit.pl?subj={title}&amp;story={url}',
41
- ),
42
-
43
- 'bitacoras' => array(
44
- 'name' => 'Bitacoras.com',
45
- 'titleText' => __('Share this on ', 'wpsr') . 'Bitacoras',
46
- 'icon' => 'bitacoras.png',
47
- 'url' => 'http://bitacoras.com/anotaciones/{url}',
48
- ),
49
-
50
- 'blinklist' => array(
51
- 'name' => 'BlinkList',
52
- 'titleText' => __('Share this on ', 'wpsr') . 'BlinkList',
53
- 'icon' => 'blinklist.png',
54
- 'url' => 'http://www.blinklist.com/index.php?Action=Blink/addblink.php&amp;Url={url}&amp;Title={title}',
55
- 'support32px' => 1,
56
- ),
57
-
58
- 'blip' => array(
59
- 'name' => 'Blip',
60
- 'titleText' => __('Share this on ', 'wpsr') . 'Blip',
61
- 'icon' => 'blip.png',
62
- 'url' => 'http://blip.pl/dashboard?body={title}+{url}',
63
- 'support32px' => 1,
64
- ), // Added version 2.0 - 16-1-2011
65
-
66
- 'blogger' => array(
67
- 'name' => 'Blogger',
68
- 'titleText' => __('Post this on ', 'wpsr') . 'Blogger',
69
- 'icon' => 'blogger.png',
70
- 'url' => 'http://www.blogger.com/blog_this.pyra?t&u={url}&n={title}&pli=1',
71
- 'support32px' => 1,
72
- ),
73
-
74
- 'blogmarks' => array(
75
- 'name' => 'Blogmarks',
76
- 'titleText' => __('Share this on ', 'wpsr') . 'BlogMarks',
77
- 'icon' => 'blogmarks.png',
78
- 'url' => 'http://blogmarks.net/my/new.php?mini=1&amp;simple=1&amp;url={url}&amp;title={title}',
79
- ),
80
-
81
- 'blogospherenews' => array(
82
- 'name' => 'Blogosphere News',
83
- 'titleText' => __('Submit this to ', 'wpsr') . 'Blogosphere News',
84
- 'icon' => 'blogospherenews.png',
85
- 'url' => 'http://www.blogospherenews.com/submit.php?url={url}&amp;title={title}',
86
- ),
87
-
88
- 'blogtercimlap' => array(
89
- 'name' => 'Blogter Cimlap',
90
- 'titleText' => __('Share this on ', 'wpsr') . 'blogtercimlap',
91
- 'icon' => 'blogter.png',
92
- 'url' => 'http://cimlap.blogter.hu/index.php?action=suggest_link&amp;title={title}&amp;url={url}',
93
- ),
94
-
95
- 'faves' => array(
96
- 'name' => 'Faves',
97
- 'titleText' => __('Share this on ', 'wpsr') . 'Faves',
98
- 'icon' => 'bluedot.png',
99
- 'url' => 'http://faves.com/Authoring.aspx?u={url}&amp;title={title}',
100
- ),
101
-
102
- 'boxnet' => array(
103
- 'name' => 'Box.net',
104
- 'titleText' => __('Add this on ', 'wpsr') . 'Box.net',
105
- 'icon' => 'box.png',
106
- 'url' => 'https://www.box.net/api/1.0/import?url={url}&name={title}&description={excerpt}&import_as=link',
107
- ),
108
-
109
- // C
110
-
111
- 'connotea' => array(
112
- 'name' => 'Connotea',
113
- 'titleText' => __('Share this on ', 'wpsr') . 'Connotea',
114
- 'icon' => 'connotea.png',
115
- 'url' => 'http://www.connotea.org/addpopup?continue=confirm&amp;uri={url}&amp;title={title}&amp;description={excerpt}',
116
- ),
117
-
118
- 'current' => array(
119
- 'name' => 'Current',
120
- 'titleText' => __('Share this on ', 'wpsr') . 'Current',
121
- 'icon' => 'current.png',
122
- 'url' => 'http://current.com/clipper.htm?url={url}&amp;title={title}',
123
- ),
124
-
125
- // D
126
-
127
- 'delicious' => array(
128
- 'name' => 'Delicious',
129
- 'titleText' => __('Post this on ', 'wpsr') . 'Delicious',
130
- 'icon' => 'delicious.png',
131
- 'url' => 'http://delicious.com/post?url={url}&amp;title={title}&amp;notes={excerpt}',
132
- 'support32px' => 1,
133
- ),
134
-
135
- 'designbump' => array(
136
- 'name' => 'Designbump',
137
- 'titleText' => __('Share this on ', 'wpsr') . 'Designbump',
138
- 'icon' => 'designbump.png',
139
- 'url' => 'http://designbump.com/user/login?destination=submit?url={url}&title={title}&body={excerpt}',
140
- 'support32px' => 1,
141
- ),
142
-
143
- 'designfloat' => array(
144
- 'name' => 'Design Float',
145
- 'titleText' => __('Submit this to ', 'wpsr') . 'Design Float',
146
- 'icon' => 'designfloat.png',
147
- 'url' => 'http://www.designfloat.com/submit.php?url={url}&amp;title={title}',
148
- 'support32px' => 1,
149
- ),
150
-
151
- 'digg' => array(
152
- 'name' => 'Digg',
153
- 'titleText' => __('Submit this to ', 'wpsr') . 'Digg',
154
- 'icon' => 'digg.png',
155
- 'url' => 'http://digg.com/submit?phase=2&amp;url={url}&amp;title={title}&amp;bodytext={excerpt}',
156
- 'support32px' => 1,
157
- ),
158
-
159
- 'diggita' => array(
160
- 'name' => 'Diggita',
161
- 'titleText' => __('Submit this to ', 'wpsr') . 'Diggita',
162
- 'icon' => 'diggita.png',
163
- 'url' => 'http://www.diggita.it/submit.php?url={url}&title={title}',
164
- ),
165
-
166
- 'diigo' => array(
167
- 'name' => 'Diigo',
168
- 'titleText' => __('Post this on ', 'wpsr') . 'Diigo',
169
- 'icon' => 'diigo.png',
170
- 'url' => 'http://www.diigo.com/post?url={url}&amp;title={title}',
171
- ),
172
-
173
- 'dotnetkicks' => array(
174
- 'name' => 'DotNetKicks',
175
- 'titleText' => __('Share this on ', 'wpsr') . 'DotNetKicks',
176
- 'icon' => 'dotnetkicks.png',
177
- 'url' => 'http://www.dotnetkicks.com/kick/?url={url}&amp;title={title}',
178
- ),
179
-
180
- 'dzone' => array(
181
- 'name' => 'DZone',
182
- 'titleText' => __('Add this to ', 'wpsr') . 'DZone',
183
- 'icon' => 'dzone.png',
184
- 'url' => 'http://www.dzone.com/links/add.html?url={url}&amp;title={title}',
185
- 'support32px' => 1,
186
- ),
187
-
188
- // E
189
-
190
- 'ekudos' => array(
191
- 'name' => 'eKudos',
192
- 'titleText' => __('Share this on ', 'wpsr') . 'eKudos',
193
- 'icon' => 'ekudos.png',
194
- 'url' => 'http://www.ekudos.nl/artikel/nieuw?url={url}&amp;title={title}&amp;desc={excerpt}',
195
- ),
196
-
197
- 'email' => array(
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 & v2.4.9.6
202
- 'support32px' => 1,
203
- ),
204
-
205
- // F
206
-
207
- 'facebook' => array(
208
- 'name' => 'Facebook',
209
- 'titleText' => __('Share this on ', 'wpsr') . 'Facebook',
210
- 'icon' => 'facebook.png',
211
- 'url' => 'http://www.facebook.com/share.php?u={url}&amp;t={title}',
212
- 'support32px' => 1,
213
- ),
214
-
215
- 'fark' => array(
216
- 'name' => 'Fark',
217
- 'titleText' => __('Share this on ', 'wpsr') . 'Fark',
218
- 'icon' => 'fark.png',
219
- 'url' => 'http://cgi.fark.com/cgi/fark/farkit.pl?h={title}&amp;u={url}',
220
- ),
221
-
222
- 'fleck' => array(
223
- 'name' => 'Fleck',
224
- 'titleText' => __('Share this on ', 'wpsr') . 'Fleck',
225
- 'icon' => 'fleck.png',
226
- 'url' => 'http://beta3.fleck.com/bookmarklet.php?url={url}&amp;title={title}',
227
- ),
228
-
229
- 'friendfeed' => array(
230
- 'name' => 'FriendFeed',
231
- 'titleText' => __('Share this on ', 'wpsr') . 'FriendFeed',
232
- 'icon' => 'friendfeed.png',
233
- 'url' => 'http://www.friendfeed.com/share?title={title}&amp;link={url}',
234
- 'support32px' => 1,
235
- ),
236
-
237
- 'friendster' => array(
238
- 'name' => 'Friendster',
239
- 'titleText' => __('Share this on ', 'wpsr') . 'Friendster',
240
- 'icon' => 'friendster.png',
241
- 'url' => 'http://www.friendster.com/sharer.php?u={url}&t={title}',
242
- 'support32px' => 1,
243
- ),
244
-
245
- 'fsdaily' => array(
246
- 'name' => 'FSDaily',
247
- 'titleText' => __('Share this on ', 'wpsr') . 'FSDaily',
248
- 'icon' => 'fsdaily.png',
249
- 'url' => 'http://www.fsdaily.com/submit?url={url}&amp;title={title}',
250
- ),
251
-
252
- // G
253
-
254
- 'gadugadu' => array(
255
- 'name' => 'Gadu-Gadu',
256
- 'titleText' => __('Share this on ', 'wpsr') . 'Gadu-Gadu',
257
- 'icon' => 'gadugadu.png',
258
- 'url' => 'http://www.gadu-gadu.pl/polec?title={title}&url={url}',
259
- 'support32px' => 1,
260
- ), // Added version 2.0 - 16-1-2011
261
-
262
- 'globalgrind' => array(
263
- 'name' => 'Global Grind',
264
- 'titleText' => __('Submit this to ', 'wpsr') . 'Global Grind',
265
- 'icon' => 'globalgrind.png',
266
- 'url' => 'http://globalgrind.com/submission/submit.aspx?url={url}&amp;type=Article&amp;title={title}',
267
- ),
268
-
269
- 'google' => array(
270
- 'name' => 'Google',
271
- 'titleText' => __('Bookmark this on ', 'wpsr') . 'Google',
272
- 'icon' => 'google.png',
273
- 'url' => 'http://www.google.com/bookmarks/mark?op=edit&amp;bkmk={url}&amp;title={title}&amp;annotation={excerpt}',
274
- 'support32px' => 1,
275
- ),
276
-
277
- 'googleplus' => array(
278
- 'name' => 'Google Plus',
279
- 'titleText' => __('Share this on ', 'wpsr') . 'Google Plus',
280
- 'icon' => 'googleplus.png',
281
- 'url' => 'https://plus.google.com/share?url={url}',
282
- 'support32px' => 1,
283
- ), // Added version 2.4 - 13-2-2012
284
-
285
- /*
286
- 'googlebuzz' => array(
287
- 'name' => 'Google Buzz',
288
- 'titleText' => __('Post this on ', 'wpsr') . 'Google Buzz',
289
- 'icon' => 'googlebuzz.png',
290
- 'url' => 'http://www.google.com/buzz/post?url={url}',
291
- 'support32px' => 1,
292
- ),*/
293
-
294
- 'googlereader' => array(
295
- 'name' => 'Google Reader',
296
- 'titleText' => __('Share this on ', 'wpsr') . 'Google Reader',
297
- 'icon' => 'googlereader.png',
298
- 'url' => 'http://www.google.com/reader/link?url={url}&title={title}',
299
- 'support32px' => 1,
300
- ),
301
-
302
- 'grono' => array(
303
- 'name' => 'Grono',
304
- 'titleText' => __('Share this on ', 'wpsr') . 'Grono',
305
- 'icon' => 'grono.png',
306
- 'url' => 'http://grono.net/pub/popup/link/urlfetch/?url={url}&title={title}',
307
- 'support32px' => 1,
308
- ), // Added version 2.0 - 16-1-2011
309
-
310
- 'gwar' => array(
311
- 'name' => 'Gwar',
312
- 'titleText' => __('Share this on ', 'wpsr') . 'Gwar',
313
- 'icon' => 'gwar.png',
314
- 'url' => 'http://www.gwar.pl/DodajGwar.html?u={url}',
315
- ),
316
-
317
- // H
318
-
319
- 'hackernews' => array(
320
- 'name' => 'HackerNews',
321
- 'titleText' => __('Share this on ', 'wpsr') . 'HackerNews',
322
- 'icon' => 'hackernews.png',
323
- 'url' => 'http://news.ycombinator.com/submitlink?u={url}&amp;t={title}',
324
- ),
325
-
326
- 'haohao' => array(
327
- 'name' => 'Haohao',
328
- 'titleText' => __('Submit this to ', 'wpsr') . 'Haohao',
329
- 'icon' => 'haohao.png',
330
- 'url' => 'http://www.haohaoreport.com/submit.php?url={url}&amp;title={title}',
331
- ),
332
-
333
- 'healthranker' => array(
334
- 'name' => 'HealthRanker',
335
- 'titleText' => __('Submit this to ', 'wpsr') . 'HealthRanker',
336
- 'icon' => 'healthranker.png',
337
- 'url' => 'http://healthranker.com/submit.php?url={url}&amp;title={title}',
338
- ),
339
-
340
- 'hellotxt' => array(
341
- 'name' => 'HelloTxt',
342
- 'titleText' => __('Share this on ', 'wpsr') . 'HelloTxt',
343
- 'icon' => 'hellotxt.png',
344
- 'url' => 'http://hellotxt.com/?status={title}+{url}',
345
- ),
346
-
347
- 'hemidemi' => array(
348
- 'name' => 'Hemidemi',
349
- 'titleText' => __('Bookmark this on ', 'wpsr') . 'Hemidemi',
350
- 'icon' => 'hemidemi.png',
351
- 'url' => 'http://www.hemidemi.com/user_bookmark/new?title={title}&amp;url={url}',
352
- ),
353
-
354
- 'hyves' => array(
355
- 'name' => 'Hyves',
356
- 'titleText' => __('Share this on ', 'wpsr') . 'Hyves',
357
- 'icon' => 'hyves.png',
358
- 'url' => 'http://www.hyves.nl/profilemanage/add/tips/?name={title}&amp;text={excerpt}+{url}&amp;rating=5',
359
- 'support32px' => 1,
360
- ),
361
-
362
- // I
363
-
364
- 'identica' => array(
365
- 'name' => 'Identi.ca',
366
- 'titleText' => __('Share this on ', 'wpsr') . 'Identi.ca',
367
- 'icon' => 'identica.png',
368
- 'url' => 'http://identi.ca/notice/new?status_textarea={url}',
369
- ),
370
-
371
- 'internetmedia' => array(
372
- 'name' => 'Internetmedia',
373
- 'titleText' => __('Share this on ', 'wpsr') . 'Internetmedia',
374
- 'icon' => 'im.png',
375
- 'url' => 'http://internetmedia.hu/submit.php?url={url}',
376
- ),
377
-
378
- 'indianpad' => array(
379
- 'name' => 'IndianPad',
380
- 'titleText' => __('Submit this to ', 'wpsr') . 'IndianPad',
381
- 'icon' => 'indianpad.png',
382
- 'url' => 'http://www.indianpad.com/submit.php?url={url}',
383
- ),
384
-
385
- 'instapaper' => array(
386
- 'name' => 'Instapaper',
387
- 'titleText' => __('Add this to ', 'wpsr') . 'Instapaper',
388
- 'icon' => 'instapaper.png',
389
- 'url' => 'http://www.instapaper.com/hello2?url={url}&title={title}',
390
- 'support32px' => 1,
391
- ),
392
-
393
- // K
394
-
395
- 'kciuk' => array(
396
- 'name' => 'Kciuk',
397
- 'titleText' => __('Share this on ', 'wpsr') . 'Kciuk',
398
- 'icon' => 'kciuk.png',
399
- 'url' => 'http://www.kciuk.pl/Dodaj-link/?{url}?{title}/?auto',
400
- 'support32px' => 1,
401
- ), // Added version 2.0 - 16-1-2011
402
-
403
- 'kirtsy' => array(
404
- 'name' => 'Kirtsy',
405
- 'titleText' => __('Submit this to ', 'wpsr') . 'Kirtsy',
406
- 'icon' => 'kirtsy.png',
407
- 'url' => 'http://www.kirtsy.com/submit.php?url={url}&amp;title={title}',
408
- ),
409
-
410
- // L
411
-
412
- 'laaikit' => array(
413
- 'name' => 'laaik.it',
414
- 'titleText' => __('Share this on ', 'wpsr') . 'laaik.it',
415
- 'icon' => 'laaikit.png',
416
- 'url' => 'http://laaik.it/NewStoryCompact.aspx?uri={url}&amp;headline={title}&amp;cat=5e082fcc-8a3b-47e2-acec-fdf64ff19d12',
417
- ),
418
-
419
- 'latafanera' => array(
420
- 'name' => 'LaTafanera',
421
- 'titleText' => __('Submit this to ', 'wpsr') . 'LaTafanera',
422
- 'icon' => 'latafanera.png',
423
- 'url' => 'http://latafanera.cat/submit.php?url={url}',
424
- ),
425
-
426
- 'linkagogo' => array(
427
- 'name' => 'LinkaGoGo',
428
- 'titleText' => __('Share this on ', 'wpsr') . 'LinkaGoGo',
429
- 'icon' => 'linkagogo.png',
430
- 'url' => 'http://www.linkagogo.com/go/AddNoPopup?url={url}&amp;title={title}',
431
- ),
432
-
433
- 'linkarena' => array(
434
- 'name' => 'LinkArena',
435
- 'titleText' => __('Add this to ', 'wpsr') . 'LinkArena',
436
- 'icon' => 'linkarena.png',
437
- 'url' => 'http://linkarena.com/bookmarks/addlink/?url={url}&amp;title={title}',
438
- ),
439
-
440
- 'linkedin' => array(
441
- 'name' => 'LinkedIn',
442
- 'titleText' => __('Share this on ', 'wpsr') . 'LinkedIn',
443
- 'icon' => 'linkedin.png',
444
- 'url' => 'http://www.linkedin.com/shareArticle?mini=true&amp;url={url}&amp;title={title}&amp;source={blogname}&amp;summary={excerpt}',
445
- 'support32px' => 1,
446
- ),
447
-
448
- 'linkter' => array(
449
- 'name' => 'Linkter',
450
- 'titleText' => __('Share this on ', 'wpsr') . 'Linkter',
451
- 'icon' => 'linkter.png',
452
- 'url' => 'http://www.linkter.hu/index.php?action=suggest_link&amp;url={url}&amp;title={title}',
453
- ),
454
-
455
- 'live' => array(
456
- 'name' => 'Live',
457
- 'titleText' => __('Add this to ', 'wpsr') . 'Live',
458
- 'icon' => 'live.png',
459
- 'url' => 'https://favorites.live.com/quickadd.aspx?marklet=1&amp;url={url}&amp;title={title}',
460
- 'support32px' => 1,
461
- ),
462
-
463
- // M
464
-
465
- 'meneame' => array(
466
- 'name' => 'Meneame',
467
- 'titleText' => __('Submit this to ', 'wpsr') . 'Meneame',
468
- 'icon' => 'meneame.png',
469
- 'url' => 'http://meneame.net/submit.php?url={url}',
470
- ),
471
-
472
- 'misterwong' => array(
473
- 'name' => 'Mister Wong',
474
- 'titleText' => __('Add this to ', 'wpsr') . 'Mister Wong',
475
- 'icon' => 'misterwong.png',
476
- 'url' => 'http://www.mister-wong.com/addurl/?bm_url={url}&amp;bm_description={title}&amp;plugin=wp-socializer',
477
- 'support32px' => 1,
478
- ),
479
-
480
- /*'MisterWong.DE' => array(
481
- 'icon' => 'misterwong.png',
482
- 'url' => 'http://www.mister-wong.de/addurl/?bm_url={url}&amp;bm_description={title}&amp;plugin=soc',
483
- 'sameImageAs' => 'MisterWong',
484
- ),*/
485
-
486
- 'mixx' => array(
487
- 'name' => 'Mixx',
488
- 'titleText' => __('Submit this to ', 'wpsr') . 'Mixx',
489
- 'icon' => 'mixx.png',
490
- 'url' => 'http://www.mixx.com/submit?page_url={url}&amp;title={title}',
491
- 'support32px' => 1,
492
- ),
493
-
494
- 'mob' => array(
495
- 'name' => 'MOB',
496
- 'titleText' => __('Share this on ', 'wpsr') . 'MOB',
497
- 'icon' => 'mob.png',
498
- 'url' => 'http://www.mob.com/share.php?u={url}&t={title}',
499
- ),
500
-
501
- 'msnreporter' => array(
502
- 'name' => 'MSNReporter',
503
- 'titleText' => __('Share this on ', 'wpsr') . 'MSNReporter',
504
- 'icon' => 'msnreporter.png',
505
- 'url' => 'http://reporter.nl.msn.com/?fn=contribute&amp;Title={title}&amp;URL={url}&amp;cat_id=6&amp;tag_id=31&amp;Remark={excerpt}',
506
- ),
507
-
508
- 'muti' => array(
509
- 'name' => 'Muti',
510
- 'titleText' => __('Share this on ', 'wpsr') . 'Muti',
511
- 'icon' => 'muti.png',
512
- 'url' => 'http://www.muti.co.za/submit?url={url}&amp;title={title}',
513
- ),
514
-
515
- 'myshare' => array(
516
- 'name' => 'MyShare',
517
- 'titleText' => __('Share this on ', 'wpsr') . 'MyShare',
518
- 'icon' => 'myshare.png',
519
- 'url' => 'http://myshare.url.com.tw/index.php?func=newurl&amp;url={url}&amp;desc={title}',
520
- ),
521
-
522
- 'myspace' => array(
523
- 'name' => 'MySpace',
524
- 'titleText' => __('Post this on ', 'wpsr') . 'MySpace',
525
- 'icon' => 'myspace.png',
526
- 'url' => 'http://www.myspace.com/Modules/PostTo/Pages/?u={url}&amp;t={title}',
527
- 'support32px' => 1,
528
- ),
529
-
530
- // N
531
-
532
- 'n4g' => array(
533
- 'name' => 'N4G',
534
- 'titleText' => __('Share this on ', 'wpsr') . '',
535
- 'icon' => 'n4g.png',
536
- 'url' => 'http://www.n4g.com/tips.aspx?url={url}&amp;title={title}',
537
- ),
538
-
539
- 'netvibes' => array(
540
- 'name' => 'Netvibes',
541
- 'titleText' => __('Share this on ', 'wpsr') . 'Netvibes',
542
- 'icon' => 'netvibes.png',
543
- 'url' => 'http://www.netvibes.com/share?title={title}&amp;url={url}',
544
- 'support32px' => 1,
545
- ),
546
-
547
- 'netvouz' => array(
548
- 'name' => 'Netvouz',
549
- 'titleText' => __('Share this on ', 'wpsr') . 'Netvouz',
550
- 'icon' => 'netvouz.png',
551
- 'url' => 'http://www.netvouz.com/action/submitBookmark?url={url}&amp;title={title}&amp;popup=no',
552
- ),
553
-
554
- 'newsvine' => array(
555
- 'name' => 'NewsVine',
556
- 'titleText' => __('Add this to ', 'wpsr') . 'NewsVine',
557
- 'icon' => 'newsvine.png',
558
- 'url' => 'http://www.newsvine.com/_tools/seed&amp;save?u={url}&amp;h={title}',
559
- 'support32px' => 1,
560
- ),
561
-
562
- 'nk' => array(
563
- 'name' => 'NK',
564
- 'titleText' => __('Share this on ', 'wpsr') . 'NK',
565
- 'icon' => 'nk.png',
566
- 'url' => 'http://nasza-klasa.pl/sledzik?shout={title} {url}',
567
- 'support32px' => 1,
568
- ), // Added version 2.0 - 16-1-2011
569
-
570
- 'nujij' => array(
571
- 'name' => 'NuJIJ',
572
- 'titleText' => __('Share this on ', 'wpsr') . 'NuJIJ',
573
- 'icon' => 'nujij.png',
574
- 'url' => 'http://nujij.nl/jij.lynkx?t={title}&amp;u={url}&amp;b={excerpt}',
575
- ),
576
-
577
- // O
578
-
579
- 'oknotizie' => array(
580
- 'name' => 'OkNotizie',
581
- 'titleText' => __('Share this on ', 'wpsr') . 'OkNotizie',
582
- 'icon' => 'oknotizie.png',
583
- 'url' => 'http://oknotizie.virgilio.it/post.html.php?url={url}&amp;title={title}',
584
- 'support32px' => 1,
585
- ), // Added version 2.4 - 13-12-2012
586
-
587
- 'orkut' => array(
588
- 'name' => 'Orkut',
589
- 'titleText' => __('Share this on ', 'wpsr') . 'Orkut',
590
- 'icon' => 'orkut.png',
591
- 'url' => 'http://promote.orkut.com/preview?nt=orkut.com&amp;tt={title}&amp;du={url}&amp;cn={excerpt}',
592
- 'support32px' => 1,
593
- ),
594
-
595
- 'osnews' => array(
596
- 'name' => 'OSnews',
597
- 'titleText' => __('Share this on ', 'wpsr') . 'OSnews',
598
- 'icon' => 'osnews.png',
599
- 'url' => 'http://osnews.pl/dodaj-niusa/?external=true&title={title}&url={url}',
600
- 'support32px' => 1,
601
- ), // Added version 2.0 - 16-1-2011
602
-
603
- // P
604
-
605
- 'pdf' => array(
606
- 'name' => 'PDF',
607
- 'titleText' => __('Convert to ', 'wpsr') . 'PDF',
608
- 'icon' => 'pdf.png',
609
- 'url' => 'http://www.printfriendly.com/print?url={url}',
610
- ),
611
-
612
- 'pingfm' => array(
613
- 'name' => 'Ping.fm',
614
- 'titleText' => __('Share this on ', 'wpsr') . 'Ping.fm',
615
- 'icon' => 'ping.png',
616
- 'url' => 'http://ping.fm/ref/?link={url}&amp;title={title}&amp;body={excerpt}',
617
- 'support32px' => 1,
618
- ),
619
-
620
- 'pinterest' => 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}&amp;media={image}&amp;description={excerpt}', // Changed & to &amp; in v2.4.6
625
- 'support32px' => 1,
626
- ),// Added version 2.4 - 13-2-2012
627
-
628
- 'posterous' => array(
629
- 'name' => 'Posterous',
630
- 'titleText' => __('Share this on ', 'wpsr') . 'Posterous',
631
- 'icon' => 'posterous.png',
632
- 'url' => 'http://posterous.com/share?linkto={url}&amp;title={title}&amp;selection={excerpt}',
633
- 'support32px' => 1,
634
- ),
635
-
636
- 'print' => array(
637
- 'name' => 'Print',
638
- 'titleText' => __('Print this article ', 'wpsr') . '',
639
- 'icon' => 'printfriendly.png',
640
- 'url' => 'http://www.printfriendly.com/print?url={url}',
641
- 'support32px' => 1,
642
- ),
643
-
644
- 'propeller' => array(
645
- 'name' => 'Propeller',
646
- 'titleText' => __('Submit this to ', 'wpsr') . 'Propeller',
647
- 'icon' => 'propeller.png',
648
- 'url' => 'http://www.propeller.com/submit/?url={url}',
649
- ),
650
-
651
- // R
652
-
653
- 'ratimarks' => array(
654
- 'name' => 'Ratimarks',
655
- 'titleText' => __('Add this to ', 'wpsr') . 'Ratimarks',
656
- 'icon' => 'ratimarks.png',
657
- 'url' => 'http://ratimarks.org/bookmarks.php/?action=add&address={url}&amp;title={title}',
658
- ),
659
-
660
- 'rec6' => array(
661
- 'name' => 'Rec6',
662
- 'titleText' => __('Share this on ', 'wpsr') . 'Rec6',
663
- 'icon' => 'rec6.png',
664
- 'url' => 'http://rec6.via6.com/link.php?url={url}&amp;={title}',
665
- ),
666
-
667
- 'reddit' => array(
668
- 'name' => 'Reddit',
669
- 'titleText' => __('Submit this to ', 'wpsr') . 'Reddit',
670
- 'icon' => 'reddit.png',
671
- 'url' => 'http://reddit.com/submit?url={url}&amp;title={title}',
672
- 'support32px' => 1,
673
- ),
674
-
675
- 'rss' => array(
676
- 'name' => 'RSS',
677
- 'titleText' => __('Subscribe to ', 'wpsr') . 'RSS',
678
- 'icon' => 'rss.png',
679
- 'url' => '{rss-url}',
680
- 'support32px' => 1,
681
- ),
682
-
683
- // S
684
-
685
- 'scoopeo' => array(
686
- 'name' => 'Scoopeo',
687
- 'titleText' => __('Share this on ', 'wpsr') . 'Scoopeo',
688
- 'icon' => 'scoopeo.png',
689
- 'url' => 'http://www.scoopeo.com/scoop/new?newurl={url}&amp;title={title}',
690
- ),
691
-
692
- 'segnalo' => array(
693
- 'name' => 'Segnalo',
694
- 'titleText' => __('Post this on ', 'wpsr') . 'Segnalo',
695
- 'icon' => 'segnalo.png',
696
- 'url' => 'http://segnalo.alice.it/post.html.php?url={url}&amp;title={title}',
697
- ),
698
-
699
- 'shetoldme' => array(
700
- 'name' => 'SheToldMe',
701
- 'titleText' => __('Share this on ', 'wpsr') . 'SheToldMe',
702
- 'icon' => 'shetoldme.png',
703
- 'url' => 'http://shetoldme.com/publish?url={url}&title={title}',
704
- ),
705
-
706
- 'simpy' => array(
707
- 'name' => 'Simpy',
708
- 'titleText' => __('Add this to ', 'wpsr') . 'Simpy',
709
- 'icon' => 'simpy.png',
710
- 'url' => 'http://www.simpy.com/simpy/LinkAdd.do?href={url}&amp;title={title}',
711
- ),
712
-
713
- 'slashdot' => array(
714
- 'name' => 'Slashdot',
715
- 'titleText' => __('Share this on ', 'wpsr') . 'Slashdot',
716
- 'icon' => 'slashdot.png',
717
- 'url' => 'http://slashdot.org/bookmark.pl?title={title}&amp;url={url}',
718
- ),
719
-
720
- 'socialogs' => array(
721
- 'name' => 'Socialogs',
722
- 'titleText' => __('Share this on ', 'wpsr') . 'Socialogs',
723
- 'icon' => 'socialogs.png',
724
- 'url' => 'http://socialogs.com/add_story.php?story_url={url}&amp;story_title={title}',
725
- ),
726
-
727
- 'sphereit' => array(
728
- 'name' => 'SphereIt',
729
- 'titleText' => __('Share this on ', 'wpsr') . 'SphereIt',
730
- 'icon' => 'sphere.png',
731
- 'url' => 'http://www.sphere.com/search?q=sphereit:{url}&amp;title={title}',
732
- ),
733
-
734
- 'sphinn' => array(
735
- 'name' => 'Sphinn',
736
- 'titleText' => __('Post this on ', 'wpsr') . 'Sphinn',
737
- 'icon' => 'sphinn.png',
738
- 'url' => 'http://sphinn.com/index.php?c=post&amp;m=submit&amp;link={url}',
739
- 'support32px' => 1,
740
- ),
741
-
742
- 'stumbleupon' => array(
743
- 'name' => 'StumbleUpon',
744
- 'titleText' => __('Submit this to ', 'wpsr') . 'StumbleUpon',
745
- 'icon' => 'stumbleupon.png',
746
- 'url' => 'http://www.stumbleupon.com/submit?url={url}&amp;title={title}',
747
- 'support32px' => 1,
748
- ),
749
-
750
- // T
751
-
752
- 'techmeme' => array(
753
- 'name' => 'Techmeme',
754
- 'titleText' => __('Share this on ', 'wpsr') . 'Techmeme',
755
- 'icon' => 'techmeme.png',
756
- 'url' => 'http://twitter.com/home/?status=tip%20@Techmeme%20{url}%20{de-title}',
757
- ),
758
-
759
- 'technorati' => array(
760
- 'name' => 'Technorati',
761
- 'titleText' => __('Add this to ', 'wpsr') . 'Technorati',
762
- 'icon' => 'technorati.png',
763
- 'url' => 'http://technorati.com/faves?add={url}',
764
- 'support32px' => 1,
765
- ),
766
-
767
- 'tipd' => array(
768
- 'name' => 'Tipd',
769
- 'titleText' => __('Submit this to ', 'wpsr') . 'Tipd',
770
- 'icon' => 'tipd.png',
771
- 'url' => 'http://tipd.com/submit.php?url={url}',
772
- ),
773
-
774
- 'tumblr' => array(
775
- 'name' => 'Tumblr',
776
- 'titleText' => __('Share this on ', 'wpsr') . 'Tumblr',
777
- 'icon' => 'tumblr.png',
778
- 'url' => 'http://www.tumblr.com/share?v=3&amp;u={url}&amp;t={title}&amp;s={excerpt}',
779
- 'support32px' => 1,
780
- ),
781
-
782
- 'twitter' => array(
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
-
790
- // U
791
-
792
- 'upnews' => array(
793
- 'name' => 'Upnews',
794
- 'titleText' => __('Submit this to ', 'wpsr') . 'Upnews',
795
- 'icon' => 'upnews.png',
796
- 'url' => 'http://www.upnews.it/submit?url={url}&amp;title={title}',
797
- ),
798
-
799
- // V
800
-
801
- 'viadeofr' => array(
802
- 'name' => 'Viadeo FR',
803
- 'titleText' => __('Share this on ', 'wpsr') . 'Viadeo FR',
804
- 'icon' => 'viadeo.png',
805
- 'url' => 'http://www.viadeo.com/shareit/share/?url={url}&title={title}&urllanguage=fr',
806
- ),
807
-
808
- 'vkontakte' => array( // Added in v2.4.9.8 24-01-2014
809
- 'name' => 'VKontakte',
810
- 'titleText' => __('Share this on ', 'wpsr') . 'VKontakte',
811
- 'icon' => 'vkontakte.png',
812
- 'url' => 'http://vk.com/share.php?url={url}&title={title}&description={excerpt}',
813
- 'support32px' => 1,
814
- ),
815
-
816
- // W
817
-
818
- 'webnewsde' => array(
819
- 'name' => 'Webnews.de',
820
- 'titleText' => __('Share this on ', 'wpsr') . 'Webnews.de',
821
- 'icon' => 'webnews.png',
822
- 'url' => 'http://www.webnews.de/einstellen?url={url}&amp;title={title}',
823
- ),
824
-
825
- 'webride' => array(
826
- 'name' => 'Webride',
827
- 'titleText' => __('Share this on ', 'wpsr') . 'Webride',
828
- 'icon' => 'webride.png',
829
- 'url' => 'http://webride.org/discuss/split.php?uri={url}&amp;title={title}',
830
- ),
831
-
832
- 'wikio' => array(
833
- 'name' => 'Wikio',
834
- 'titleText' => __('Share this on ', 'wpsr') . 'Wikio',
835
- 'icon' => 'wikio.png',
836
- 'url' => 'http://www.wikio.com/vote?url={url}',
837
- ),
838
-
839
- /*'Wikio FR' => array(
840
- 'icon' => 'wikio.png',
841
- 'url' => 'http://www.wikio.fr/vote?url={url}',
842
- 'sameImageAs' => 'Wikio',
843
- ),
844
-
845
- 'Wikio IT' => array(
846
- 'icon' => 'wikio.png',
847
- 'url' => 'http://www.wikio.it/vote?url={url}',
848
- 'sameImageAs' => 'Wikio',
849
- ),*/
850
-
851
- 'wists' => array(
852
- 'name' => 'Wists',
853
- 'titleText' => __('Share this on ', 'wpsr') . 'Wists',
854
- 'icon' => 'wists.png',
855
- 'url' => 'http://wists.com/s.php?c=&amp;r={url}&amp;title={title}',
856
- ),
857
-
858
- 'wykop' => array(
859
- 'name' => 'Wykop',
860
- 'titleText' => __('Share this on ', 'wpsr') . 'Wykop',
861
- 'icon' => 'wykop.png',
862
- 'url' => 'http://www.wykop.pl/dodaj?url={url}',
863
- 'support32px' => 1, // Added version 2.0 - 16-1-2011
864
- ),
865
-
866
- // X
867
-
868
- 'xerpi' => array(
869
- 'name' => 'Xerpi',
870
- 'titleText' => __('Add this to ', 'wpsr') . 'Xerpi',
871
- 'icon' => 'xerpi.png',
872
- 'url' => 'http://www.xerpi.com/block/add_link_from_extension?url={url}&amp;title={title}',
873
- ),
874
-
875
- // Y
876
-
877
- 'yahoobookmarks' => array(
878
- 'name' => 'Yahoo! Bookmarks',
879
- 'titleText' => __('Add this to ', 'wpsr') . 'Yahoo! Bookmarks',
880
- 'icon' => 'yahoo.png',
881
- 'url' => 'http://bookmarks.yahoo.com/toolbar/savebm?u={url}&amp;t={title}&opener=bm&amp;ei=UTF-8&amp;d={excerpt}',
882
- 'support32px' => 1,
883
- ),
884
-
885
- 'yahoobuzz' => array(
886
- 'name' => 'YahooBuzz',
887
- 'titleText' => __('Submit this to ', 'wpsr') . 'YahooBuzz',
888
- 'icon' => 'yahoobuzz.png',
889
- 'url' => 'http://buzz.yahoo.com/submit/?submitUrl={url}&amp;submitHeadline={title}&amp;submitSummary={excerpt}&amp;submitAssetType=text',
890
- 'support32px' => 1,
891
- ),
892
-
893
- 'yigg' => array(
894
- 'name' => 'Yigg',
895
- 'titleText' => __('Share this on ', 'wpsr') . 'Yigg',
896
- 'icon' => 'yiggit.png',
897
- 'url' => 'http://yigg.de/neu?exturl={url}&amp;exttitle={title}',
898
- ),
899
-
900
- );
901
-
902
- $wpsr_button_code_list = array(
903
- "{social-bts-16px}", "{social-bts-32px}", "{addthis-bt}",
904
- "{addthis-tb-16px}", "{addthis-tb-32px}", "{addthis-sc}",
905
- "{sharethis-vcount}", "{sharethis-hcount}", "{sharethis-large}",
906
- "{sharethis-regular}", "{sharethis-regular2}", "{sharethis-bt}",
907
- "{sharethis-classic}", "{plusone-small}", "{plusone-medium}",
908
- "{plusone-standard}", "{plusone-tall}", "{retweet-bt}",
909
- "{digg-bt}", "{facebook-like}", "{facebook-send}",
910
- "{reddit-1}", "{reddit-2}", "{reddit-3}",
911
- "{stumbleupon-1}", "{stumbleupon-2}", "{stumbleupon-3}",
912
- "{stumbleupon-5}", "{linkedin-standard}", "{linkedin-right}",
913
- "{linkedin-top}", "{pinterest-nocount}", "{pinterest-horizontal}",
914
- "{pinterest-vertical}", "{custom-1}", "{custom-2}"
915
- );
916
-
917
- $wpsr_shortcodes_list = array(
918
- 'Social buttons' => '[wpsr_socialbts]',
919
- 'Addthis' => '[wpsr_addthis]',
920
- 'Sharethis' => '[wpsr_sharethis]',
921
- 'Retweet' => '[wpsr_retweet]',
922
- 'Google +1' => '[wpsr_plusone]',
923
- 'Digg' => '[wpsr_digg]',
924
- 'Facebook' => '[wpsr_facebook]',
925
- 'StumbleUpon' => '[wpsr_stumbleupon]',
926
- 'Reddit' => '[wpsr_reddit]',
927
- 'LinkedIn' => '[wpsr_linkedin]',
928
- 'Pinterest' => '[wpsr_pinterest]'
929
- );
930
-
931
- $wpsr_default_templates = array(
932
- 1 => array( 'name' => 'Template 1' ),
933
- 2 => array( 'name' => 'Template 2' )
934
- );
935
-
936
- $wpsr_floating_bar_bts = array(
937
- 'Retweet' => array(
938
- 'float_left' => '[wpsr_retweet service="twitter" type="normal" script="0"]',
939
- 'bottom_fixed' => '[wpsr_retweet service="twitter" script="0"]',
940
- ),
941
- 'Google +1' => array(
942
- 'float_left' => '[wpsr_plusone type="tall" script="0"]',
943
- 'bottom_fixed' => '[wpsr_plusone type="medium" script="0"]',
944
- ),
945
- 'Digg' => array(
946
- 'float_left' => '[wpsr_digg type="DiggMedium" script="0"]',
947
- 'bottom_fixed' => '[wpsr_digg type="DiggCompact" script="0"]',
948
- ),
949
- 'Facebook' => array(
950
- 'float_left' => '[wpsr_facebook style="box_count" width="48" ]', // Added "width" in v2.4.2
951
- 'bottom_fixed' => '[wpsr_facebook style="button_count"]',
952
- ),
953
- 'Facebook Like and Share' => array(
954
- 'float_left' => '[wpsr_facebook style="box_count" width="70" type="send"]', // Added v2.4.9.5, thanks to Dan: http://bit.ly/1bSWWut
955
- 'bottom_fixed' => '[wpsr_facebook style="button_count" type="send" ]',
956
- ),
957
- 'StumbleUpon' => array(
958
- 'float_left' => '[wpsr_stumbleupon type="5" script="0"]',
959
- 'bottom_fixed' => '[wpsr_stumbleupon type="1" script="0"]',
960
- ),
961
- 'Reddit' => array(
962
- 'float_left' => '[wpsr_reddit type="2"]',
963
- 'bottom_fixed' => '[wpsr_reddit type="1"]',
964
- ),
965
- 'LinkedIn' => array(
966
- 'float_left' => '[wpsr_linkedin type="top" script="0"]',
967
- 'bottom_fixed' => '[wpsr_linkedin type="right" script="0"]',
968
- ),
969
- 'Pinterest' => array(
970
- 'float_left' => '[wpsr_pinterest type="above" script="0"]', //changed type since 2.4.9.8
971
- 'bottom_fixed' => '[wpsr_pinterest type="beside" script="0"]',
972
- ),
973
- 'Comments' => array(
974
- 'float_left' => '[wpsr_commentsbt type="vertical"]',
975
- 'bottom_fixed' => '[wpsr_commentsbt type="horizontal"]',
976
- ),
977
- 'Email' => array(
978
- 'float_left' => '[wpsr_socialbts output="singles" type="32px" services="email" sprites=0 effect=none]',
979
- 'bottom_fixed' => '[wpsr_socialbts output="singles" services="email" label=1 sprites=0 effect=none]'
980
- ),
981
- 'Print' => array(
982
- 'float_left' => '[wpsr_socialbts output="singles" type="32px" services="print" sprites=0 effect=none]',
983
- 'bottom_fixed' => '[wpsr_socialbts output="singles" services="print" label=1 sprites=0 effect=none]'
984
- )
985
- );
986
-
987
- $wpsr_addthis_lang_array = array(
988
- 'en'=>'English', 'ar'=>'Arabic', 'zh'=>'Chinese', 'cs'=>'Czech', 'da'=>'Danish', 'nl'=>'Dutch','fa'=>'Farsi', 'fi'=>'Finnish', 'fr'=>'French', 'ga'=>'Gaelic', 'de'=>'German', 'el'=>'Greek', 'he'=>'Hebrew', 'hi'=>'Hindi', 'it'=>'Italian', 'ja'=>'Japanese', 'ko'=>'Korean', 'lv'=>'Latvian', 'lt'=>'Lithuanian', 'no'=>'Norwegian', 'pl'=>'Polish', 'pt'=>'Portugese', 'ro'=>'Romanian', 'ru'=>'Russian', 'sk'=>'Slovakian', 'sl'=>'Slovenian', 'es'=>'Spanish', 'sv'=>'Swedish', 'th'=>'Thai', 'ur'=>'Urdu', 'cy'=>'Welsh', 'vi'=>'Vietnamese'
989
- );
990
-
991
- ## Include WP Socializer Processer files
992
- require_once('admin/wpsr-admin.php');
993
- require_once('admin/wpsr-admin-other.php');
994
- require_once('admin/wpsr-admin-floating-bar.php');
995
- require_once('includes/wpsr-addthis.php');
996
- require_once('includes/wpsr-sharethis.php');
997
- require_once('includes/wpsr-google.php'); // Since v2.0
998
- require_once('includes/wpsr-retweet.php');
999
- require_once('includes/wpsr-digg.php');
1000
- require_once('includes/wpsr-facebook.php');
1001
- require_once('includes/wpsr-socialbuttons.php');
1002
- require_once('includes/wpsr-other.php');
1003
- require_once('includes/wpsr-custom.php');
1004
- require_once('includes/wpsr-shortcodes.php');
1005
- require_once('includes/wpsr-widgets.php'); // Since v2.3
1006
- require_once('includes/wpsr-floatingbar.php'); // Since v2.4
1007
-
1008
- ## On plugin activate
1009
- function wpsr_plugin_activate(){
1010
-
1011
- // Set the defaults plugin when the options are not set
1012
- $wpsr_settings = get_option('wpsr_settings_data');
1013
- if( empty($wpsr_settings) ) wpsr_reset_values();
1014
-
1015
- // Set the defaults to the Floating share bar
1016
- $floatbts = get_option('wpsr_template_floating_bar_data');
1017
- if( empty($floatbts) ) wpsr_floatbts_reset_values();
1018
-
1019
- }
1020
- register_activation_hook(__FILE__, 'wpsr_plugin_activate');
1021
-
1022
- ## On init filters and actions
1023
- function wpsr_init(){
1024
-
1025
- ## Add required filters and check whether WP Socializer is disabled
1026
- $wpsr_settings = get_option('wpsr_settings_data');
1027
-
1028
- if(!$wpsr_settings['disablewpsr']){
1029
-
1030
- // Create dummy objects to hold the call type
1031
- $wpsr_content_op = new WPSR_Template_Output('content');
1032
- $wpsr_excerpt_op = new WPSR_Template_Output('excerpt');
1033
-
1034
- // Above and below content filters
1035
- add_filter('the_content', array($wpsr_content_op, 'output'));
1036
- add_filter('the_excerpt', array($wpsr_excerpt_op, 'output'));
1037
-
1038
- // Add the scripts loader to the page
1039
- if($wpsr_settings['scriptsplace'] == 'header'){
1040
- add_action('wp_head', 'wpsr_scripts_adder');
1041
- }else{
1042
- add_action('wp_footer', 'wpsr_scripts_adder');
1043
- }
1044
- }
1045
-
1046
- }
1047
- add_action('init', 'wpsr_init');
1048
-
1049
- /**
1050
- * One function for displaying the buttons in theme files
1051
- * Use wp_socializer(the button code or template name) in the theme files to print the
1052
- * button or the template
1053
- *
1054
- * Available button codes are given in the variable $wpsr_button_code_list (line 582) without brackets
1055
- * Available template name are 'template1' and 'template2'
1056
- */
1057
-
1058
- function wp_socializer($to_display, $params=""){
1059
- switch($to_display){
1060
- case 'socialbts' :
1061
- return wpsr_socialbts($params);
1062
- break;
1063
-
1064
- case 'addthis' :
1065
- return wpsr_addthis($params);
1066
- break;
1067
-
1068
- case 'sharethis' :
1069
- return wpsr_sharethis($params);
1070
- break;
1071
-
1072
- case 'retweet' :
1073
- return wpsr_retweet($params);
1074
- break;
1075
-
1076
- case 'digg' :
1077
- return wpsr_digg($params);
1078
- break;
1079
-
1080
- case 'facebook' :
1081
- return wpsr_facebook($params);
1082
- break;
1083
-
1084
- case 'plusone' :
1085
- return wpsr_plusone($params);
1086
- break;
1087
-
1088
- case 'stumbleupon' :
1089
- return wpsr_stumbleupon($params);
1090
- break;
1091
-
1092
- case 'reddit' :
1093
- return wpsr_reddit($params);
1094
- break;
1095
-
1096
- case 'linkedin' :
1097
- return wpsr_linkedin($params);
1098
- break;
1099
-
1100
- case 'pinterest':
1101
- return wpsr_pinterest($params);
1102
- break;
1103
-
1104
- case 'custom-1' :
1105
- return wpsr_custom_bt('custom1');
1106
- break;
1107
-
1108
- case 'custom-2' :
1109
- return wpsr_custom_bt('custom2');
1110
- break;
1111
-
1112
- case 'template-1' :
1113
- return wpsr_process_template('1');
1114
- break;
1115
-
1116
- case 'template-2' :
1117
- return wpsr_process_template('2');
1118
- break;
1119
- }
1120
- }
1121
-
1122
- /**
1123
- * One function for getting the url and title of the page
1124
- * outside the loop and inside the loop
1125
- *
1126
- * Uses super variables to get the page url outside loop and wp_title()
1127
- * to get the page title.
1128
- *
1129
- * Modified since: v2.4.6
1130
- **/
1131
-
1132
- function wpsr_get_post_details(){
1133
- // Get the global variables
1134
- global $post, $wp_query;
1135
-
1136
- // Post details within the loop
1137
- if(in_the_loop()){
1138
-
1139
- $url = get_permalink($post->ID);
1140
- $title = get_the_title($post->ID);
1141
- $excerpt = strip_tags(strip_shortcodes($post->post_excerpt));
1142
- $excerpt = (empty($excerpt)) ? substr(strip_tags(strip_shortcodes($post->post_content)), 0, 250) : $excerpt;
1143
- $image = wpsr_get_first_image($post->ID, $post->post_content);
1144
-
1145
- }else{
1146
-
1147
- // Post details outside the loop
1148
- $url = (!empty($_SERVER['HTTPS'])) ? "https://" . htmlspecialchars($_SERVER['HTTP_HOST']) . $_SERVER['REQUEST_URI'] : "http://" . htmlspecialchars($_SERVER['HTTP_HOST']) . $_SERVER['REQUEST_URI']; // Revised since v2.4.9.7
1149
- $title = wp_title('', 0);
1150
- $title = (empty($title)) ? get_bloginfo('name') : $title;
1151
- $title = str_replace(array('<title>', '</title>'), '', $title);
1152
-
1153
- // If the page is singular, then get the excerpt & image outside loop
1154
- if(is_singular()){
1155
-
1156
- $pObj = $wp_query->get_queried_object();
1157
- $pId = $wp_query->get_queried_object_id();
1158
-
1159
- $excerpt = strip_tags(strip_shortcodes($pObj->post_excerpt));
1160
- $excerpt = (empty($excerpt)) ? substr(strip_tags(strip_shortcodes($pObj->post_content)), 0, 250) : $excerpt;
1161
- $image = wpsr_get_first_image($pId, $pObj->post_content);
1162
-
1163
- }else{
1164
-
1165
- // If the page is other than singular default the excerpt to the page title
1166
- $excerpt = $title;
1167
- $image = '';
1168
-
1169
- }
1170
-
1171
- }
1172
-
1173
- return $details = array(
1174
- 'permalink' => $url,
1175
- 'title' => trim($title),
1176
- 'excerpt' => trim($excerpt),
1177
- 'image' => $image
1178
- );
1179
-
1180
- }
1181
-
1182
- // Get the first image of the post
1183
- function wpsr_get_first_image($postID, $postCnt = ''){
1184
- $args = array(
1185
- 'numberposts' => 1,
1186
- 'order'=> 'ASC',
1187
- 'post_mime_type' => 'image',
1188
- 'post_parent' => $postID,
1189
- 'post_status' => null,
1190
- 'post_type' => 'attachment'
1191
- );
1192
-
1193
- $attachments = get_children( $args );
1194
-
1195
- // Check for image attachments in posts
1196
- if ($attachments){
1197
- foreach($attachments as $attachment){
1198
- return $attachment->guid;
1199
- }
1200
- }else{
1201
- // If no image attachements, then get the full post thumbnail
1202
- if(function_exists('has_post_thumbnail') && has_post_thumbnail($postID)){
1203
- $imageId = get_post_thumbnail_id($postID);
1204
- $imageUrl = wp_get_attachment_image_src($imageId, 'large');
1205
- return $imageUrl[0];
1206
- }else{
1207
- // Or else get the first image present in the post content
1208
- $output = preg_match_all( '/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $postCnt, $matches );
1209
-
1210
- if(!empty($matches[1])){
1211
- $firstImg = $matches [1] [0];
1212
- return $firstImg;
1213
- }
1214
-
1215
- }
1216
- }
1217
-
1218
- }
1219
-
1220
- function wpsr_process_template($no, $rss = 0){
1221
-
1222
- // Get the global variables
1223
- global $wpsr_button_code_list;
1224
-
1225
- $wpsr_button_processed_list = array(
1226
- wpsr_socialbts_template('16px'), wpsr_socialbts_template('32px'), wpsr_addthis_bt('button'),
1227
- wpsr_addthis_bt('toolbar', '16px'), wpsr_addthis_bt('toolbar', '32px'), wpsr_addthis_bt('sharecount'),
1228
- wpsr_sharethis_bt('vcount'), wpsr_sharethis_bt('hcount'), wpsr_sharethis_bt('large'),
1229
- wpsr_sharethis_bt('regular'), wpsr_sharethis_bt('regular2'), wpsr_sharethis_bt('buttons'),
1230
- wpsr_sharethis_bt('classic'), wpsr_plusone_bt('small'), wpsr_plusone_bt('medium'),
1231
- wpsr_plusone_bt('standard'), wpsr_plusone_bt('tall'), wpsr_retweet_bt(),
1232
- wpsr_digg_bt(), wpsr_facebook_bt('like'), wpsr_facebook_bt('send'),
1233
- wpsr_reddit_bt('1'), wpsr_reddit_bt('2'), wpsr_reddit_bt('3'),
1234
- wpsr_stumbleupon_bt('1'), wpsr_stumbleupon_bt('2'), wpsr_stumbleupon_bt('3'),
1235
- wpsr_stumbleupon_bt('5'), wpsr_linkedin_bt('standard'), wpsr_linkedin_bt('right'),
1236
- wpsr_linkedin_bt('top'), wpsr_pinterest_bt('none'), wpsr_pinterest_bt('beside'),
1237
- wpsr_pinterest_bt('above'), wpsr_custom_bt('custom1'), wpsr_custom_bt('custom2')
1238
- );
1239
-
1240
- $wpsr_button_processed_list_rss = array(
1241
- wpsr_socialbts_rss('16px'), wpsr_socialbts_rss('32px'), wpsr_addthis_rss_bt(),
1242
- wpsr_addthis_rss_bt(), wpsr_addthis_rss_bt(), wpsr_addthis_rss_bt(),
1243
- wpsr_sharethis_rss_bt(), wpsr_sharethis_rss_bt(), wpsr_sharethis_rss_bt(),
1244
- wpsr_sharethis_rss_bt(), wpsr_sharethis_rss_bt(), wpsr_sharethis_rss_bt(),
1245
- wpsr_sharethis_rss_bt(), wpsr_plusone_rss_bt(), wpsr_plusone_rss_bt(),
1246
- wpsr_plusone_rss_bt(), wpsr_plusone_rss_bt(), wpsr_retweet_rss_bt(),
1247
- wpsr_digg_rss_bt(), wpsr_facebook_rss_bt(), wpsr_facebook_rss_bt(),
1248
- wpsr_reddit_rss_bt(), wpsr_reddit_rss_bt(), wpsr_reddit_rss_bt(),
1249
- wpsr_stumbleupon_rss_bt(), wpsr_stumbleupon_rss_bt(), wpsr_stumbleupon_rss_bt(),
1250
- wpsr_stumbleupon_rss_bt(), wpsr_linkedin_rss_bt(), wpsr_linkedin_rss_bt(),
1251
- wpsr_linkedin_rss_bt(), wpsr_custom_bt('custom1'), wpsr_custom_bt('custom2')
1252
- );
1253
-
1254
- // Get the template data
1255
- $wpsr_template[$no] = get_option('wpsr_template' . $no . '_data');
1256
-
1257
- if(!$rss)
1258
- $wpsr_template_processed = str_replace($wpsr_button_code_list, $wpsr_button_processed_list, do_shortcode($wpsr_template[$no]['content']));
1259
- else
1260
- $wpsr_template_processed = str_replace($wpsr_button_code_list, $wpsr_button_processed_list_rss, $wpsr_template[$no]['content']);
1261
-
1262
- return $wpsr_template_processed;
1263
- }
1264
-
1265
- // Class to insert the template below the content and the excerpt
1266
- class WPSR_Template_Output{
1267
- protected $callType;
1268
-
1269
- function WPSR_Template_Output($type){
1270
- $this->callType = $type;
1271
- }
1272
-
1273
- function output($content = ''){
1274
-
1275
- // Get the global variables
1276
- global $post;
1277
- $tempContent = $content;
1278
-
1279
- // Check whether the call from "the_excerpt" or the "get_the_excerpt" function
1280
- $excerpt = 0;
1281
- $call = debug_backtrace();
1282
- foreach($call as $val){
1283
- if($val['function'] == 'the_excerpt' || $val['function'] == 'get_the_excerpt'){
1284
- $excerpt = 1;
1285
- }
1286
- }
1287
-
1288
- $templates = get_option('wpsr_templates');
1289
-
1290
- // Loop through all the templates
1291
- foreach($templates as $k => $v){
1292
- $wpsr_template[$k] = get_option('wpsr_template' . $k . '_data');
1293
-
1294
- if(($this->callType == 'content' && $excerpt !== 1) || ($this->callType == 'excerpt' && $wpsr_template[$k]['inexcerpt'] == 1)){
1295
-
1296
- // Check page conditionals
1297
- if (is_home() == 1 && $wpsr_template[$k]['inhome'] == 1){
1298
- $flag = 1;
1299
-
1300
- }elseif (is_single() == 1 && $wpsr_template[$k]['insingle'] == 1){
1301
- $flag = 1;
1302
-
1303
- }elseif (is_page() == 1 && $wpsr_template[$k]['inpage'] == 1){
1304
- $flag = 1;
1305
-
1306
- }elseif (is_category() == 1 && $wpsr_template[$k]['incategory'] == 1){
1307
- $flag = 1;
1308
-
1309
- }elseif (is_tag() == 1 && $wpsr_template[$k]['intag'] == 1){
1310
- $flag = 1;
1311
-
1312
- }elseif (is_date() == 1 && $wpsr_template[$k]['indate'] == 1){
1313
- $flag = 1;
1314
-
1315
- }elseif (is_author() == 1 && $wpsr_template[$k]['inauthor'] == 1){
1316
- $flag = 1;
1317
-
1318
- }elseif(is_search() == 1 && $wpsr_template[$k]['insearch'] == 1){
1319
- $flag = 1;
1320
-
1321
- }elseif(is_feed() == 1 && $wpsr_template[$k]['infeed'] == 1){
1322
- $flag = 2;
1323
-
1324
- }else{
1325
- $flag = 0;
1326
- }
1327
-
1328
- // Check for page conditionals
1329
- if($flag == 1){
1330
- $wpsr_template_processed = wpsr_process_template($k);
1331
- }elseif($flag == 2){
1332
- $wpsr_template_processed = wpsr_process_template($k, 1);
1333
- }elseif($flag == 0){
1334
- $wpsr_template_processed = '';
1335
- }
1336
-
1337
- // Check whether displaying template1 in the post is enabled
1338
- if (get_post_meta($post->ID,'_wpsr-disable-template' . $k, true) != 1){
1339
-
1340
- // Check position conditionals
1341
- if($wpsr_template[$k]['abvcontent'] == 1 && $wpsr_template[$k]['blwcontent'] == 1){
1342
- $tempContent = $wpsr_template_processed . $tempContent . $wpsr_template_processed;
1343
-
1344
- }elseif($wpsr_template[$k]['abvcontent'] == 1){
1345
- $tempContent = $wpsr_template_processed . $tempContent;
1346
-
1347
- }elseif($wpsr_template[$k]['blwcontent'] == 1){
1348
- $tempContent = $tempContent . $wpsr_template_processed;
1349
-
1350
- }
1351
- }
1352
-
1353
- }//if
1354
-
1355
- }//foreach
1356
-
1357
- return $tempContent;
1358
- }
1359
- };
1360
-
1361
- ## Checks whether the button is used in any of the templates
1362
- function wpsr_button_used($name){
1363
- $temp_data = '';
1364
- $button_codes = array(
1365
- 'facebook' => array('{facebook-like}', '{facebook-send}', '[wpsr_facebook'),
1366
- 'retweet' => array('{retweet-bt}', '[wpsr_retweet'),
1367
- 'digg' => array('{digg-bt}', '[wpsr_digg'),
1368
- 'addthis' => array("{addthis-bt}", "{addthis-tb-16px}", "{addthis-tb-32px}", "{addthis-sc}"),
1369
- 'sharethis' => array("{sharethis-large}", "{sharethis-hcount}", "{sharethis-vcount}", "{sharethis-regular}", "{sharethis-regular2}", "{sharethis-bt}", "{sharethis-classic}"),
1370
- 'plusone' => array('{plusone-small}', '{plusone-medium}', '{plusone-standard}', '{plusone-tall}', '[wpsr_plusone'),
1371
- 'linkedin' => array('{linkedin-standard}', '{linkedin-right}', '{linkedin-top}', '[wpsr_linkedin'),
1372
- 'stumbleupon' => array('{stumbleupon-1}', '{stumbleupon-2}', '{stumbleupon-3}', '{stumbleupon-5}', '[wpsr_stumbleupon'),
1373
- 'pinterest' => array('{pinterest-nocount}', '{pinterest-horizontal}', '{pinterest-vertical}', '[wpsr_pinterest')
1374
- );
1375
-
1376
- $templates = get_option('wpsr_templates');
1377
- foreach($templates as $k => $v){
1378
- $wpsr_template[$k] = get_option('wpsr_template' . $k . '_data');
1379
- $temp_data .= $wpsr_template[$k]['content'];
1380
- }
1381
-
1382
- $temp_data .= wpsr_process_floatingbts();
1383
-
1384
- $is_bt_used = wpsr_helper_strposa($temp_data, $button_codes[$name]);
1385
-
1386
- if ($is_bt_used === false) {
1387
- return 0;
1388
- } else {
1389
- return 1;
1390
- }
1391
-
1392
- }
1393
-
1394
- ## Add the button scripts to the header
1395
- function wpsr_scripts_adder(){
1396
-
1397
- # Get Retweet Button Option
1398
- $wpsr_retweet = get_option('wpsr_retweet_data');
1399
- $wpsr_retweet_service = $wpsr_retweet['service'];
1400
-
1401
- ## Get Facebook Options
1402
- $wpsr_facebook = get_option('wpsr_facebook_data');
1403
-
1404
- # Get the settings
1405
- $wpsr_settings = get_option('wpsr_settings_data');
1406
-
1407
- $scripts = array();
1408
-
1409
- if(wpsr_button_used('retweet') == 1 && $wpsr_retweet_service == 'topsy'){
1410
- array_push($scripts, '"http://cdn.topsy.com/topsy.js?init=topsyWidgetCreator"');
1411
- }
1412
-
1413
- if(wpsr_button_used('retweet') == 1 && $wpsr_retweet_service == 'twitter'){
1414
- array_push($scripts, '"https://platform.twitter.com/widgets.js"');
1415
- }
1416
-
1417
- if(wpsr_button_used('facebook') == 1){
1418
- $fbappid = $wpsr_facebook['appid'];
1419
- $fblocale = $wpsr_facebook['locale'];
1420
-
1421
- $fbparam = ($fbappid == '') ? '' : '&appId=' . $fbappid;
1422
- $fblang = ( empty($fblocale) ) ? 'en_US' : $fblocale;
1423
- array_push($scripts, '"https://connect.facebook.net/' . $fblang . '/all.js#xfbml=1' . $fbparam . '"');
1424
- }
1425
-
1426
- if(wpsr_button_used('digg') == 1){
1427
- array_push($scripts, '"http://widgets.digg.com/buttons.js"');
1428
- }
1429
-
1430
- if(wpsr_button_used('addthis') == 1){
1431
- echo wpsr_addthis_config();
1432
- array_push($scripts, '"https://s7.addthis.com/js/300/addthis_widget.js"');
1433
- }
1434
-
1435
- if(wpsr_button_used('sharethis') == 1){
1436
- echo wpsr_sharethis_config();
1437
- array_push($scripts, '"http://w.sharethis.com/button/buttons.js"');
1438
- }
1439
-
1440
- if(wpsr_button_used('plusone') == 1){
1441
- array_push($scripts, '"https://apis.google.com/js/plusone.js"');
1442
- }
1443
-
1444
- if(wpsr_button_used('linkedin') == 1){
1445
- array_push($scripts, '"https://platform.linkedin.com/in.js"');
1446
- }
1447
-
1448
- if(wpsr_button_used('stumbleupon') == 1){
1449
- array_push($scripts, '"https://platform.stumbleupon.com/1/widgets.js"');
1450
- }
1451
-
1452
- if(wpsr_button_used('pinterest') == 1){
1453
- array_push($scripts, '"https://assets.pinterest.com/js/pinit.js"');
1454
- }
1455
-
1456
- $scriptsCount = count($scripts);
1457
- $scriptsVar = implode(',', $scripts);
1458
-
1459
- if($wpsr_settings['smartload'] == 'normal' || $wpsr_settings['smartload'] == ''){
1460
- $scriptsFnc = 'wpsrload();';
1461
- }elseif($wpsr_settings['smartload'] == 'timeout'){
1462
- $scriptsFnc = 'setTimeout(wpsrload, ' . $wpsr_settings['smartload_timeout']*1000 . ');';
1463
- }
1464
-
1465
- // Print the scripts loader
1466
- if(!empty($scripts)){
1467
- echo "\n<!--WP Socializer v" . WPSR_VERSION . " - Scripts Loader-->";
1468
- echo '
1469
- <script type="text/javascript">
1470
- var wu=[' . $scriptsVar . '],wc=' . $scriptsCount . ';
1471
- function wpsrload(){ for(var i=0;i<wc;i++){wpsrasync(wu[i]);} }
1472
- function wpsrasync(u){var a=document.createElement("script");a.type="text/javascript";a.async=true;a.src=u;var s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(a,s);} ' . $scriptsFnc . '
1473
- </script>
1474
- ';
1475
- echo "<!--End WP Socializer - Scripts Loader-->\n";
1476
- }
1477
-
1478
- }
1479
-
1480
- ## Include the required scripts and stylesheets for the plugin
1481
- function wpsr_enqueue_scripts(){
1482
-
1483
- // Load the settings array
1484
- $wpsr_settings = get_option('wpsr_settings_data');
1485
-
1486
- if(!$wpsr_settings['disablewpsr'] && !is_admin() ){
1487
-
1488
- // Floating sharebar
1489
- if(wpsr_floatingbts_check()){
1490
- wp_enqueue_script('jquery');
1491
- wp_enqueue_script( 'wpsr-floatingbar', WPSR_PUBLIC_URL . 'js/wp-socializer-floating-bar-js.js' , array('jquery'), WPSR_VERSION );
1492
- }
1493
-
1494
- // Bookmarking file.
1495
- if(wpsr_addtofavorites_bt_used()){
1496
- wp_enqueue_script( 'wpsr-bookmarks', WPSR_PUBLIC_URL . 'js/wp-socializer-bookmark-js.js' , false, WPSR_VERSION, true );
1497
- }
1498
-
1499
- // Social buttons stylesheet file
1500
- $wpsr_socialbt = get_option('wpsr_socialbt_data');
1501
- $wpsr_socialbt_loadcss = $wpsr_socialbt['loadcss'];
1502
-
1503
- if($wpsr_socialbt_loadcss == 1){
1504
- wp_enqueue_style( 'wpsr-socialbuttons', WPSR_PUBLIC_URL . 'css/wp-socializer-buttons-css.css' , false, WPSR_VERSION );
1505
- }
1506
-
1507
- }
1508
-
1509
- }
1510
- add_action('wp_enqueue_scripts', 'wpsr_enqueue_scripts');
1511
-
1512
- ## Action Links
1513
- function wpsr_plugin_actions($links, $file){
1514
- static $this_plugin;
1515
- if(!$this_plugin) $this_plugin = plugin_basename(__FILE__);
1516
- if( $file == $this_plugin ){
1517
- $settings_link = '<a href="admin.php?page=wp_socializer">' . __('Settings' ,'wpsr') . '</a> ' . '|' . ' <a href="http://bit.ly/wpsrDonation" target="_blank">' . __('Donate' ,'wpsr') . '</a>';
1518
- $links = array_merge( array($settings_link), $links);
1519
- }
1520
- return $links;
1521
- }
1522
- add_filter('plugin_action_links', 'wpsr_plugin_actions', 10, 2);
1523
-
1524
- /*
1525
- * TinyMCE button for post editor
1526
- * Used for adding shortcodes in posts
1527
- * since v2.0
1528
- */
1529
-
1530
- function wpsr_add_wpsr_button() {
1531
-
1532
- if (!current_user_can('edit_posts') && ! current_user_can('edit_pages'))
1533
- return;
1534
-
1535
- if ( get_user_option('rich_editing') == 'true') {
1536
- add_filter("mce_external_plugins", "wpsr_add_wpsrbutton_tinymce");
1537
- add_filter('mce_buttons', 'wpsr_register_wpsrbutton_tinymce');
1538
- }
1539
- }
1540
-
1541
- function wpsr_register_wpsrbutton_tinymce($buttons) {
1542
- array_push($buttons, "|", "wpsrbutton");
1543
- return $buttons;
1544
- }
1545
-
1546
- function wpsr_add_wpsrbutton_tinymce($plugin_array) {
1547
- $plugin_array['wpsrbutton'] = WPSR_ADMIN_URL . 'js/tinymce/editor_plugin.js?v=' . WPSR_VERSION;
1548
- return $plugin_array;
1549
- }
1550
-
1551
- // init process for button control
1552
- add_action('init', 'wpsr_add_wpsr_button');
1553
-
1554
- ## Helpers
1555
- function wpsr_helper_strposa($haystack, $needle) {
1556
- if(!is_array($needle)) $needle = array($needle);
1557
- foreach($needle as $what) {
1558
- if(($pos = strpos($haystack, $what))!==false) return $pos;
1559
- }
1560
- return false;
1561
- }
1562
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
wpsr.php ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Plugin Name: WP Socializer
4
+ * Plugin URI: https://www.aakashweb.com/wordpress-plugins/wp-socializer/
5
+ * Description: WP Socializer is an all in one complete social media plugin to add native social media buttons, icons, floating sharebar, follow us buttons, profile icons, mobile sharebar and selected text share popups easily with complete control and customization.
6
+ * Version: 3.0
7
+ * Author: Aakash Chakravarthy
8
+ * Author URI: https://www.aakashweb.com
9
+ * Text Domain: wpsr
10
+ * Domain Path: /languages
11
+ */
12
+
13
+ define( 'WPSR_VERSION', '3.0' );
14
+ define( 'WPSR_PATH', plugin_dir_path( __FILE__ ) ); // All have trailing slash
15
+ define( 'WPSR_URL', plugin_dir_url( __FILE__ ) );
16
+ define( 'WPSR_ADMIN_URL', trailingslashit( plugin_dir_url( __FILE__ ) . 'admin' ) );
17
+ define( 'WPSR_BASE_NAME', plugin_basename( __FILE__ ) );
18
+
19
+ # error_reporting(E_ALL);
20
+
21
+ final class WP_Socializer{
22
+
23
+ function __construct(){
24
+
25
+ add_action( 'plugins_loaded', array( $this, 'load_text_domain' ) );
26
+
27
+ // Includes
28
+ $this->includes();
29
+
30
+ }
31
+
32
+ function includes(){
33
+
34
+ // Core
35
+ include_once( WPSR_PATH . 'core/services.php' );
36
+ include_once( WPSR_PATH . 'core/lists.php' );
37
+ include_once( WPSR_PATH . 'core/metadata.php' );
38
+ include_once( WPSR_PATH . 'core/buttons.php' );
39
+ include_once( WPSR_PATH . 'core/templates.php' );
40
+ include_once( WPSR_PATH . 'core/location_rules.php' );
41
+ include_once( WPSR_PATH . 'core/includes.php' );
42
+ include_once( WPSR_PATH . 'core/share_counter.php' );
43
+ include_once( WPSR_PATH . 'core/widgets.php' );
44
+
45
+ // Services
46
+ include_once( WPSR_PATH . 'services/twitter.php' );
47
+ include_once( WPSR_PATH . 'services/social_buttons.php' );
48
+ include_once( WPSR_PATH . 'services/facebook.php' );
49
+ include_once( WPSR_PATH . 'services/google_plus.php' );
50
+ include_once( WPSR_PATH . 'services/stumbleupon.php' );
51
+ include_once( WPSR_PATH . 'services/linkedin.php' );
52
+ include_once( WPSR_PATH . 'services/reddit.php' );
53
+ include_once( WPSR_PATH . 'services/sharethis.php' );
54
+ include_once( WPSR_PATH . 'services/pinterest.php' );
55
+ include_once( WPSR_PATH . 'services/pocket.php' );
56
+ include_once( WPSR_PATH . 'services/html.php' );
57
+ include_once( WPSR_PATH . 'services/share_counter.php' );
58
+
59
+ // Admin
60
+ include_once( WPSR_PATH . 'admin/admin.php' );
61
+ include_once( WPSR_PATH . 'admin/buttons.php' );
62
+ include_once( WPSR_PATH . 'admin/sharebar.php' );
63
+ include_once( WPSR_PATH . 'admin/followbar.php' );
64
+ include_once( WPSR_PATH . 'admin/text_sharebar.php' );
65
+ include_once( WPSR_PATH . 'admin/mobile_sharebar.php' );
66
+ include_once( WPSR_PATH . 'admin/general_settings.php' );
67
+ include_once( WPSR_PATH . 'admin/help.php' );
68
+
69
+ }
70
+
71
+ function load_text_domain(){
72
+ load_plugin_textdomain( 'wpsr', FALSE, basename( dirname( __FILE__ ) ) . '/languages/' );
73
+ }
74
+
75
+ }
76
+
77
+ $wpsr = new WP_Socializer();
78
+
79
+ ?>