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. git-svn-id: https://develop.svn.wordpress.org/trunk@44515 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
a8cb5d247e
commit
aa3be4873e
@ -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() ) : ?>
|
||||
|
Loading…
Reference in New Issue
Block a user