Created
January 12, 2016 01:05
-
-
Save cafuego/b4dc47fe8a75178691f9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function theme_service_links_build_link($variables) { | |
$text = $variables['text']; | |
$url = $variables['url']; | |
$image = $variables['image']; | |
$nodelink = $variables['nodelink']; | |
$style = $variables['style']; | |
$attributes = $variables['attributes']; | |
if ($nodelink) { | |
$query = isset($url[1]) ? $url[1] : NULL; | |
switch ($style) { | |
case SERVICE_LINKS_STYLE_TEXT: | |
$link = array( | |
'title' => $text, | |
'href' => $url[0], | |
//'query' => array($url[1]), | |
'query' => $query, | |
'attributes' => $attributes, | |
); | |
break; | |
default: | |
$link = theme_service_links_build_link($variables); | |
} | |
} | |
else { | |
$attributes = array('attributes' => $attributes); | |
if (isset($url[1])) { | |
$attributes['query'] = $url[1]; | |
} | |
switch ($style) { | |
case SERVICE_LINKS_STYLE_TEXT: | |
$link = l($text, $url[0], $attributes); | |
break; | |
default: | |
theme_service_links_build_link($variables); | |
} | |
} | |
return $link; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment