Changeset 33104 for trunk/src/wp-admin/includes/class-wp-list-table.php
- Timestamp:
- 07/07/2015 03:11:54 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-list-table.php
r33016 r33104 833 833 */ 834 834 protected function get_default_primary_column_name() { 835 return ''; 835 $columns = $this->get_columns(); 836 $column = ''; 837 838 // We need a primary defined so responsive views show something, 839 // so let's fall back to the first non-checkbox column. 840 foreach( $columns as $col => $column_name ) { 841 if ( 'cb' === $col ) { 842 continue; 843 } 844 845 $column = $col; 846 break; 847 } 848 849 return $column; 836 850 } 837 851 … … 879 893 // Back-compat for list tables that have been manually setting $_column_headers for horse reasons. 880 894 // In 4.3, we added a fourth argument for primary column. 881 $column_headers = array( array(), array(), array(), '');895 $column_headers = array( array(), array(), array(), $this->get_primary_column_name() ); 882 896 foreach ( $this->_column_headers as $key => $value ) { 883 897 $column_headers[ $key ] = $value;
Note: See TracChangeset
for help on using the changeset viewer.