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

git-svn-id: http://svn.automattic.com/wordpress/trunk@20667 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2012-05-01 17:52:08 +00:00
parent f7ae4d41f6
commit 74eecbbdb7
1 changed files with 2 additions and 2 deletions

View File

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