Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // 1. Insert before the_content() function:
- private function cleanReplace($find, $replace, $string){
- for($i=0; $i < count($find); $i++)
- $string = substr_replace($string, $replace[$i], strpos($string, $find[$i]), strlen($find[$i]));
- return $string;
- }
- // 2. Insert after 'for ($i = 0; $i < count($matches); $i++) {}' loop in the_content() function:
- $content = $this->cleanReplace($find,$replace,$content);
- // 3. Instead of str_replace($find, $replace, $content) in the 'else { switch ( $this->options['position'] ) {... } }' statement simply use:
- $content
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement