Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Use sharethis buttons with funeralpress
<?php
#hook into wordpress wp_head
add_action('wp_head','wpfh_custom_share_button_scripts');
#hook into above tabs in funeralpress
add_action('wpfh/obituary/above_tabs','wpfh_custom_share_button',10,2);
function wpfh_custom_share_button_scripts(){
echo '<script type="text/javascript">var switchTo5x=true;</script>
<script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>
<script type="text/javascript">stLight.options({publisher: "cb2aafde-2d8f-48b3-a3de-1758f702cdc1", doNotHash: false, doNotCopy: false, hashAddressBar: false});</script>';
}
function wpfh_custom_share_button($html ,$r){
$html .= "<span class='st_sharethis_large' displayText='ShareThis'></span>
<span class='st_facebook_large' displayText='Facebook'></span>
<span class='st_twitter_large' displayText='Tweet'></span>
<span class='st_linkedin_large' displayText='LinkedIn'></span>
<span class='st_pinterest_large' displayText='Pinterest'></span>
<span class='st_email_large' displayText='Email'></span>";
return $html;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment