Taxonomy: Display term list table in full width if there is no edit form.
Makes sure there is no empty space when a user can manage terms but lacks the capability to edit terms. Props mathieuhays, marcwieland95. Fixes #43743. Built from https://develop.svn.wordpress.org/trunk@44515 git-svn-id: http://core.svn.wordpress.org/trunk@44346 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a595f8a525
commit
8f5e0ae06c
|
@ -354,14 +354,17 @@ endif;
|
|||
|
||||
</form>
|
||||
|
||||
<?php
|
||||
$can_edit_terms = current_user_can( $tax->cap->edit_terms );
|
||||
|
||||
if ( $can_edit_terms ) {
|
||||
?>
|
||||
<div id="col-container" class="wp-clearfix">
|
||||
|
||||
<div id="col-left">
|
||||
<div class="col-wrap">
|
||||
|
||||
<?php
|
||||
|
||||
if ( current_user_can( $tax->cap->edit_terms ) ) {
|
||||
if ( 'category' == $taxonomy ) {
|
||||
/**
|
||||
* Fires before the Add Category form.
|
||||
|
@ -559,13 +562,12 @@ if ( current_user_can( $tax->cap->edit_terms ) ) {
|
|||
do_action( "{$taxonomy}_add_form", $taxonomy );
|
||||
?>
|
||||
</form></div>
|
||||
<?php } ?>
|
||||
|
||||
</div>
|
||||
</div><!-- /col-left -->
|
||||
|
||||
<div id="col-right">
|
||||
<div class="col-wrap">
|
||||
<?php } ?>
|
||||
|
||||
<?php $wp_list_table->views(); ?>
|
||||
|
||||
|
@ -612,12 +614,15 @@ endif;
|
|||
* @param string $taxonomy The taxonomy name.
|
||||
*/
|
||||
do_action( "after-{$taxonomy}-table", $taxonomy );
|
||||
?>
|
||||
|
||||
if ( $can_edit_terms ) {
|
||||
?>
|
||||
</div>
|
||||
</div><!-- /col-right -->
|
||||
|
||||
</div><!-- /col-container -->
|
||||
<?php } ?>
|
||||
|
||||
</div><!-- /wrap -->
|
||||
|
||||
<?php if ( ! wp_is_mobile() ) : ?>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.1-alpha-44514';
|
||||
$wp_version = '5.1-alpha-44515';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue