Redirect to new permalink if slug changes. Fixes #1068

git-svn-id: https://develop.svn.wordpress.org/trunk@2988 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg 2005-11-05 22:57:56 +00:00
parent 5e3e5445e9
commit 114d19b144
1 changed files with 6 additions and 2 deletions

View File

@ -166,8 +166,12 @@ if ( 'publish' != $post->post_status || 0 == $post_ID ) {
<?php
}
?>
<input name="referredby" type="hidden" id="referredby" value="<?php echo wp_specialchars($_SERVER['HTTP_REFERER']); ?>" />
</p>
<input name="referredby" type="hidden" id="referredby" value="<?php
if ( url_to_postid($_SERVER['HTTP_REFERER']) == $post_ID )
echo 'redo';
else
echo wp_specialchars($_SERVER['HTTP_REFERER']);
?>" /></p>
<?php do_action('edit_form_advanced'); ?>