Plugin Directory

Changeset 562916


Ignore:
Timestamp:
06/23/2012 02:47:27 PM (14 years ago)
Author:
akrabat
Message:

Fall back to REQUEST_URI

Location:
shorter-links/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • shorter-links/trunk/readme.txt

    r561032 r562916  
    55Requires at least: 3.0
    66Tested up to: 3.4
    7 Stable tag: 2.0.1
     7Stable tag: 2.0.2
    88
    99Override the default WordPress "shortlink" URL with one that
     
    6262
    6363
     64**2.0.2 - 23 June 2012**
     65Fall back to REQUEST_URI if there's nothing interesting in $query_vars.
     66
    6467**2.0.1 - 20 June 2012**
    6568Updated to handle 4 digit short links that look like a year to WordPress.
  • shorter-links/trunk/shorter_links.php

    r561032 r562916  
    44Plugin URI: http://wordpress.org/extend/plugins/shorter-links/
    55Description: Overrides WordPress' shortlink functionality to allow custom shortcodes per post.
    6 Version: 2.0.1
     6Version: 2.0.2
    77Author: Rob Allen
    88Author URI: http://akrabat.com
     
    2727            $shortLink = $query_vars['year'];
    2828        }
     29        if(empty($shortLink) && isset($_SERVER['REQUEST_URI'])) {
     30            $shortLink = trim($_SERVER['REQUEST_URI'], '/');
     31        }       
    2932        if (empty($shortLink)) {
    3033            return $query_vars;
Note: See TracChangeset for help on using the changeset viewer.