Make WordPress Core

Changeset 44515


Ignore:
Timestamp:
01/09/2019 12:04:32 PM (6 years ago)
Author:
swissspidy
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/edit-tags.php

    r43666 r44515  
    355355</form>
    356356
     357<?php
     358$can_edit_terms = current_user_can( $tax->cap->edit_terms );
     359
     360if ( $can_edit_terms ) {
     361?>
    357362<div id="col-container" class="wp-clearfix">
    358363
     
    361366
    362367<?php
    363 
    364 if ( current_user_can( $tax->cap->edit_terms ) ) {
    365368    if ( 'category' == $taxonomy ) {
    366369        /**
     
    560563    ?>
    561564</form></div>
    562 <?php } ?>
    563 
    564565</div>
    565566</div><!-- /col-left -->
     
    567568<div id="col-right">
    568569<div class="col-wrap">
     570<?php } ?>
    569571
    570572<?php $wp_list_table->views(); ?>
     
    613615 */
    614616do_action( "after-{$taxonomy}-table", $taxonomy );
     617
     618if ( $can_edit_terms ) {
    615619?>
    616 
    617620</div>
    618621</div><!-- /col-right -->
    619622
    620623</div><!-- /col-container -->
     624<?php } ?>
     625
    621626</div><!-- /wrap -->
    622627
Note: See TracChangeset for help on using the changeset viewer.