function masonry_search_preprocess_search_results in Masonry Search 7
Same name and namespace in other branches
- 7.3 masonry_search.module \masonry_search_preprocess_search_results()
Implements hook_preprocess_HOOK() for theme_search_results().
File
- ./
masonry_search.module, line 47 - Displays search results in a Masonry layout.
Code
function masonry_search_preprocess_search_results(&$variables) {
// Get options
$options = variable_get('masonry_search', masonry_default_options());
if (!isset($options['masonry'])) {
$options['masonry'] = 0;
}
// Display search results in a Masonry layout
if ($options['masonry']) {
$container = '.search-results';
$options['masonry_item_selector'] = '.search-result';
masonry_apply($container, $options);
}
}