From 1a294648a8b326bccca4b26e8dfbf832fcf588df 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: https://develop.svn.wordpress.org/trunk@16666 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 ef2ccb398f..5106c2ea3c 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 )