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

git-svn-id: http://svn.automattic.com/wordpress/trunk@18234 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith
2011-06-10 17:02:03 +00:00
parent b9f0a71e1d
commit 856c2742ca
4 changed files with 6 additions and 5 deletions
@@ -550,7 +550,7 @@ class WP_Posts_List_Table extends WP_List_Table {
if ( 'trash' == $post->post_status || !EMPTY_TRASH_DAYS )
$actions['delete'] = "<a class='submitdelete' title='" . esc_attr( __( 'Delete this item permanently' ) ) . "' href='" . get_delete_post_link( $post->ID, '', true ) . "'>" . __( 'Delete Permanently' ) . "</a>";
}
if ( $post_type_object->publicly_queryable ) {
if ( $post_type_object->public ) {
if ( in_array( $post->post_status, array( 'pending', 'draft' ) ) ) {
if ( $can_edit_post )
$actions['view'] = '<a href="' . esc_url( add_query_arg( 'preview', 'true', get_permalink( $post->ID ) ) ) . '" title="' . esc_attr( sprintf( __( 'Preview &#8220;%s&#8221;' ), $title ) ) . '" rel="permalink">' . __( 'Preview' ) . '</a>';
+1 -1
View File
@@ -16,7 +16,7 @@
* @return array Results.
*/
function wp_link_query( $args = array() ) {
$pts = get_post_types( array( 'publicly_queryable' => true ), 'objects' );
$pts = get_post_types( array( 'public' => true ), 'objects' );
$pt_names = array_keys( $pts );
$query = array(