Example #1
0
 /**
  * gets the post's image thumbnail ad displays it using tim thumb
  *
  * @param string $w 
  * @param string $h 
  * @param string $link 
  * @return void
  * @author Armando Sosa
  */
 function postImage($w = 280, $h = 180, $src_only = false, $link = false, $echo = true)
 {
     global $post, $id;
     $post_id = $id;
     $post_thumbnail_id = get_post_thumbnail_id($post_id);
     $class = $post->post_type . "-image";
     $image = wp_get_attachment_image_src($post_thumbnail_id, $size = "regular");
     if (!$image) {
         $image = $this->legacyPostImage($id);
         if ($image === false) {
             return false;
         }
     } else {
         $image = $image[0];
     }
     if (!$w === false && !$h === false) {
         $src = thumbgen($image, $w, $h);
     }
     if ($src_only) {
         return $src;
     }
     $output = "<img src=\"{$src}\" class=\"{$class}\"/>";
     if ($link) {
         $output = "<a href=\"{$link}\">" . $output . "</a>";
     }
     $output = "<div class=\"entry-image\">{$output}</div>";
     if ($echo) {
         echo $output;
     }
     return $output;
 }
Example #2
0
    ?>
" type="text/css" media="screen"  charset="utf-8">
		<?php 
}
?>

	<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0" />	
	
	<link rel="pingback" href="<?php 
bloginfo('pingback_url');
?>
" />
	<meta name="apple-mobile-web-app-capable" content="yes" />	

	<?php 
$logo_url = thumbgen($Options->get('padpress_warp', 'cover_logo'), 72, 72);
if (str_contains('void.gif', $logo_url)) {
    $logo_url = '';
}
if (!empty($logo_url)) {
    echo "<link rel='apple-touch-icon' href='{$logo_url}'>";
}
?>
	
	<?php 
$launch_screen = $Options->get('padpress_warp', 'launch_screen');
if (!empty($launch_screen)) {
    echo "<link rel='apple-touch-startup-image' href='{$launch_screen}'>";
}
?>
	
Example #3
0
<?php

global $t, $Options;
?>

<section id="contents">
	<?php 
$header_class = 'section-header';
$logo_url = thumbgen($Options->get('padpress_warp', 'logo'), 160, 160);
$grid = $Options->get('padpress_warp', 'cat_grid_type');
$grid_count = eval(str_replace('by', '*', "return " . $grid . ";"));
// get the total count of items
if (str_contains('void.gif', $logo_url)) {
    $header_class .= " no-image";
} else {
    ?>
	<div id="contents-logo">
		<img src="<?php 
    echo $logo_url;
    ?>
">
		<span>&nbsp</span>		
	</div>		
	<?php 
}
?>
	
	<header class="<?php 
echo $header_class;
?>
">