Support » Plugins and Hacks » [Request] A Plugin Which Will Suffix All the URL with something

Viewing 2 replies - 1 through 2 (of 2 total)
  • I have written following code

    function wp_external_links($text) {
    
    	$pattern = '/<a (.*?)href="(.*?)\/\/(.*?)"(.*?)>(.*?)<\/a>/';
    	$text= preg_replace_callback($pattern,'parse_external_links',$text);
    
    	return $text;
    }

    It does nothing. Here I am trying to replace all the occurence of <a href= with a prefix.

    it worked. Great. But not how I wanted. But still I can work on it now. Thanks for efforts.

    If someone can develop this into a real plugin with some admin options please do. Its a nice idea. 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Request] A Plugin Which Will Suffix All the URL with something’ is closed to new replies.