Last active
June 28, 2016 23:13
-
-
Save rfmeier/5672435 to your computer and use it in GitHub Desktop.
Remove Jetpack sharedaddy 'the_content' filter.
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 | |
//* do not include php tags | |
add_action( 'init', 'custom_init', 11 ); | |
/** | |
* Callback for WordPress 'init' action. | |
* | |
* Remove the 'the_content' filter callback added by sharedaddy | |
* to prevent the sharing links from being appended to the posts content. | |
* | |
* @see http://codex.wordpress.org/Plugin_API/Action_Reference/init | |
* | |
* @since 0.2 | |
* @author Ryan Meier <[email protected]> | |
* | |
* @return none | |
*/ | |
function custom_init() { | |
//* if sharing_display() function does not exist, return | |
if( ! function_exists( 'sharing_display' ) ) { | |
return; | |
} | |
//* remove the callback sharing_display() for the 'the_content' filter. | |
remove_filter( 'the_content', 'sharing_display', 19 ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment