Changeset 707672
- Timestamp:
- 05/03/2013 10:40:22 PM (13 years ago)
- Location:
- link-icons/trunk
- Files:
-
- 3 edited
-
link-icon.php (modified) (1 diff)
-
link_icons_functions.php (modified) (3 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
link-icons/trunk/link-icon.php
r706940 r707672 5 5 Description: Link Icons adds icons to your links to indicate if it's to an external site, an image etc. 6 6 Author: Erik Bergh 7 Version: 0.3 7 Version: 0.3.1 8 8 Author URI: http://www.bergh.me 9 9 */ -
link-icons/trunk/link_icons_functions.php
r706940 r707672 2 2 function link_icons($content) 3 3 { 4 $D = new DOMDocument; 5 $content=mb_convert_encoding($content, 'HTML-ENTITIES', "UTF-8"); 6 $D->loadHTML($content); 7 processElement($D); 8 return $D->saveHTML(); 4 if(strlen($content)>1) 5 { 6 //error_log($content, 0); 7 $D = new DOMDocument; 8 $content=mb_convert_encoding($content, 'HTML-ENTITIES', "UTF-8"); 9 $D->loadHTML($content); 10 processElement($D); 11 return $D->saveHTML(); 12 } 9 13 } 10 14 … … 36 40 $linkURL = $url; 37 41 $header=get_headers($url,1); 42 38 43 $contentType=$header['Content-Type']; 44 45 if(is_array($contentType)) $contentType = $contentType[0]; 39 46 40 47 // is the link a directlink to an image? … … 55 62 56 63 // checking if it is a internal or external link 57 elseif(substr($linkURL,0,7)=="http://" )64 elseif(substr($linkURL,0,7)=="http://" || substr($linkURL,0,8)=="https://") 58 65 { 59 66 $linkURL=substr($linkURL,7,strlen($linkURL)-7); -
link-icons/trunk/readme.txt
r706949 r707672 2 2 Contributors: bergh 3 3 Donate link: 4 Tags: Link, Icons, External link 4 Tags: Link, Icons, External link, Image link, Video link 5 5 Requires at least: 3.3 6 6 Tested up to: 3.5.1 7 Stable tag: 0.3 7 Stable tag: 0.3.1 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 17 17 Link Icons does not connect to any external sites. 18 18 19 Since Link Icons use Http Header a caching plugin for your wordpress site is recomended. 19 Since Link Icons uses Http Header to check content type, using a caching plugin for your wordpress site is recomended. 20 21 22 = 0.3.1 = 23 24 * Fix for this http://wordpress.org/support/topic/i-will-come-back-later 25 * Fix for https-links 20 26 21 27 = 0.3 = … … 81 87 == Upgrade Notice == 82 88 83 * Ignores <a>-tags if it wraps an <img>.84 * Sets icons to links to URLs that return Image content type89 * Fix for this http://wordpress.org/support/topic/i-will-come-back-later 90 * Fix for https-links
Note: See TracChangeset
for help on using the changeset viewer.