0) ? absint($_GET['paged']) : 1;
$items_per_page = 25;
$start = ( $_GET['paged'] - 1 ) * $items_per_page;
$order = ( isset ( $_GET['order'] ) && $_GET['order'] == 'desc' ) ? 'DESC' : 'ASC';
$orderby = ( isset ( $_GET['orderby'] ) && ( in_array( $_GET['orderby'], array('gid', 'title', 'author') )) ) ? $_GET['orderby'] : 'gid';
$gallerylist = $nggdb->find_all_galleries( $orderby, $order , TRUE, $items_per_page, $start, false);
$wp_list_table = new _NGG_Galleries_List_Table('nggallery-manage-gallery');
?>
_screen = $screen;
$this->_columns = array() ;
add_filter( 'manage_' . $screen->id . '_columns', array( &$this, 'get_columns' ), 0 );
}
function get_column_info() {
$columns = get_column_headers( $this->_screen );
$hidden = get_hidden_columns( $this->_screen );
$_sortable = $this->get_sortable_columns();
foreach ( $_sortable as $id => $data ) {
if ( empty( $data ) )
continue;
$data = (array) $data;
if ( !isset( $data[1] ) )
$data[1] = false;
$sortable[$id] = $data;
}
return array( $columns, $hidden, $sortable );
}
// define the columns to display, the syntax is 'internal name' => 'display name'
function get_columns() {
$columns = array();
$columns['cb'] = '';
$columns['id'] = __('ID');
$columns['title'] = _n( 'Gallery', 'Galleries', 1, 'nggallery');
$columns['description'] = __('Description', 'nggallery');
$columns['author'] = __('Author', 'nggallery');
$columns['page_id'] = __('Page ID', 'nggallery');
$columns['quantity'] = _n( 'Image', 'Images', 2, 'nggallery' );
$columns = apply_filters('ngg_manage_gallery_columns', $columns);
return $columns;
}
function get_sortable_columns() {
return array(
'id' => array( 'gid', true ),
'title' => 'title',
'author' => 'author'
);
}
}
?>