diff --git a/DefaultSortPlugin.php b/DefaultSortPlugin.php index 5119fd5..6ea582b 100644 --- a/DefaultSortPlugin.php +++ b/DefaultSortPlugin.php @@ -123,6 +123,12 @@ public function filterItemsBrowseParams($params) $exludedCollections = array(); $collectionId = null; + if (isset($params['collection'])) { + // When browsing items from a specific collection + $collectionId = $params['collection']; + $exludedCollections = unserialize(get_option('defaultsort_excluded_collections')); + } + // Browse Items if (array_key_exists('controller',$params) & array_key_exists('action',$params)) { if ($requestParams['controller'] == 'items' && $requestParams['action'] == 'browse') {