Created
August 15, 2011 06:37
-
-
Save alexkingorg/1145803 to your computer and use it in GitHub Desktop.
ShareThis WordPress Plugin customization
This file contains 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 | |
// customizations to have ShareThis nicely integrated into FavePersonal. | |
// step 1, disable auto-addition to posts | |
// this adds the ShareThis button to the post sidebar for content posts only | |
if (function_exists('st_makeEntries')) { | |
add_action('favepersonal_content_sidebar_after', 'sharethis_button'); | |
} | |
// this removes the JS from the head on pages that won't show the button | |
function akv3_remove_sharethis_js() { | |
if (!is_home() && !is_single()) { | |
remove_action('wp_head', 'st_widget_head'); | |
} | |
} | |
add_action('wp', 'akv3_remove_sharethis_js'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment