Make WordPress Core


Ignore:
Timestamp:
06/10/2011 05:02:03 PM (15 years ago)
Author:
markjaquith
Message:

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

File:
1 edited

Legend:

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

    r18112 r18234  
    242242<div class="inside">
    243243<?php
    244 $sample_permalink_html = ! empty( $post_type_object->publicly_queryable ) ? get_sample_permalink_html($post->ID) : '';
     244$sample_permalink_html = $post_type_object->public ? get_sample_permalink_html($post->ID) : '';
    245245$shortlink = wp_get_shortlink($post->ID, 'post');
    246246if ( !empty($shortlink) )
    247247    $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>';
    248248
    249 if ( ! empty( $post_type_object->publicly_queryable ) && ! ( 'pending' == $post->post_status && !current_user_can( $post_type_object->cap->publish_posts ) ) ) { ?>
     249if ( $post_type_object->public && ! ( 'pending' == $post->post_status && !current_user_can( $post_type_object->cap->publish_posts ) ) ) { ?>
    250250        <div id="edit-slug-box">
    251251        <?php
Note: See TracChangeset for help on using the changeset viewer.