Created
April 24, 2012 14:30
-
-
Save rupert-ong/2480116 to your computer and use it in GitHub Desktop.
Wordpress: Copyright Feed
This file contains hidden or 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 | |
function feed_copyright_disclaimer($content) { | |
if(is_feed()) { | |
$permalink = get_permalink(); | |
$author = get_the_author(); | |
$title = get_bloginfo('name'); | |
$output = '<p>This post is originally written by ' . $author . ' at <a href="' . $title . '">' . $permalink . '</a>. Please respect his authoritah.</p>'; | |
$content = $content.$output; | |
} | |
return $content; | |
} | |
add_filter('the_content','feed_copyright_disclaimer'); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment