Make WordPress Core


Ignore:
Timestamp:
01/17/2008 04:51:32 PM (17 years ago)
Author:
matt
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-form-advanced.php

    r6625 r6633  
    7171<div id="titlediv">
    7272<h3><?php _e('Title') ?></h3>
    73 <div class="inside"><input type="text" name="post_title" size="30" tabindex="1" value="<?php echo attribute_escape($post->post_title); ?>" id="title" /></div>
     73<div class="inside">
     74    <input type="text" name="post_title" size="30" tabindex="1" value="<?php echo attribute_escape($post->post_title); ?>" id="title" />
     75<?php
     76    $sample_permalink_html = get_sample_permalink_html($post->ID);
     77    if ($post->ID && $sample_permalink_html):
     78?>
     79    <div id="edit-slug-box" style="display: <?php echo $post->ID? 'block' : 'none';?>">
     80        <strong><?php _e('Permalink:'); ?></strong>
     81        <span id="sample-permalink"><?php echo $sample_permalink_html; ?></span>
     82        <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>
     83    </div>
     84<?php
     85    endif;
     86    ?>
     87</div>
    7488</div>
    7589
     
    127141
    128142<p class="submit">
    129 <input type="submit" name="submit" value="<?php _e('Save'); ?>" style="font-weight: bold;" tabindex="4" />
     143<input type="submit" name="save" value="<?php _e('Save'); ?>" style="font-weight: bold;" tabindex="4" />
    130144<?php
    131145if ( !in_array( $post->post_status, array('publish', 'future') ) || 0 == $post_ID ) {
Note: See TracChangeset for help on using the changeset viewer.