Created
May 13, 2012 17:27
-
-
Save tubalmartin/2689388 to your computer and use it in GitHub Desktop.
PHP function that prints an image to be used by Riloadr
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 print_image($data_src, $noscript_src, $group_class = "responsive", $classes = "", $alt = "", $data_base = "") | |
{ | |
echo '<img alt="'.$alt.'" class="'.$group_class.' '.$classes.'" data-src="'.$data_src.'"'.(!empty($data_base) ? ' data-base="'.$data_base.'"' : "").'>'. | |
'<noscript>'. | |
'<img alt="'.$alt.'" class="'.$classes.'" src="'.$noscript_src.'">'. | |
'</noscript>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment