Skip to content

Instantly share code, notes, and snippets.

@anthonysbrown
Last active April 7, 2016 14:43
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anthonysbrown/112fa4043a05011fd071b407383273b8 to your computer and use it in GitHub Desktop.
Save anthonysbrown/112fa4043a05011fd071b407383273b8 to your computer and use it in GitHub Desktop.
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