From 9c8582d6814e7b18e1a972e268b954606caa3679 Mon Sep 17 00:00:00 2001 From: scribu Date: Wed, 1 Dec 2010 20:21:00 +0000 Subject: [PATCH] Don't show permalink box unless the post type is publicly queryable. Props filosofo. Fixes #14321 git-svn-id: http://svn.automattic.com/wordpress/trunk@16666 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/edit-form-advanced.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php index ef2ccb398..5106c2ea3 100644 --- a/wp-admin/edit-form-advanced.php +++ b/wp-admin/edit-form-advanced.php @@ -243,12 +243,12 @@ $side_meta_boxes = do_meta_boxes($post_type, 'side', $post);
ID); +$sample_permalink_html = ! empty( $post_type_object->publicly_queryable ) ? get_sample_permalink_html($post->ID) : ''; $shortlink = wp_get_shortlink($post->ID, 'post'); if ( !empty($shortlink) ) $sample_permalink_html .= '' . __('Get Shortlink') . ''; -if ( !( 'pending' == $post->post_status && !current_user_can( $post_type_object->cap->publish_posts ) ) ) { ?> +if ( ! empty( $post_type_object->publicly_queryable ) && ! ( 'pending' == $post->post_status && !current_user_can( $post_type_object->cap->publish_posts ) ) ) { ?>
ID) && ! empty($sample_permalink_html) && 'auto-draft' != $post->post_status )