Make WordPress Core


Ignore:
Timestamp:
01/29/2009 12:11:52 PM (16 years ago)
Author:
azaozz
Message:

Show the permalink even when not "pretty" and add "View Post" button if the post is published, see #8976

File:
1 edited

Legend:

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

    r10182 r10458  
    8181
    8282<div id="preview-action">
    83 <?php $preview_link = 'publish' == $post->post_status ? clean_url(get_permalink($post->ID)) : clean_url(apply_filters('preview_post_link', add_query_arg('preview', 'true', get_permalink($post->ID)))); ?>
    84 
    85 <a class="preview button" href="<?php echo $preview_link; ?>" target="wp-preview" id="post-preview" tabindex="4"><?php _e('Preview'); ?></a>
     83<?php
     84if ( 'publish' == $post->post_status ) {
     85    $preview_link = clean_url(get_permalink($post->ID));
     86    $preview_button = __('Preview Changes');
     87} else {
     88    $preview_link = clean_url(apply_filters('preview_post_link', add_query_arg('preview', 'true', get_permalink($post->ID))));
     89    $preview_button = __('Preview');
     90}
     91?>
     92<a class="preview button" href="<?php echo $preview_link; ?>" target="wp-preview" id="post-preview" tabindex="4"><?php echo $preview_button; ?></a>
    8693<input type="hidden" name="wp-preview" id="wp-preview" value="" />
    8794</div>
Note: See TracChangeset for help on using the changeset viewer.