WordPress.org

Make WordPress Core

Ticket #25408: 25408-list-table-headers-test.2.diff

File 25408-list-table-headers-test.2.diff, 646 bytes (added by stephdau, 6 years ago)

An alternative to 25408-list-table-headers-test.diff, if we wanted to future-proof things a bit.

  • src/wp-admin/includes/class-wp-list-table.php

     
    850850         * @return array
    851851         */
    852852        protected function get_column_info() {
    853                 if ( isset( $this->_column_headers ) )
     853                if ( isset( $this->_column_headers ) && is_array( $this->_column_headers ) && count( $this->_column_headers ) >= 4 ) {
    854854                        return $this->_column_headers;
     855                }
    855856
    856857                $columns = get_column_headers( $this->screen );
    857858                $hidden = get_hidden_columns( $this->screen );