function views_xhtml_hcard_views_argument in Views Datasource 5
argument hook that will display the hCard data document or display export icons.
2 calls to views_xhtml_hcard_views_argument()
- views_xhtml_hcard_handler in ./
views_xhtml.module - handler for our own XHTML hCard argument handler
- views_xhtml_views_post_view in ./
views_xhtml.module - post view to display the render icons
File
- ./
views_xhtml.module, line 73 - Provides Views plugin for rendering node content as XHTML microformats.
Code
function views_xhtml_hcard_views_argument($op, &$view, $arg) {
if ($op == 'argument' && $arg == 'xhtml_hcard') {
$view->page_type = 'views_' . $arg;
}
else {
if ($op == 'post_view' && $view->build_type != 'block') {
$args = views_post_view_make_args($view, $arg, $arg);
$url = views_get_url($view, $args);
$title = views_get_title($view, 'page', $args);
$links = array();
if ($arg == 'xhtml_hcard') {
if ($image = theme('image', drupal_get_path('module', 'views_xhtml') . '/hcard.png', t('hCard'), t('Show @title as a hCard document.', array(
'@title' => $title,
)))) {
$links[] = l($image, $url, array(
'class' => 'xhtml-icon',
), $url_filter, NULL, FALSE, TRUE);
return implode(' ', $links);
}
}
}
}
}