function menu_badges_execute_view in Menu Badges 7
Execute a view for badge display.
Parameters
$arguments:
1 string reference to 'menu_badges_execute_view'
- menu_badges_get_views_badges in ./
menu_badges.module - Get a list of badges defined by Views.
File
- ./
menu_badges.module, line 300 - Menu Badges module file.
Code
function menu_badges_execute_view($arguments) {
$view = views_get_view($arguments['view_name']);
if (!empty($view->display[$arguments['view_display_id']])) {
$view_args = array();
$result = $view
->execute_display($arguments['view_display_id'], $view_args);
if (!empty($result) || $result === "0" || $result === 0) {
return $result;
}
}
return NULL;
}