Created
March 17, 2017 22:06
-
-
Save H7-25/a6423419ba38daf11fc050db543baeb0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(is_single() AND get_post_type() == 'post' AND $pluginOptions['enabled'] == 1){ | |
function my_metaTags($content){ | |
global $post; | |
//echo '<pre>';print_r($post);echo '</pre>'; | |
return $post->post_content.'<div class="social-meta-tags-container"> | |
<div class="social-meta-tags-social social-meta-tags-facebook"> | |
<a target="_blank" href="https://www.facebook.com/sharer.php?u='.urlencode(post_permalink($post->ID)).'">Facebook</a> | |
<span></span></div> | |
<div class="social-meta-tags-social social-meta-tags-twitter"> | |
<a target="_blank" href="https://twitter.com/intent/tweet?text='.urlencode($post->post_title).'&url='.urlencode(post_permalink($post->ID)).'">Twitter</a> | |
<span></span> | |
</div> | |
<div class="social-meta-tags-social social-meta-tags-linkedin"> | |
<a target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&title='.urlencode($post->post_title).'&url='.urlencode(post_permalink($post->ID)).'&summary='.urlencode($post->post_excerpt).'">Linkedin</a> | |
<span></span></div> | |
<div class="social-meta-tags-social social-meta-tags-google"> | |
<a target="_blank" href="https://plus.google.com/share?url='.urlencode(post_permalink($post->ID)).'">Google</a> | |
<span></span> | |
</div> | |
</div>'; | |
} | |
add_action('the_content', 'my_metaTags'); | |
// self::get(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment