Skip to content

Commit

Permalink
Merge pull request #49 from tlovett1/use-default-49
Browse files Browse the repository at this point in the history
Duplicate GUIDs by default
  • Loading branch information
danielbachhuber committed Feb 10, 2014
2 parents a1c6bf8 + 879d072 commit dcce66f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions safe-redirect-manager.php
Expand Up @@ -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 );
}
}
Expand Down

0 comments on commit dcce66f

Please sign in to comment.