Changeset 149551
- Timestamp:
- 08/27/2009 08:12:19 AM (16 years ago)
- File:
-
- 1 edited
-
twitter-for-wordpress/trunk/twitter.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
twitter-for-wordpress/trunk/twitter.php
r133806 r149551 3 3 /* 4 4 Plugin Name: Twitter for Wordpress 5 Version: 1.9. 65 Version: 1.9.7 6 6 Plugin URI: http://rick.jinlabs.com/code/twitter 7 7 Description: Displays your public Twitter messages for all to read. Based on <a href="http://cavemonkey50.com/code/pownce/">Pownce for Wordpress</a> by <a href="http://cavemonkey50.com/">Cavemonkey50</a>. … … 113 113 114 114 function hyperlinks($text) { 115 // Props to Allen Shaw 115 // Props to Allen Shaw & webmancers.com 116 116 // match protocol://address/path/file.extension?some=variable&another=asf% 117 $text = preg_replace("/\b([a-zA-Z]+:\/\/[a-z][a-z0-9\_\.\-]*[a-z]{2,6}[a-zA-Z0-9\/\*\-\?\&\%]*)\b/i","<a href=\"$1\" class=\"twitter-link\">$1</a>", $text); 117 //$text = preg_replace("/\b([a-zA-Z]+:\/\/[a-z][a-z0-9\_\.\-]*[a-z]{2,6}[a-zA-Z0-9\/\*\-\?\&\%]*)\b/i","<a href=\"$1\" class=\"twitter-link\">$1</a>", $text); 118 $text = preg_replace('/\b([a-zA-Z]+:\/\/[\w_.\-]+\.[a-zA-Z]{2,6}[\/\w\-~.?=&%#+$*!]*)\b/i',"<a href=\"$1\" class=\"twitter-link\">$1</a>", $text); 118 119 // match www.something.domain/path/file.extension?some=variable&another=asf% 119 $text = preg_replace("/\b(www\.[a-z][a-z0-9\_\.\-]*[a-z]{2,6}[a-zA-Z0-9\/\*\-\?\&\%]*)\b/i","<a href=\"http://$1\" class=\"twitter-link\">$1</a>", $text); 120 //$text = preg_replace("/\b(www\.[a-z][a-z0-9\_\.\-]*[a-z]{2,6}[a-zA-Z0-9\/\*\-\?\&\%]*)\b/i","<a href=\"http://$1\" class=\"twitter-link\">$1</a>", $text); 121 $text = preg_replace('/\b(?<!:\/\/)(www\.[\w_.\-]+\.[a-zA-Z]{2,6}[\/\w\-~.?=&%#+$*!]*)\b/i',"<a href=\"http://$1\" class=\"twitter-link\">$1</a>", $text); 122 120 123 // match name@address 121 124 $text = preg_replace("/\b([a-zA-Z][a-zA-Z0-9\_\.\-]*[a-zA-Z]*\@[a-zA-Z][a-zA-Z0-9\_\.\-]*[a-zA-Z]{2,6})\b/i","<a href=\"mailto://$1\" class=\"twitter-link\">$1</a>", $text);
Note: See TracChangeset
for help on using the changeset viewer.