_WP_List_Table_Compat

Helper class to be used only by back compat functions.

Defined (1)

The class is defined in the following location(s).

/wp-admin/includes/list-table.php  
  1. class _WP_List_Table_Compat extends WP_List_Table { 
  2. public $_screen; 
  3. public $_columns; 
  4.  
  5. public function __construct( $screen, $columns = array() ) { 
  6. if ( is_string( $screen ) ) 
  7. $screen = convert_to_screen( $screen ); 
  8.  
  9. $this->_screen = $screen; 
  10.  
  11. if ( !empty( $columns ) ) { 
  12. $this->_columns = $columns; 
  13. add_filter( 'manage_' . $screen->id . '_columns', array( $this, 'get_columns' ), 0 ); 
  14.  
  15. /** 
  16. * @access protected 
  17. * @return array 
  18. */ 
  19. protected function get_column_info() { 
  20. $columns = get_column_headers( $this->_screen ); 
  21. $hidden = get_hidden_columns( $this->_screen ); 
  22. $sortable = array(); 
  23. $primary = $this->get_default_primary_column_name(); 
  24.  
  25. return array( $columns, $hidden, $sortable, $primary ); 
  26.  
  27. /** 
  28. * @access public 
  29. * @return array 
  30. */ 
  31. public function get_columns() { 
  32. return $this->_columns;