You appear to be a bot. Output may be restricted
Description
Return an image tag
Usage
$string = retimage( $class, $jpg, $title, $width, $height, $extras );
Parameters
- $class
- ( string ) required – CSS classes for this image
- $jpg
- ( string ) required – file name of the image (src=)
- $title
- ( string ) optional – value for the title= and alt= attributes
- $width
- ( string ) optional – width of the image
- $height
- ( string ) optional – height of the image
- $extras
- ( mixed ) optional –
Returns
string HTML of the img tag Note: This function does not handle an id= attributeSource
File name: oik-bwtrace/libs/bobbfunc.phpLines:
1 to 18 of 18
function retimage( $class, $jpg, $title=NULL, $width=NULL, $height=NULL, $extras=null ) { $img = '<img class="' . $class . '" '; $img .= 'src="' . bw_expand_link( $jpg ) . '" '; if ( !is_null( $width)) $img .= 'width="' . $width . '" '; if ( !is_null( $height)) $img .= 'height="' . $height . '" '; if ( !is_null( $title ) ) { $title = strip_tags( $title ); $img .= 'title="' . $title . '" '; $img .= 'alt="' . $title . '" '; } if ( $extras ) { $img .= $extras; } $img .= " />"; return( $img ); }View on GitHub View on Trac