?> excerpt-space<?php } ?> "> <?php if (sith_get_option('post_title_position')) { } else { ?> <?php get_template_part('includes/archives-meta'); ?> <?php } ?> <p> <?php echo sith_content_limit(get_the_excerpt(), $post_excerpt_limit); ?> </p> </div> <?php if (sith_get_option('archives_social')) { get_template_part('includes/single-share'); } // Get Share Button template ?> <div class="clear"></div> </article> <!-- .default-loop-post --> </div>
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"; } }