function panopoly_widgets_views_pre_view in Panopoly Widgets 7
Implements hook_views_pre_view().
File
- ./
panopoly_widgets.module, line 722
Code
function panopoly_widgets_views_pre_view(&$view, &$display_id, &$args) {
if ($view->name == 'panopoly_widgets_general_content' && $display_id == 'piece_of_content') {
// If neither 'nid' or 'title' is set, then don't display anything. This is
// primarily for the live preview, which would otherwise default to the
// first node. See issue #2463395.
if (empty($view->exposed_input) || empty($view->exposed_input['nid']) && empty($view->exposed_input['title'])) {
$view->executed = TRUE;
}
}
}