Custom Post Type Permalinks - Version 0.6.1

Version Description

Download this release

Release Info

Developer Toro_Unit
Plugin Icon 128x128 Custom Post Type Permalinks
Version 0.6.1
Comparing to
See all releases

Code changes from version 0.6 to 0.6.1

Files changed (1) hide show
  1. custom-post-type-permalinks.php +5 -3
custom-post-type-permalinks.php CHANGED
@@ -5,7 +5,7 @@ Plugin URI: http://www.torounit.com
5
  Description: Add post archives of custom post type and customizable permalinks.
6
  Author: Toro-Unit
7
  Author URI: http://www.torounit.com
8
- Version: 0.6
9
  */
10
 
11
 
@@ -188,8 +188,10 @@ class Custom_Post_Type_Permalinks {
188
  $newlink = str_replace("%".$post->post_type."%", $post->post_type, $newlink);
189
  $newlink = str_replace("%".$post->post_type."_id%", $post->ID, $newlink);
190
  $newlink = str_replace("%".$post->post_type."name%", $post->post_name, $newlink);
191
-
192
- $newlink = str_replace("%author%", $post->post_author, $newlink);
 
 
193
 
194
 
195
 
5
  Description: Add post archives of custom post type and customizable permalinks.
6
  Author: Toro-Unit
7
  Author URI: http://www.torounit.com
8
+ Version: 0.6.1
9
  */
10
 
11
 
188
  $newlink = str_replace("%".$post->post_type."%", $post->post_type, $newlink);
189
  $newlink = str_replace("%".$post->post_type."_id%", $post->ID, $newlink);
190
  $newlink = str_replace("%".$post->post_type."name%", $post->post_name, $newlink);
191
+
192
+
193
+ $user = get_userdata($post->post_author);
194
+ $newlink = str_replace("%author%", $user->user_login, $newlink);
195
 
196
 
197