Last active
December 20, 2015 08:08
-
-
Save yuikns/6097988 to your computer and use it in GitHub Desktop.
WP_COPYRIGHT
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 | |
/** | |
*Plugin Name: Copyright | |
*Version: 0.1 | |
*Plugin URI: http://argcandargv.com | |
*Description: adding link for each single post at its first | |
*Author: Yu Jing | |
*Author URI: http://argcandargv.com/about | |
*/ | |
function Copyright($outer){ | |
if(!is_singular()){ return $outer; } | |
global $post; | |
$tmp = "<h4>Permalink : <a href='" | |
. get_permalink($post->ID)."'> " | |
. get_permalink($post->ID)."</a> </h4>"; | |
$outer = $tmp.$outer; | |
return $outer; | |
} | |
add_filter('the_content', 'Copyright'); | |
//add_filter('the_content', 'Code_Is_Life_Copyright',11);// the bigger the number is ,the latter .. | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment