I’ve checked in an update that adds two filters to control this: ngg_manage_galleries_items_order and ngg_manage_galleries_items_orderby. They’ll be controllable with the following:
add_filter('ngg_manage_galleries_items_orderby', 'set_ngg_orderby');
add_filter('ngg_manage_galleries_items_order', 'set_ngg_order');
}
function set_ngg_order($order) {
return 'DESC';
}
function set_ngg_orderby($orderby) {
return 'gid';
}
This is the first update post-NextGen 2.1.7 so while it will get released there may be a wait before it is out.
The following change to nextgen-gallery/products/photocrati_nextgen/modules/ngglegacy/admin/manage-galleries.php can be applied however:
- $order = ( isset ( $_GET['order'] ) && $_GET['order'] == 'desc' ) ? 'DESC' : 'ASC';
- $orderby = ( isset ( $_GET['orderby'] ) && ( in_array( $_GET['orderby'], array('gid', 'title', 'author') )) ) ? $_GET['orderby'] : 'gid';
+ if (!empty($_GET['order']) && in_array($_GET['order'], array('DESC', 'ASC')))
+ $order = $_GET['order'];
+ else
+ $order = apply_filters('ngg_manage_galleries_items_order', 'ASC');
+
+ if (!empty($_GET['orderby']) && in_array($_GET['orderby'], array('gid', 'title', 'author')))
+ $orderby = $_GET['orderby'];
+ else
+ $orderby = apply_filters('ngg_manage_galleries_items_orderby', 'gid');