Skip to content

Instantly share code, notes, and snippets.

@rfmeier
Last active June 28, 2016 23:13
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save rfmeier/5672435 to your computer and use it in GitHub Desktop.
Save rfmeier/5672435 to your computer and use it in GitHub Desktop.
Remove Jetpack sharedaddy 'the_content' filter.
<?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 <rfmeier@gmail.com>
*
* @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