Created
May 22, 2013 14:24
-
-
Save patrickmj/5627919 to your computer and use it in GitHub Desktop.
Filter advanced search options in Omeka
This file contains hidden or 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
public $_filters = array('elements_select_options'); | |
public function filterElementsSelectOptions($elementSets) | |
{ | |
//make this magic happen only on the advanced search page | |
if(!is_admin_theme()) { | |
$elementsWeWant = array('Title'); | |
foreach($elementSets as $elementSet=>$elements) { | |
foreach($elements as $id=>$element) { | |
if(!in_array($element, $elementsWeWant)) { | |
unset($elementSets[$elementSet][$id]); | |
} | |
} | |
} | |
} | |
return $elementSets; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment