Ah, so you need the ‘href’ value part only, without the HTML tag…
Trackserver doesn’t support that right now, but it would be quite easy to add:
Find the function ‘handle_shortcode3’, in either class-trackserver-shortcode.php or class-trackserver.php (the structure of Trackserver’s code has changed a bit since the last official release).
At the top of the function, add this to the $defaults array:
'href_only' => false,
Then, near the bottom of the function change this line:
$out = '<a href="' . $alltracks_url . '" ' . $class_str . '>' . htmlspecialchars( $text ) . '</a>';
to
if ( $atts['href_only'] === false ) {
$out = '<a href="' . $alltracks_url . '" ' . $class_str . '>' . htmlspecialchars( $text ) . '</a>';
} else {
$out = $alltracks_url;
}
Then, you can use
[tslink id=... href_only=y]
to generate the URL.
If you use PHP code (template?) to render the button, you can get the link like this:
$url = do_shortcode( '[tslink id=... href_only=y]' )
I haven’t tested the latter, though. I think it should work.
I’ll include the ‘href_only’ shortcode attribute in the next release.
Does this help?