Don't show the 'Preview Changes' button for a non-public post type. props intoxstudio, see #17609.

git-svn-id: https://develop.svn.wordpress.org/trunk@20667 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2012-05-01 17:52:08 +00:00
parent 52dea56cbe
commit e9ee18fa5a
1 changed files with 2 additions and 2 deletions

View File

@ -34,7 +34,7 @@ function post_submit_meta_box($post) {
<?php } ?>
<img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" class="ajax-loading" id="draft-ajax-loading" alt="" />
</div>
<?php if ( $post_type_object->public ) : ?>
<div id="preview-action">
<?php
if ( 'publish' == $post->post_status ) {
@ -51,7 +51,7 @@ if ( 'publish' == $post->post_status ) {
<a class="preview button" href="<?php echo $preview_link; ?>" target="wp-preview" id="post-preview" tabindex="4"><?php echo $preview_button; ?></a>
<input type="hidden" name="wp-preview" id="wp-preview" value="" />
</div>
<?php endif; // public post type ?>
<div class="clear"></div>
</div><?php // /minor-publishing-actions ?>