Fix mistaken use of publicly_queryable when public was what was intended. props nacin. fixes #17040

git-svn-id: https://develop.svn.wordpress.org/trunk@18234 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith
2011-06-10 17:02:03 +00:00
parent 740272025b
commit 2aea6faf97
4 changed files with 6 additions and 5 deletions
+2 -2
View File
@@ -241,12 +241,12 @@ $side_meta_boxes = do_meta_boxes($post_type, 'side', $post);
</div>
<div class="inside">
<?php
$sample_permalink_html = ! empty( $post_type_object->publicly_queryable ) ? get_sample_permalink_html($post->ID) : '';
$sample_permalink_html = $post_type_object->public ? get_sample_permalink_html($post->ID) : '';
$shortlink = wp_get_shortlink($post->ID, 'post');
if ( !empty($shortlink) )
$sample_permalink_html .= '<input id="shortlink" type="hidden" value="' . esc_attr($shortlink) . '" /><a href="#" class="button" onclick="prompt(&#39;URL:&#39;, jQuery(\'#shortlink\').val()); return false;">' . __('Get Shortlink') . '</a>';
if ( ! empty( $post_type_object->publicly_queryable ) && ! ( 'pending' == $post->post_status && !current_user_can( $post_type_object->cap->publish_posts ) ) ) { ?>
if ( $post_type_object->public && ! ( 'pending' == $post->post_status && !current_user_can( $post_type_object->cap->publish_posts ) ) ) { ?>
<div id="edit-slug-box">
<?php
if ( ! empty($post->ID) && ! empty($sample_permalink_html) && 'auto-draft' != $post->post_status )