</script> </li> <?php } ?> <?php if (sith_get_option('share_linkdin')) { ?> <li><script src="http://platform.linkedin.com/in.js" type="text/javascript"></script><script type="IN/Share" data-url="<?php the_permalink(); ?> " data-counter="right"></script></li> <?php } ?> <?php if (sith_get_option('share_pinterest')) { ?> <li style="width:80px;"><script type="text/javascript" src="http://assets.pinterest.com/js/pinit.js"></script><a href="http://pinterest.com/pin/create/button/?url=<?php the_permalink(); ?> &media=<?php echo sith_thumb_src('slider'); ?> " class="pin-it-button" count-layout="horizontal"><img border="0" src="http://assets.pinterest.com/images/PinExt.png" title="Pin It" /></a></li> <?php } ?> </ul> <div class="clear"></div> </div> <!-- .share-post -->
function sith_og_data() { global $post; if (function_exists("has_post_thumbnail") && has_post_thumbnail()) { $post_thumb = sith_thumb_src('slider'); } else { $get_meta = get_post_custom($post->ID); if (!empty($get_meta["sith_video_url"][0])) { $video_url = $get_meta["sith_video_url"][0]; $video_link = @parse_url($video_url); if ($video_link['host'] == 'www.youtube.com' || $video_link['host'] == 'youtube.com') { parse_str(@parse_url($video_url, PHP_URL_QUERY), $my_array_of_vars); $video = $my_array_of_vars['v']; $post_thumb = 'http://img.youtube.com/vi/' . $video . '/0.jpg'; } elseif ($video_link['host'] == 'www.vimeo.com' || $video_link['host'] == 'vimeo.com') { $video = (int) substr(@parse_url($video_url, PHP_URL_PATH), 1); $url = 'http://vimeo.com/api/v2/video/' . $video . '.php'; $contents = @file_get_contents($url); $thumb = @unserialize(trim($contents)); $post_thumb = $thumb[0]['thumbnail_large']; } } } //echo $post->post_content; $description = htmlspecialchars(strip_tags(strip_shortcodes($post->post_content))); ?> <meta property="og:title" content="<?php the_title(); ?> "/> <meta property="og:type" content="article"/> <meta property="og:description" content="<?php echo sith_content_limit($description, 100); ?> "/> <meta property="og:url" content="<?php the_permalink(); ?> "/> <meta property="og:site_name" content="<?php echo get_bloginfo('name'); ?> "/> <?php if (!empty($post_thumb)) { echo '<meta property="og:image" content="' . $post_thumb . '" />' . "\n"; } }