Created
July 16, 2013 08:28
-
-
Save stborchert/6006878 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Implements hook_views_pre_view(). | |
*/ | |
function MYMODULE_views_pre_view(&$view, &$display_id, &$args) { | |
if (!in_array($view->name, array('NAME_OF_VIEW', 'NAME_OF_VIEWS_DISPLAY'))) { | |
return; | |
} | |
foreach (array('type') as $filter) { | |
if (!empty($_GET[$filter]) && (is_array($_GET[$filter])) && reset($_GET[$filter]) == 'All') { | |
// Remove the filter value because it is manually added and thus | |
// unknown to Views. | |
unset($_GET[$filter]); | |
} | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment