You appear to be a bot. Output may be restricted
Description
Return a well formed linkParameters as for alink()
Usage
$string = retlink( $class, $url, $linktori, $alt, $id, $extra );
Parameters
- $class
- ( string|null ) required – the classes for the anchor tag
- $url
- ( string ) required – the fully formed URL e.g. https://www.oik-plugins.com
- $linktori
- ( string ) optional – is the text or image
- $alt
- ( string ) optional – text for title= attribute. a11y recommendations are to leave this null
- $id
- ( string ) optional – the unique ID for the anchor tag
- $extra
- ( string ) optional – anything else that needs to go in the <a> tag. e.g. 'onclick=then some javascript'
Returns
string the linkSource
File name: oik/libs/bobbfunc.phpLines:
1 to 23 of 23
function retlink( $class, $url, $linktori=NULL, $alt=NULL, $id=NULL, $extra=NULL ) { if ( is_null( $linktori ) ) { $linktori = $url; } $link = "<a" ; $link .= kv( "class", $class ); $link .= kv( "id", $id ); $link .= kv( "href", $url ); if ( !is_null( $alt ) ) { if ( $alt != $linktori ) { $link .= atitle( $alt ); } } if ( $extra ) { $link .= $extra; } $link .= ">"; if ( $linktori ) { $link .= $linktori; } $link .= "</a>"; return( $link ); }View on GitHub View on Trac