Exemple #1
0
<!DOCTYPE html>
<html <?php 
language_attributes();
?>
>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="author" content="KTStudio.cz">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title><?php 
wp_title("|", true, "right");
?>
</title>
    <link rel="icon" type="image/ico" href="<?php 
echo KT::imageGetUrlFromTheme("favicon.ico");
?>
">
    <link rel="pingback" href="<?php 
bloginfo("pingback_url");
?>
" />
    <?php 
wp_head();
?>
    <!--[if lte IE 9]>
        <script src="<?php 
echo KT_ZZZ_JS_URL;
?>
/compatibility.js"></script>  
    <![endif]-->
Exemple #2
0
 /**
  * Vratí html tag img připravený na lazy load
  * 
  * @author Jan Pokorný
  * @deprecated
  * @see KT::imageGetHtmlByUrl()
  * @see KT::imageGetHtmlByFileName()
  * @param string $file URL nebo cesta k souboru ve složce images
  * @param int $width Šířka obrázku
  * @param int $height Výška obrázku
  * @param array $attrs Další html atributy
  * 
  */
 public static function imageGetHtml($file, $width, $height, array $attrs = null)
 {
     if (filter_var($file, FILTER_VALIDATE_URL) === false) {
         $fileUrl = KT::imageGetUrlFromTheme($file);
     } else {
         $fileUrl = $file;
     }
     $htmlAttrs = "";
     if ($attrs) {
         foreach ($attrs as $param => $value) {
             $htmlAttrs .= sprintf(' %s="%s"', $param, $value);
         }
     }
     $html = sprintf('<img src="%s" width="%d" height="%d" %s />', $fileUrl, $width, $height, $htmlAttrs);
     return apply_filters("kt_image_prepare_lazyload", $html);
 }