Posts: Remove the slug from Quick Edit for CPTs with publicly_queryable disabled.

In the full edit screen, CPTs that have disabled the `publicly_queryable` option will hide the slug field, as it doesn't need to be edited. This change brings the Quick Edit view into line with that behaviour.

Props bhargavmehta, krutidugade.
Fixes #43278.


Built from https://develop.svn.wordpress.org/trunk@43664


git-svn-id: http://core.svn.wordpress.org/trunk@43493 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Gary Pendergast 2018-10-02 15:53:23 +00:00
parent dd1cc2683e
commit 3740085e9f
2 changed files with 5 additions and 2 deletions

View File

@ -1458,12 +1458,15 @@ class WP_Posts_List_Table extends WP_List_Table {
<span class="input-text-wrap"><input type="text" name="post_title" class="ptitle" value="" /></span>
</label>
<?php if ( $post_type_object->publicly_queryable ) : // publicly_queryable check ?>
<label>
<span class="title"><?php _e( 'Slug' ); ?></span>
<span class="input-text-wrap"><input type="text" name="post_name" value="" /></span>
</label>
<?php
<?php
endif; // publicly_queryable check
endif; // $bulk
endif; // post_type_supports title
?>

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.0-alpha-43663';
$wp_version = '5.0-alpha-43664';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.