Make WordPress Core

Ticket #40188: 40188.diff

File 40188.diff, 1.3 KB (added by dinhtungdu, 8 years ago)
  • src/wp-admin/includes/class-wp-comments-list-table.php

     
    345345                                        'pings' => __( 'Pings' ),
    346346                                ) );
    347347
    348                                 foreach ( $comment_types as $type => $label )
    349                                         echo "\t" . '<option value="' . esc_attr( $type ) . '"' . selected( $comment_type, $type, false ) . ">$label</option>\n";
     348                                foreach ( $comment_types as $type => $label ) {
     349                                        if( get_comments(array('number' => 1, 'type' => $type))) {
     350                                                echo "\t" . '<option value="' . esc_attr( $type ) . '"' . selected( $comment_type, $type, false ) . ">$label</option>\n";
     351                                        }
     352                                }
    350353                        ?>
    351354                        </select>
    352355<?php
  • src/wp-admin/includes/class-wp-list-table.php

     
    11821182                <div class="alignleft actions bulkactions">
    11831183                        <?php $this->bulk_actions( $which ); ?>
    11841184                </div>
    1185                 <?php endif;
    1186                 $this->extra_tablenav( $which );
     1185                <?php $this->extra_tablenav( $which );
     1186                endif;
    11871187                $this->pagination( $which );
    11881188?>
    11891189