Make WordPress Core

Ticket #16956: 16956.7.diff

File 16956.7.diff, 1.1 KB (added by SergeyBiryukov, 9 years ago)
  • src/wp-admin/includes/class-wp-comments-list-table.php

     
    7878
    7979                $search = ( isset( $_REQUEST['s'] ) ) ? $_REQUEST['s'] : '';
    8080
    81                 $post_type = ( isset( $_REQUEST['post_type'] ) ) ? sanitize_key( $_REQUEST['post_type'] ) : '';
     81                $post_type = ( isset( $_REQUEST['post_type'] ) ) ? sanitize_key( $_REQUEST['post_type'] ) : get_post_types();
    8282
    8383                $user_id = ( isset( $_REQUEST['user_id'] ) ) ? $_REQUEST['user_id'] : '';
    8484
  • src/wp-admin/includes/dashboard.php

     
    796796
    797797        $comments_query = array(
    798798                'number' => $total_items * 5,
    799                 'offset' => 0
     799                'offset' => 0,
     800                'post_type' => get_post_types()
    800801        );
    801802        if ( ! current_user_can( 'edit_posts' ) )
    802803                $comments_query['status'] = 'approve';