Permalink
Browse files

Merge pull request #49 from tlovett1/use-default-49

Duplicate GUIDs by default
  • Loading branch information...
2 parents a1c6bf8 + 879d072 commit dcce66f95c2b522f4776bbad95e58a826306d9a8 @danielbachhuber danielbachhuber committed Feb 10, 2014
Showing with 5 additions and 0 deletions.
  1. +5 −0 safe-redirect-manager.php
View
5 safe-redirect-manager.php
@@ -944,6 +944,11 @@ public function filter_post_type_link( $permalink, $post ) {
if ( false !== strpos( $redirect_from, '*' ) )
return $permalink;
+ // Use default permalink if no $redirect_from exists - this prevents duplicate GUIDs
+ if ( empty( $redirect_from ) ) {
+ return $permalink;
+ }
+
return home_url( $redirect_from );
}
}

0 comments on commit dcce66f

Please sign in to comment.