Created
August 25, 2016 22:42
-
-
Save sarahmonster/c9bdee29cf9f2d96ac58d909ff68c59a to your computer and use it in GitHub Desktop.
Remove (and optionally re-add) sharing links on WordPress.com
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 sharing_display( '', true ); ?> |
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
function tilt_jptweak_remove_share() { | |
remove_filter( 'post_flair', 'sharing_display', 20 ); | |
remove_filter( 'the_content', 'sharing_display', 19 ); | |
remove_filter( 'the_excerpt', 'sharing_display', 19 ); | |
if ( class_exists( 'Jetpack_Likes' ) ) { | |
remove_filter( 'post_flair', array( Jetpack_Likes::init(), 'post_likes' ), 30, 1 ); | |
remove_filter( 'the_content', array( Jetpack_Likes::init(), 'post_likes' ), 30, 1 ); | |
} | |
} | |
add_action( 'loop_start', 'tilt_jptweak_remove_share' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment