Created
February 27, 2014 00:03
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 | |
function replace_text_wps($text){ | |
$replace = array( | |
// Choose the words to replace & what to replace it with | |
'plugindrawer' => '<a href="http://plugindrawer.com/myafflink">plugindrawer</a>', | |
'backupbuddy' => '<a href="http://ithemes.com/myafflink">backupbuddy</a>' | |
); | |
$text = str_replace(array_keys($replace), $replace, $text); | |
return $text; | |
} | |
add_filter('the_content', 'replace_text_wps'); | |
add_filter('the_excerpt', 'replace_text_wps'); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment