Last active
April 7, 2016 14:43
-
-
Save anthonysbrown/112fa4043a05011fd071b407383273b8 to your computer and use it in GitHub Desktop.
Use sharethis buttons with funeralpress
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
<?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