PageRenderTime 101ms CodeModel.GetById 35ms RepoModel.GetById 0ms app.codeStats 0ms

/wp-content/plugins/sexybookmarks/includes/public.php

https://github.com/alx/Tetalab
PHP | 555 lines | 450 code | 51 blank | 54 comment | 114 complexity | 08bd2466315353eaf79ce777ee8e3172 MD5 | raw file
Possible License(s): GPL-3.0
  1. <?php
  2. // Functions related to mobile.
  3. require_once 'mobile.php';
  4. $sexy_is_mobile = sexy_is_mobile();
  5. $sexy_is_bot = sexy_is_bot();
  6. //cURL, file get contents or nothing, used for short url
  7. function sexy_nav_browse($url, $use_POST_method = false, $POST_data = null){
  8. if (function_exists('curl_init')) {
  9. // Use cURL
  10. $ch = curl_init();
  11. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  12. curl_setopt($ch, CURLOPT_URL, $url);
  13. if($use_POST_method){
  14. curl_setopt($ch, CURLOPT_POST, 1);
  15. curl_setopt($ch, CURLOPT_POSTFIELDS, $POST_data);
  16. }
  17. curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 2);
  18. curl_setopt($ch, CURLOPT_TIMEOUT, 3);
  19. $source = trim(curl_exec($ch));
  20. curl_close($ch);
  21. } elseif (function_exists('file_get_contents')) {
  22. // Use file_get_contents()
  23. $source = trim(file_get_contents($url));
  24. } else {
  25. $source = null;
  26. }
  27. return $source;
  28. }
  29. function sexy_get_fetch_url() {
  30. global $post, $sexy_plugopts; //globals
  31. //get link
  32. if($sexy_plugopts['position'] == 'manual') { $perms= 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'] . $_SERVER['QUERY_STRING']; }
  33. else { $perms = get_permalink(); }
  34. $perms = trim($perms);
  35. //if is post, and post is not published then return permalink and go back
  36. if($post && get_post_status($post->ID) != 'publish'){
  37. return $perms;
  38. }
  39. //check if the link is already genereted or not, if yes, then return the link
  40. $fetch_url = trim(get_post_meta($post->ID, '_sexybookmarks_shortUrl', true));
  41. if(!is_null($fetch_url) && md5($perms) == trim(get_post_meta($post->ID, '_sexybookmarks_permaHash', true))){
  42. return $fetch_url;
  43. }else{
  44. //some vars to be used later, so better set null values before
  45. $url_more = "";
  46. $use_POST_method = false;
  47. $POST_data = null;
  48. // Which short url service should be used?
  49. if($sexy_plugopts['shorty'] == "e7t") {
  50. //e7t.us no longer exists, this only here for backwards compatibility
  51. //to prevent users from having to update their short URLs if they had e7t.us selected
  52. $first_url = "http://b2l.me/api.php?alias=&url=".$perms;
  53. } elseif($sexy_plugopts['shorty'] == "b2l") {
  54. $first_url = "http://b2l.me/api.php?alias=&url=".$perms;
  55. } elseif($sexy_plugopts['shorty'] == "tiny") {
  56. $first_url = "http://tinyurl.com/api-create.php?url=".$perms;
  57. } elseif($sexy_plugopts['shorty'] == "snip") {
  58. $first_url = "http://snipr.com/site/getsnip";
  59. $use_POST_method = true;
  60. $POST_data = "snipformat=simple&sniplink=".rawurlencode($perms)."&snipuser=".$sexy_plugopts['shortyapi']['snip']['user']."&snipapi=".$sexy_plugopts['shortyapi']['snip']['key'];
  61. } elseif($sexy_plugopts['shorty'] == "cligs") {
  62. $first_url = "http://cli.gs/api/v1/cligs/create?url=".urlencode($perms)."&appid=sexy";
  63. if($sexy_plugopts['shortyapi']['cligs']['chk'] == 1){ //if user custom options are set
  64. $first_url .= "&key=".$sexy_plugopts['shortyapi']['cligs']['key'];
  65. }
  66. } elseif($sexy_plugopts['shorty'] == "supr") {
  67. $first_url = "http://su.pr/api/simpleshorten?url=".$perms;
  68. if($sexy_plugopts['shortyapi']['supr']['chk'] == 1){ //if user custom options are set
  69. $first_url .= "&login=".$sexy_plugopts['shortyapi']['supr']['user']."&apiKey=".$sexy_plugopts['shortyapi']['supr']['key'];
  70. }
  71. } elseif($sexy_plugopts['shorty'] == "bitly") {
  72. $first_url = "http://api.bit.ly/shorten?version=2.0.1&longUrl=".$perms."&history=1&login=".$sexy_plugopts['shortyapi']['bitly']['user']."&apiKey=".$sexy_plugopts['shortyapi']['bitly']['key']."&format=json";
  73. } elseif($sexy_plugopts['shorty'] == "trim"){
  74. if($sexy_plugopts['shortyapi']['trim']['chk'] == 1){ //if user custom options are set
  75. $first_url = "http://api.tr.im/api/trim_url.json?url=".$perms."&username=".$sexy_plugopts['shortyapi']['trim']['user']."&password=".$sexy_plugopts['shortyapi']['trim']['pass'];
  76. }else{
  77. $first_url = "http://api.tr.im/api/trim_simple?url=".$perms;
  78. }
  79. } elseif($sexy_plugopts['shorty'] == "tinyarrow") {
  80. $first_url = "http://tinyarro.ws/api-create.php?";
  81. if($sexy_plugopts['shortyapi']['tinyarrow']['chk'] == 1){ //if user custom options are set
  82. $first_url .= "&userid=".$sexy_plugopts['shortyapi']['tinyarrow']['user'];
  83. }
  84. $first_url .= "&url=".$perms;
  85. } elseif($sexy_plugopts['shorty'] == "tflp" && function_exists('permalink_to_twitter_link')) {
  86. $fetch_url = permalink_to_twitter_link($perms);
  87. } elseif($sexy_plugopts['shorty'] == "slly") {
  88. $first_url = "http://sl.ly/?module=ShortURL&file=Add&mode=API&url=".$perms;
  89. } else {
  90. //Default is b2l.me
  91. $first_url = "http://b2l.me/api.php?alias=&url=".$perms;
  92. }
  93. // Retrieve the shortened URL
  94. $fetch_url = trim(sexy_nav_browse($first_url, $use_POST_method, $POST_data)); //trim again
  95. //if trim or bitly, then decode the json string
  96. if($sexy_plugopts['shorty'] == "trim" && $sexy_plugopts['shortyapi']['trim']['chk'] == 1){
  97. $fetch_array = json_decode($fetch_url, true);
  98. $fetch_url = $fetch_array['url'];
  99. }
  100. if($sexy_plugopts['shorty'] == "bitly"){
  101. $fetch_array = json_decode($fetch_url, true);
  102. $fetch_url = $fetch_array['results'][$perms]['shortUrl'];
  103. }
  104. if (!empty($fetch_url)) {
  105. // Remote call made and was successful
  106. // Add/update values
  107. // Tries to update first, then add if field does not already exist
  108. if (!update_post_meta($post->ID, '_sexybookmarks_shortUrl', $fetch_url)) {
  109. add_post_meta($post->ID, '_sexybookmarks_shortUrl', $fetch_url);
  110. }
  111. if (!update_post_meta($post->ID, '_sexybookmarks_permaHash', md5($perms))) {
  112. add_post_meta($post->ID, '_sexybookmarks_permaHash', md5($perms));
  113. }
  114. } else {
  115. $fetch_url = $perms;
  116. }
  117. }
  118. return $fetch_url;
  119. }
  120. // Create an auto-insertion function
  121. function sexy_position_menu($post_content) {
  122. global $post, $sexy_plugopts, $sexy_is_mobile, $sexy_is_bot;
  123. // If user selected manual positioning, get out.
  124. if ($sexy_plugopts['position']=='manual') {
  125. return $post_content;
  126. }
  127. // If user selected hide from mobile and is mobile, get out.
  128. elseif ($sexy_plugopts['mobile-hide']=='yes' && false!==$sexy_is_mobile || $sexy_plugopts['mobile-hide']=='yes' && false!==$sexy_is_bot) {
  129. return $post_content;
  130. }
  131. // Decide whether or not to generate the bookmarks.
  132. if ((is_single() && false!==strpos($sexy_plugopts['pageorpost'],"post")) ||
  133. (is_page() && false!==strpos($sexy_plugopts['pageorpost'],"page")) ||
  134. (is_home() && false!==strpos($sexy_plugopts['pageorpost'],"index")) ||
  135. (is_feed() && !empty($sexy_plugopts['feed']))
  136. ) { // socials should be generated and added
  137. if(get_post_meta($post->ID, 'Hide SexyBookmarks')) {
  138. // Don't display SexyBookmarks
  139. }
  140. else {
  141. $socials=get_sexy();
  142. }
  143. }
  144. // Place of bookmarks and return w/ post content.
  145. if (empty($socials)) {
  146. return $post_content;
  147. } elseif ($sexy_plugopts['position']=='above') {
  148. return $socials.$post_content;
  149. } elseif ($sexy_plugopts['position']=='below') {
  150. return $post_content.$socials;
  151. } else { // some other unexpected error, don't do anything. return.
  152. error_log(__('an error occurred in SexyBookmarks', 'sexybookmarks'));
  153. return $post_content;
  154. }
  155. }
  156. // End sexy_position_menu...
  157. function get_sexy() {
  158. global $sexy_plugopts, $wp_query, $post;
  159. $post = $wp_query->post;
  160. if($sexy_plugopts['position'] == 'manual') {
  161. //Check if outside the loop
  162. if(empty($post->post_title)) {
  163. $perms= 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'] . $_SERVER['QUERY_STRING'];
  164. $title = get_bloginfo('name') . wp_title('-', false);
  165. $feedperms = strtolower('http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'] . $_SERVER['QUERY_STRING']);
  166. $mail_subject = urlencode(get_bloginfo('name') . wp_title('-', false));
  167. }
  168. //Otherwise, it must be inside the loop
  169. else {
  170. $perms = get_permalink($post->ID);
  171. $title = $post->post_title;
  172. $feedperms = strtolower($perms);
  173. $mail_subject = urlencode($post->post_title);
  174. }
  175. }
  176. //Check if index page...
  177. elseif(is_home() && false!==strpos($sexy_plugopts['pageorpost'],"index")) {
  178. //Check if outside the loop
  179. if(empty($post->post_title)) {
  180. $perms= 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'] . $_SERVER['QUERY_STRING'];
  181. $title = get_bloginfo('name') . wp_title('-', false);
  182. $feedperms = strtolower('http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'] . $_SERVER['QUERY_STRING']);
  183. $mail_subject = urlencode(get_bloginfo('name') . wp_title('-', false));
  184. }
  185. //Otherwise, it must be inside the loop
  186. else {
  187. $perms = get_permalink($post->ID);
  188. $title = $post->post_title;
  189. $feedperms = strtolower($perms);
  190. $mail_subject = urlencode($post->post_title);
  191. }
  192. }
  193. //Apparently isn't on index page...
  194. else {
  195. $perms = get_permalink($post->ID);
  196. $title = $post->post_title;
  197. $feedperms = strtolower($perms);
  198. $mail_subject = urlencode($post->post_title);
  199. }
  200. //Determine how to handle post titles for Twitter
  201. if (strlen($title) >= 80) {
  202. $short_title = urlencode(substr($title, 0, 80)."[..]");
  203. }
  204. else {
  205. $short_title = urlencode($title);
  206. }
  207. $title=urlencode($title);
  208. $sexy_content = urlencode(substr(strip_tags(strip_shortcodes(get_the_content())),0,300));
  209. $sexy_content = str_replace('+','%20',$sexy_content);
  210. $sexy_content = str_replace("&#8217;","'",$sexy_content);
  211. $post_summary = stripslashes($sexy_content);
  212. $site_name = get_bloginfo('name');
  213. $mail_subject = str_replace('+','%20',$mail_subject);
  214. $mail_subject = str_replace("&#8217;","'",$mail_subject);
  215. $y_cat = $sexy_plugopts['ybuzzcat'];
  216. $y_med = $sexy_plugopts['ybuzzmed'];
  217. $t_cat = $sexy_plugopts['twittcat'];
  218. // Fix for faulty insertion of TFLP function above
  219. if($sexy_plugopts['shorty'] == "tflp" && function_exists('permalink_to_twitter_link')) {
  220. $fetch_url = permalink_to_twitter_link($perms);
  221. }
  222. else {
  223. $fetch_url = sexy_get_fetch_url();
  224. }
  225. // Grab post tags for Twittley tags. If there aren't any, use default tags set in plugin options page
  226. // This doesn't seem to be working anymore, but not confirmed yet...
  227. $getkeywords = get_the_tags(); if ($getkeywords) { foreach($getkeywords as $tag) { $keywords=$keywords.$tag->name.','; } }
  228. if (!empty($getkeywords)) {
  229. $d_tags=substr($d_tags, 0, count($d_tags)-2);
  230. }
  231. else {
  232. $d_tags = $sexy_plugopts['defaulttags'];
  233. }
  234. // Check permalink setup for proper feed link
  235. if (false !== strpos($feedperms,'?') || false !== strpos($feedperms,'.php',strlen($feedperms) - 4)) {
  236. $feedstructure = '&feed=comments-rss2';
  237. } else {
  238. if ('/' == $feedperms[strlen($feedperms) - 1]) {
  239. $feedstructure = 'feed';
  240. }
  241. else {
  242. $feedstructure = '/feed';
  243. }
  244. }
  245. // Compatibility fix for NextGen Gallery Plugin...
  246. if( (strpos($post_summary, '[') || strpos($post_summary, ']')) ) {
  247. $post_summary = "";
  248. }
  249. if( (strpos($sexy_content, '[') || strpos($sexy_content,']')) ) {
  250. $sexy_content = "";
  251. }
  252. // Select the background image
  253. if(!isset($sexy_plugopts['bgimg-yes'])) {
  254. $bgchosen = '';
  255. } elseif($sexy_plugopts['bgimg'] == 'sexy') {
  256. $bgchosen = ' sexy-bookmarks-bg-sexy';
  257. } elseif($sexy_plugopts['bgimg'] == 'caring') {
  258. $bgchosen = ' sexy-bookmarks-bg-caring';
  259. } elseif($sexy_plugopts['bgimg'] == 'care-old') {
  260. $bgchosen = ' sexy-bookmarks-bg-caring-old';
  261. } elseif($sexy_plugopts['bgimg'] == 'love') {
  262. $bgchosen = ' sexy-bookmarks-bg-love';
  263. } elseif($sexy_plugopts['bgimg'] == 'wealth') {
  264. $bgchosen = ' sexy-bookmarks-bg-wealth';
  265. } elseif($sexy_plugopts['bgimg'] == 'enjoy') {
  266. $bgchosen = ' sexy-bookmarks-bg-enjoy';
  267. } elseif($sexy_plugopts['bgimg'] == 'german') {
  268. $bgchosen = ' sexy-bookmarks-bg-german';
  269. }
  270. // Do not add inline styles to the feed.
  271. $style=($sexy_plugopts['autocenter'])?'':' style="'.__($sexy_plugopts['xtrastyle']).'"';
  272. if (is_feed()) $style='';
  273. $expand=$sexy_plugopts['expand']?' sexy-bookmarks-expand':'';
  274. if ($sexy_plugopts['autocenter']==1) {
  275. $autocenter=' sexy-bookmarks-center';
  276. } elseif ($sexy_plugopts['autocenter']==2) {
  277. $autocenter=' sexy-bookmarks-spaced';
  278. } else {
  279. $autocenter='';
  280. }
  281. //Write the sexybookmarks menu
  282. $socials = "\n\n".'<!-- Begin SexyBookmarks Menu Code -->'."\n";
  283. $socials .= '<div class="sexy-bookmarks'.$expand.$autocenter.$bgchosen.'"'.$style.'>'."\n".'<ul class="socials">'."\n";
  284. foreach ($sexy_plugopts['bookmark'] as $name) {
  285. if ($name=='sexy-twitter') {
  286. $socials.=bookmark_list_item($name, array(
  287. 'post_by'=>(!empty($sexy_plugopts['twittid']))?"(via+@".$sexy_plugopts['twittid'].")":'',
  288. 'short_title'=>$short_title,
  289. 'fetch_url'=>$fetch_url,
  290. ));
  291. }
  292. elseif ($name=='sexy-blogengage') {
  293. $socials.=bookmark_list_item($name, array(
  294. 'permalink'=>$perms,
  295. ));
  296. }
  297. elseif ($name=='sexy-identica') {
  298. $socials.=bookmark_list_item($name, array(
  299. 'short_title'=>$short_title,
  300. 'fetch_url'=>$fetch_url,
  301. ));
  302. }
  303. elseif ($name=='sexy-mail') {
  304. $socials.=bookmark_list_item($name, array(
  305. 'title'=>$mail_subject,
  306. 'post_summary'=>$post_summary,
  307. 'permalink'=>$perms,
  308. ));
  309. }
  310. elseif ($name=='sexy-tomuse') {
  311. $socials.=bookmark_list_item($name, array(
  312. 'title'=>$mail_subject,
  313. 'post_summary'=>$post_summary,
  314. 'permalink'=>$perms,
  315. ));
  316. }
  317. elseif ($name=='sexy-diigo') {
  318. $socials.=bookmark_list_item($name, array(
  319. 'sexy_teaser'=>$sexy_content,
  320. 'permalink'=>$perms,
  321. 'title'=>$title,
  322. ));
  323. }
  324. elseif ($name=='sexy-linkedin') {
  325. $socials.=bookmark_list_item($name, array(
  326. 'post_summary'=>$post_summary,
  327. 'site_name'=>$site_name,
  328. 'permalink'=>$perms,
  329. 'title'=>$title,
  330. ));
  331. }
  332. elseif ($name=='sexy-devmarks') {
  333. $socials.=bookmark_list_item($name, array(
  334. 'post_summary'=>$post_summary,
  335. 'permalink'=>$perms,
  336. 'title'=>$title,
  337. ));
  338. }
  339. elseif ($name=='sexy-comfeed') {
  340. $socials.=bookmark_list_item($name, array(
  341. 'permalink'=>urldecode($feedperms).$feedstructure,
  342. ));
  343. }
  344. elseif ($name=='sexy-yahoobuzz') {
  345. $socials.=bookmark_list_item($name, array(
  346. 'permalink'=>$perms,
  347. 'title'=>$title,
  348. 'yahooteaser'=>$sexy_content,
  349. 'yahoocategory'=>$y_cat,
  350. 'yahoomediatype'=>$y_med,
  351. ));
  352. }
  353. elseif ($name=='sexy-twittley') {
  354. $socials.=bookmark_list_item($name, array(
  355. 'permalink'=>urlencode($perms),
  356. 'title'=>$title,
  357. 'post_summary'=>$post_summary,
  358. 'twitt_cat'=>$t_cat,
  359. 'default_tags'=>$d_tags,
  360. ));
  361. }
  362. elseif ($name=='sexy-designmoo') {
  363. $socials.=bookmark_list_item($name, array(
  364. 'post_summary'=>$post_summary,
  365. 'permalink'=>$perms,
  366. 'title'=>$title,
  367. ));
  368. }
  369. elseif ($name=='sexy-designbump') {
  370. $socials.=bookmark_list_item($name, array(
  371. 'post_summary'=>$post_summary,
  372. 'permalink'=>$perms,
  373. 'title'=>$title,
  374. ));
  375. }
  376. elseif ($name=='sexy-posterous') {
  377. $socials.=bookmark_list_item($name, array(
  378. 'post_summary'=>$post_summary,
  379. 'permalink'=>$perms,
  380. 'title'=>$title,
  381. ));
  382. }
  383. elseif ($name=='sexy-pingfm') {
  384. $socials.=bookmark_list_item($name, array(
  385. 'post_summary'=>$post_summary,
  386. 'permalink'=>$perms,
  387. 'title'=>$title,
  388. ));
  389. }
  390. elseif ($name=='sexy-nujij') {
  391. $socials.=bookmark_list_item($name, array(
  392. 'post_summary'=>$post_summary,
  393. 'permalink'=>$perms,
  394. 'title'=>$title,
  395. ));
  396. }
  397. elseif ($name=='sexy-ekudos') {
  398. $socials.=bookmark_list_item($name, array(
  399. 'post_summary'=>$post_summary,
  400. 'permalink'=>$perms,
  401. 'title'=>$title,
  402. ));
  403. }
  404. elseif ($name=='sexy-webblend') {
  405. $socials.=bookmark_list_item($name, array(
  406. 'post_summary'=>$post_summary,
  407. 'permalink'=>$perms,
  408. 'title'=>$title,
  409. ));
  410. }
  411. elseif ($name=='sexy-hyves') {
  412. $socials.=bookmark_list_item($name, array(
  413. 'post_summary'=>$post_summary,
  414. 'permalink'=>$perms,
  415. 'title'=>$title,
  416. ));
  417. }
  418. elseif ($name=='sexy-orkut') {
  419. $socials.=bookmark_list_item($name, array(
  420. 'post_summary'=>$post_summary,
  421. 'permalink'=>$perms,
  422. 'title'=>$title,
  423. ));
  424. }
  425. elseif ($name=='sexy-tumblr') {
  426. $socials.=bookmark_list_item($name, array(
  427. 'permalink'=>urlencode($perms),
  428. 'title'=>$title,
  429. ));
  430. }
  431. else {
  432. $socials.=bookmark_list_item($name, array(
  433. 'permalink'=>$perms,
  434. 'title'=>$title,
  435. ));
  436. }
  437. }
  438. $socials.='</ul>'."\n".'<div style="clear:both;"></div>'."\n".'</div>';
  439. $socials.="\n".'<!-- End SexyBookmarks Menu Code -->'."\n\n";
  440. return $socials;
  441. }
  442. // This function is what allows people to insert the menu wherever they please rather than above/below a post...
  443. function selfserv_sexy() {
  444. global $post;
  445. if(get_post_meta($post->ID, 'Hide SexyBookmarks')) {
  446. // Don't display SexyBookmarks
  447. }
  448. else {
  449. echo get_sexy();
  450. }
  451. }
  452. // Write the <head> code only on pages that the menu is set to display
  453. function sexy_publicStyles() {
  454. global $sexy_plugopts, $post;
  455. // If custom field is set, do not display sexybookmarks
  456. if(get_post_meta($post->ID, 'Hide SexyBookmarks')) {
  457. echo "\n\n".'<!-- '.__('SexyBookmarks has been disabled on this page', 'sexybookmarks').' -->'."\n\n";
  458. }
  459. // Else menu should be displayed
  460. else {
  461. echo "\n\n";
  462. // If custom mods option is checked, pull files from new location
  463. if ($sexy_plugopts['custom-mods'] == 'yes') {
  464. wp_enqueue_style('sexy-bookmarks', WP_CONTENT_URL.'/sexy-mods/css/style.css', false, SEXY_vNum, 'all');
  465. }
  466. // Else use original file locations
  467. else {
  468. wp_enqueue_style('sexy-bookmarks', SEXY_PLUGPATH.'css/style.css', false, SEXY_vNum, 'all');
  469. }
  470. }
  471. }
  472. function sexy_publicScripts() {
  473. global $sexy_plugopts, $post;
  474. // If any javascript dependent options are selected, load the scripts
  475. if ($sexy_plugopts['expand'] || $sexy_plugopts['autocenter'] || $sexy_plugopts['targetopt']=='_blank') {
  476. // If custom mods option is selected, pull files from new location
  477. if ($sexy_plugopts['custom-mods'] == 'yes') {
  478. // If jQuery compatibility fix is not selected, go ahead and load jQuery
  479. if (empty($sexy_plugopts['doNotIncludeJQuery'])) {
  480. wp_enqueue_script('sexy-bookmarks-public-js', WP_CONTENT_URL.'/sexy-mods/js/sexy-bookmarks-public.js', array('jquery'));
  481. }
  482. // Else do not load jQuery, probably due to the user's theme or additional plugins not loading it properly to begin with
  483. else {
  484. wp_enqueue_script('sexy-bookmarks-public-js', WP_CONTENT_URL.'/sexy-mods/js/sexy-bookmarks-public.js');
  485. }
  486. }
  487. // Custom mods not selected, load files from original location
  488. else {
  489. // If jQuery compatibility fix is not selected, go ahead and load jQuery
  490. if (empty($sexy_plugopts['doNotIncludeJQuery'])) {
  491. wp_enqueue_script('sexy-bookmarks-public-js', SEXY_PLUGPATH.'js/sexy-bookmarks-public.js', array('jquery'));
  492. }
  493. // Else do not load jQuery, probably due to the user's theme or additional plugins not loading it properly to begin with
  494. else {
  495. wp_enqueue_script('sexy-bookmarks-public-js', SEXY_PLUGPATH.'js/sexy-bookmarks-public.js');
  496. }
  497. }
  498. }
  499. }
  500. add_action('wp_print_styles', 'sexy_publicStyles');
  501. add_action('wp_print_scripts', 'sexy_publicScripts');
  502. // Hook the menu to "the_content"
  503. add_filter('the_content', 'sexy_position_menu');
  504. ?>