Edit permalink in place. Fixes #5679. Hat tip: nbachiyski.

git-svn-id: https://develop.svn.wordpress.org/trunk@6633 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg
2008-01-17 16:51:32 +00:00
parent 2b0713315f
commit 098e6672e4
7 changed files with 114 additions and 5 deletions

View File

@@ -70,7 +70,21 @@ addLoadEvent(focusit);
<div id="titlediv">
<h3><?php _e('Title') ?></h3>
<div class="inside"><input type="text" name="post_title" size="30" tabindex="1" value="<?php echo attribute_escape($post->post_title); ?>" id="title" /></div>
<div class="inside">
<input type="text" name="post_title" size="30" tabindex="1" value="<?php echo attribute_escape($post->post_title); ?>" id="title" />
<?php
$sample_permalink_html = get_sample_permalink_html($post->ID);
if ($post->ID && $sample_permalink_html):
?>
<div id="edit-slug-box" style="display: <?php echo $post->ID? 'block' : 'none';?>">
<strong><?php _e('Permalink:'); ?></strong>
<span id="sample-permalink"><?php echo $sample_permalink_html; ?></span>
<span id="edit-slug-buttons"><a href="#post_name" class="edit-slug" onclick="edit_permalink(<?php echo $post->ID; ?>);return false;"><?php _e('Edit');?></a></span>
</div>
<?php
endif;
?>
</div>
</div>
<div id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?>" class="postarea">
@@ -126,7 +140,7 @@ else
</div>
<p class="submit">
<input type="submit" name="submit" value="<?php _e('Save'); ?>" style="font-weight: bold;" tabindex="4" />
<input type="submit" name="save" value="<?php _e('Save'); ?>" style="font-weight: bold;" tabindex="4" />
<?php
if ( !in_array( $post->post_status, array('publish', 'future') ) || 0 == $post_ID ) {
?>