function _simpleads_get_views_displays in SimpleAds 7.2
Get all available Views displays
2 calls to _simpleads_get_views_displays()
- simpleads_block_configure in includes/
blocks.inc - Implements hook_block_configure().
- simpleads_new_block_form in ./
simpleads.admin.inc - New advertisement block form.
File
- includes/
helper.inc, line 162 - Helper functions.
Code
function _simpleads_get_views_displays($view_name) {
$result = array();
$view = views_get_view($view_name);
if (isset($view->display)) {
foreach ($view->display as $display_id => $display) {
if ($display_id != 'default') {
$result[$display_id] = check_plain($display->display_title);
}
}
}
drupal_alter('simpleads_views_displays', $result);
return $result;
}