Created
October 3, 2016 19:45
-
-
Save dattard21/85d3b7c52375cb64b3affffedab5cca4 to your computer and use it in GitHub Desktop.
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 add_attribution_backlink( $content ) { | |
// Process content here and add the backlink | |
$backlink = ‘<div class=”attribution”>This article first appeared on <a href=”http://premium.wpmudev.org/blog”>WPMU Dev Blog</a></div>’; | |
$content = $content . $backlink; | |
return $content; | |
} | |
add_filter( 'content_save_pre', ‘add_attribution_backlink’, 10, 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment