Created
May 23, 2012 22:48
-
-
Save pedroelsner/2778319 to your computer and use it in GitHub Desktop.
#2 - Plugin WordPress - Hello Word
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 | |
/** | |
* Função que adiciona o texto "Hello World!" ao conteudo do post | |
* | |
* @param string $content | |
* @return string | |
*/ | |
function hello_world_content_filter ( $content ) { | |
$content .= '<strong>Hello World!</strong>'; | |
return $content; | |
} | |
// Cria o hook para ligar esta função ao filter the_content | |
add_filter( 'the_content', 'hello_world_content_filter' ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment