Changeset 187907
- Timestamp:
- 12/29/2009 08:34:45 PM (16 years ago)
- Location:
- shorter-links/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (2 diffs)
-
shorter_links.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
shorter-links/trunk/readme.txt
r111336 r187907 4 4 Tags: revcanonical links url shorter shorturl 5 5 Requires at least: 2.5 6 Tested up to: 2. 7.97 Stable tag: 1. 46 Tested up to: 2.9 7 Stable tag: 1.5 8 8 9 9 This plugin creates rel="shorturl" link with a shorter URL in it, along with … … 71 71 == History == 72 72 73 **1.5 - 29 December 2009** 74 Support permalinks that start with /%category%/ 75 73 76 **1.4 - 14 April 2009** 74 77 Support rel="shorturl" as per [Robert Spychala's Short URL Auto-Discovery proposal](http://sites.google.com/a/snaplog.com/wiki/short_url). -
shorter-links/trunk/shorter_links.php
r111327 r187907 59 59 function akrabat_sl_redirect($query_vars) 60 60 { 61 // check if pagename matches a short url 62 if(!array_key_exists('pagename', $query_vars)) { 61 // check if pagename or category_name matches a short url 62 $shortUrl = ''; 63 if(array_key_exists('pagename', $query_vars)) { 64 $shortUrl = $query_vars['pagename']; 65 } 66 if(array_key_exists('category_name', $query_vars)) { 67 $shortUrl = $query_vars['category_name']; 68 } 69 if(!$shortUrl) { 63 70 return $query_vars; 64 71 } 65 72 66 $shortUrl = $query_vars['pagename'];67 73 if((int)$shortUrl > 0) { 68 74 wp_redirect(get_permalink($shortUrl));
Note: See TracChangeset
for help on using the changeset viewer.