Plugin Directory

Changeset 569345


Ignore:
Timestamp:
07/09/2012 11:25:21 AM (14 years ago)
Author:
akrabat
Message:

bug fix handling of archives

File:
1 edited

Legend:

Unmodified
Added
Removed
  • shorter-links/trunk/shorter_links.php

    r562916 r569345  
    44Plugin URI: http://wordpress.org/extend/plugins/shorter-links/
    55Description: Overrides WordPress' shortlink functionality to allow custom shortcodes per post.
    6 Version: 2.0.2
     6Version: 2.0.3
    77Author: Rob Allen
    88Author URI: http://akrabat.com
     
    3636        // try for permalink first
    3737        if (is_numeric($shortLink)) {
    38             $link = get_permalink($shortLink);
    39             if ($link) {
    40                 wp_redirect($link);
    41                 exit;
     38            $post = get_post( $shortLink);
     39            if ($post->post_status == 'publish') {
     40                $link = get_permalink($shortLink);
     41                if ($link) {
     42                    wp_redirect($link);
     43                    exit;
     44                }
    4245            }
    4346        }
Note: See TracChangeset for help on using the changeset viewer.