Changeset 569345
- Timestamp:
- 07/09/2012 11:25:21 AM (14 years ago)
- File:
-
- 1 edited
-
shorter-links/trunk/shorter_links.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
shorter-links/trunk/shorter_links.php
r562916 r569345 4 4 Plugin URI: http://wordpress.org/extend/plugins/shorter-links/ 5 5 Description: Overrides WordPress' shortlink functionality to allow custom shortcodes per post. 6 Version: 2.0. 26 Version: 2.0.3 7 7 Author: Rob Allen 8 8 Author URI: http://akrabat.com … … 36 36 // try for permalink first 37 37 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 } 42 45 } 43 46 }
Note: See TracChangeset
for help on using the changeset viewer.