WordPress.org

Make WordPress Core

Changeset 18234


Ignore:
Timestamp:
06/10/11 17:02:03 (4 years ago)
Author:
markjaquith
Message:

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

Location:
trunk
Files:
4 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 
  • trunk/wp-admin/includes/class-wp-posts-list-table.php

    r18158 r18234  
    551551                        $actions['delete'] = "<a class='submitdelete' title='" . esc_attr( __( 'Delete this item permanently' ) ) . "' href='" . get_delete_post_link( $post->ID, '', true ) . "'>" . __( 'Delete Permanently' ) . "</a>"; 
    552552                } 
    553                 if ( $post_type_object->publicly_queryable ) { 
     553                if ( $post_type_object->public ) { 
    554554                    if ( in_array( $post->post_status, array( 'pending', 'draft' ) ) ) { 
    555555                        if ( $can_edit_post ) 
  • trunk/wp-admin/includes/internal-linking.php

    r18207 r18234  
    1717 */ 
    1818function wp_link_query( $args = array() ) { 
    19     $pts = get_post_types( array( 'publicly_queryable' => true ), 'objects' ); 
     19    $pts = get_post_types( array( 'public' => true ), 'objects' ); 
    2020    $pt_names = array_keys( $pts ); 
    2121 
  • trunk/wp-includes/post.php

    r18211 r18234  
    3232    register_post_type( 'page', array( 
    3333        'public' => true, 
     34        'publicly_queryable' => false, 
    3435        '_builtin' => true, /* internal use only. don't use this when registering your own post type. */ 
    3536        '_edit_link' => 'post.php?post=%d', /* internal use only. don't use this when registering your own post type. */ 
     
    42054206        $add_seconds_server = date('Z'); 
    42064207 
    4207         $post_types = get_post_types( array( 'publicly_queryable' => true ) ); 
     4208        $post_types = get_post_types( array( 'public' => true ) ); 
    42084209        array_walk( $post_types, array( &$wpdb, 'escape_by_ref' ) ); 
    42094210        $post_types = "'" . implode( "', '", $post_types ) . "'"; 
Note: See TracChangeset for help on using the changeset viewer.