Make WordPress Core

Ticket #37407: 37407.3.diff

File 37407.3.diff, 1.5 KB (added by swissspidy, 8 years ago)
  • src/wp-admin/includes/class-wp-posts-list-table.php

    diff --git src/wp-admin/includes/class-wp-posts-list-table.php src/wp-admin/includes/class-wp-posts-list-table.php
    index 983a274..714a491 100644
    class WP_Posts_List_Table extends WP_List_Table { 
    459459                <div class="alignleft actions">
    460460<?php
    461461                if ( 'top' === $which && !is_singular() ) {
     462                        ob_start();
    462463
    463464                        $this->months_dropdown( $this->screen->post_type );
    464465                        $this->categories_dropdown( $this->screen->post_type );
    class WP_Posts_List_Table extends WP_List_Table { 
    479480                         */
    480481                        do_action( 'restrict_manage_posts', $this->screen->post_type, $which );
    481482
    482                         submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
     483                        $output = ob_get_clean();
     484
     485                        if ( ! empty( $output ) ) {
     486                                echo $output;
     487                                submit_button( __( 'Filter' ), '', 'filter_action', false, array( 'id' => 'post-query-submit' ) );
     488                        }
    483489                }
    484490
    485491                if ( $this->is_trash && current_user_can( get_post_type_object( $this->screen->post_type )->cap->edit_others_posts ) ) {
    class WP_Posts_List_Table extends WP_List_Table { 
    15521558        <?php foreach ( $flat_taxonomies as $taxonomy ) : ?>
    15531559                <?php if ( current_user_can( $taxonomy->cap->assign_terms ) ) :
    15541560                        $taxonomy_name = esc_attr( $taxonomy->name );
    1555        
     1561
    15561562                        ?>
    15571563                        <label class="inline-edit-tags">
    15581564                                <span class="title"><?php echo esc_html( $taxonomy->labels->name ) ?></span>