_NGG_Galleries_List_Table

Construtor class to create the table layout.

Defined (1)

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

/products/photocrati_nextgen/modules/ngglegacy/admin/manage-galleries.php  
  1. class _NGG_Galleries_List_Table extends WP_List_Table { 
  2. var $_screen; 
  3. var $_columns; 
  4.  
  5. function __construct($screen) 
  6. if ( is_string( $screen ) ) 
  7. $screen = convert_to_screen( $screen ); 
  8.  
  9. $this->_screen = $screen; 
  10. $this->_columns = array() ; 
  11.  
  12. add_filter( 'manage_' . $screen->id . '_columns', array( &$this, 'get_columns' ), 0 ); 
  13.  
  14. function get_column_info() { 
  15. $columns = get_column_headers( $this->_screen ); 
  16. $hidden = get_hidden_columns( $this->_screen ); 
  17. $_sortable = $this->get_sortable_columns(); 
  18.  
  19. foreach ( $_sortable as $id => $data ) { 
  20. if ( empty( $data ) ) 
  21. continue; 
  22.  
  23. $data = (array) $data; 
  24. if ( !isset( $data[1] ) ) 
  25. $data[1] = false; 
  26.  
  27. $sortable[$id] = $data; 
  28.  
  29. return array( $columns, $hidden, $sortable, null ); 
  30.  
  31. // define the columns to display, the syntax is 'internal name' => 'display name' 
  32. function get_columns() { 
  33. $columns = array(); 
  34.  
  35. $columns['cb'] = '<input name="checkall" type="checkbox" onclick="checkAll(document.getElementById(\'editgalleries\'));" />'; 
  36. $columns['id'] = __('ID'); 
  37. $columns['title'] = _n( 'Gallery', 'Galleries', 1, 'nggallery'); 
  38. $columns['description'] = __('Description', 'nggallery'); 
  39. $columns['author'] = __('Author', 'nggallery'); 
  40. $columns['page_id'] = __('Page ID', 'nggallery'); 
  41. $columns['quantity'] = _n( 'Image', 'Images', 2, 'nggallery' ); 
  42.  
  43. $columns = apply_filters('ngg_manage_gallery_columns', $columns); 
  44.  
  45. return $columns; 
  46.  
  47. function get_sortable_columns() { 
  48. return array( 
  49. 'id' => array( 'gid', true ),  
  50. 'title' => 'title',  
  51. 'author' => 'author' 
  52. );