Skip to content

Instantly share code, notes, and snippets.

@asanchez75
Created October 1, 2012 05:13
Show Gist options
  • Save asanchez75/3809570 to your computer and use it in GitHub Desktop.
Save asanchez75/3809570 to your computer and use it in GitHub Desktop.
Drupal snippets
URI
file_create_url($uri)
MAP HTML TAG
function bcrp_html_map_code($mapname, $shape, $coords, $href, $alt, $title) {
$area = theme('html_tag', array(
'element' => array(
'#tag' => 'area',
'#attributes' => array(
'shape' => $shape,
'coords' => $coords,
'href' => $href,
'alt' => $alt,
'title' => $title,
),
),
));
return theme('html_tag', array(
'element' => array(
'#tag' => 'map',
'#value' => $area,
'#attributes' => array(
'name' => $mapname,
)
)
));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment