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'); ?>

manage_page->pagination( 'top', $_GET['paged'], $nggdb->paged['total_objects'], $nggdb->paged['objects_per_page'] ); ?>
print_column_headers(true); ?> print_column_headers(false); ?> get_columns(); $hidden_columns = get_hidden_columns('nggallery-manage-gallery'); $num_columns = count($gallery_columns) - count($hidden_columns); foreach($gallerylist as $gallery) { $alternate = ( !isset($alternate) || $alternate == 'class="alternate"' ) ? '' : 'class="alternate"'; $gid = $gallery->gid; $name = (empty($gallery->title) ) ? $gallery->name : $gallery->title; $author_user = get_userdata( (int) $gallery->author ); ?> > $column_display_name) { $class = "class=\"$gallery_column_key column-$gallery_column_key\""; $style = ''; if ( in_array($gallery_column_key, $hidden_columns) ) $style = ' style="display:none;"'; $attributes = "$class$style"; switch ($gallery_column_key) { case 'cb' : ?> '; } ?>
' . __('No entries found', 'nggallery') . '
manage_page->pagination( 'bottom', $_GET['paged'], $nggdb->paged['total_objects'], $nggdb->paged['objects_per_page'] ); ?>
_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' ); } } ?>