WordPress.org

Make WordPress Core

Ticket #16196: garyc40.16196.2.diff

File garyc40.16196.2.diff, 2.9 KB (added by garyc40, 3 years ago)

also fix empty (hidden) tablenav on themes.php when total_pages <= 1

  • wp-admin/css/wp-admin.dev.css

    diff --git wp-admin/css/wp-admin.dev.css wp-admin/css/wp-admin.dev.css
    index 4ffac69..5202ada 100644
    span.imgedit-scale-warn { 
    35803580  16.0 - Themes 
    35813581------------------------------------------------------------------------------*/ 
    35823582 
     3583.theme-install-php .tablenav { 
     3584        height:auto; 
     3585} 
     3586 
    35833587table#availablethemes { 
    35843588        border-spacing: 0; 
    35853589        border-width: 1px 0; 
    table#availablethemes { 
    35883592        width: 100%; 
    35893593} 
    35903594 
     3595table#availablethemes .no-items td{ 
     3596        border-width:0; 
     3597        padding:5px; 
     3598} 
     3599 
    35913600td.available-theme { 
    35923601        vertical-align: top; 
    35933602        width: 240px; 
  • wp-admin/includes/class-wp-theme-install-list-table.php

    diff --git wp-admin/includes/class-wp-theme-install-list-table.php wp-admin/includes/class-wp-theme-install-list-table.php
    index 9dc4d34..d3d3069 100644
    class WP_Theme_Install_List_Table extends WP_List_Table { 
    140140 
    141141                <table id="availablethemes" cellspacing="0" cellpadding="0"> 
    142142                        <tbody id="the-list" class="list:themes"> 
    143                                 <?php $this->display_rows(); ?> 
     143                                <?php $this->display_rows_or_placeholder(); ?> 
    144144                        </tbody> 
    145145                </table> 
    146146 
  • wp-admin/includes/class-wp-themes-list-table.php

    diff --git wp-admin/includes/class-wp-themes-list-table.php wp-admin/includes/class-wp-themes-list-table.php
    index 97ae61c..99c464d 100644
    class WP_Themes_List_Table extends WP_List_Table { 
    8383                printf( __( 'Only the current theme is available to you. Contact the %s administrator for information about accessing additional themes.' ), get_site_option( 'site_name' ) ); 
    8484        } 
    8585 
     86        function tablenav( $which = 'top' ) { 
     87                if ( $this->get_pagination_arg( 'total_pages' ) <= 1 ) 
     88                        return; 
     89                ?> 
     90                <div class="tablenav <?php echo $which; ?>"> 
     91                        <?php $this->pagination( $which ); ?> 
     92                        <img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" class="ajax-loading list-ajax-loading" alt="" /> 
     93                        <br class="clear" /> 
     94                </div> 
     95                <?php 
     96        } 
     97 
    8698        function display() { 
    8799 
    88100                wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' ); 
    89101?> 
    90                 <div class="tablenav top"> 
    91                         <?php $this->pagination( 'top' ); ?> 
    92                         <img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" class="ajax-loading list-ajax-loading" alt="" /> 
    93                         <br class="clear" /> 
    94                 </div> 
     102                <?php $this->tablenav( 'top' ); ?> 
    95103 
    96104                <table id="availablethemes" cellspacing="0" cellpadding="0"> 
    97105                        <tbody id="the-list" class="list:themes"> 
    98                                 <?php $this->display_rows(); ?> 
     106                                <?php $this->display_rows_or_placeholder(); ?> 
    99107                        </tbody> 
    100108                </table> 
    101109 
    102                 <div class="tablenav bottom"> 
    103                         <?php $this->pagination( 'bottom' ); ?> 
    104                         <img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" class="ajax-loading list-ajax-loading" alt="" /> 
    105                         <br class="clear" /> 
    106                 </div> 
     110                <?php $this->tablenav( 'bottom' ); ?> 
    107111<?php 
    108112        } 
    109113