コード例 #1
0
function recent_news($args)
{
    extract($args);
    $settings = get_option('widget_recent_news');
    $number = $settings['number'];
    echo $before_widget;
    echo "{$before_title}" . "{$settings['title']}" . "{$after_title}";
    ?>
<ul class="news_widget">
  <?php 
    $recent = new WP_Query('caller_get_posts=1&showposts=' . $number);
    while ($recent->have_posts()) {
        $recent->the_post();
        global $post;
        global $wp_query;
        ?>
	<li>
		<a href="<?php 
        the_permalink();
        ?>
" rel="bookmark" title="<?php 
        the_title();
        ?>
">
		<?php 
        unset($img);
        if (current_theme_supports('post-thumbnails') && has_post_thumbnail()) {
            $thumbURL = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), '');
            $img = $thumbURL[0];
        } else {
            unset($img);
            if ($wpzoom_cf_use == 'Yes') {
                $img = get_post_meta($post->ID, $wpzoom_cf_photo, true);
            } else {
                if (!$img) {
                    $img = catch_that_image($post->ID);
                }
            }
        }
        if ($img) {
            $img = wpzoom_wpmu($img);
            ?>
			<img src="<?php 
            bloginfo('template_directory');
            ?>
/scripts/timthumb.php?src=<?php 
            echo $img;
            ?>
&amp;w=65&amp;h=50&amp;zc=1" alt="<?php 
            the_title();
            ?>
" /> 
			<?php 
        }
        ?>
 		</a>
 		<a href="<?php 
        the_permalink();
        ?>
" rel="bookmark" title="Permanent Link to <?php 
        the_title();
        ?>
"><?php 
        the_title();
        ?>
</a>
		<span class="meta"><?php 
        the_time('F j, Y \\a\\t G:i');
        ?>
</span> 
 
  </li>
   
  <?php 
    }
    ?>
</ul>
  
<?php 
    echo $after_widget;
}
コード例 #2
0
ファイル: author.php プロジェクト: xuandungpy/vuong
        unset($img);
        if (current_theme_supports('post-thumbnails') && has_post_thumbnail()) {
            $thumbURL = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), '');
            $img = $thumbURL[0];
        } else {
            unset($img);
            if ($wpzoom_cf_use == 'Yes') {
                $img = get_post_meta($post->ID, $wpzoom_cf_photo, true);
            } else {
                if (!$img) {
                    $img = catch_that_image($post->ID);
                }
            }
        }
        if ($img) {
            $img = wpzoom_wpmu($img);
            ?>
				<div class="thumb"><a href="<?php 
            the_permalink();
            ?>
" rel="bookmark" title="<?php 
            the_title();
            ?>
"><img src="<?php 
            bloginfo('template_directory');
            ?>
/scripts/timthumb.php?src=<?php 
            echo $img;
            ?>
&amp;w=<?php 
            echo "{$wpzoom_archive_thumb_width}";
コード例 #3
0
ファイル: index.php プロジェクト: candidosales/site-demolaypi
    }
}
$dateformat = get_option('date_format');
$timeformat = get_option('time_format');
get_header();
?>

<?php 
if ($wpzoom_intro == 'Yes') {
    ?>
 	<div id="welcome">
 	<?php 
    if (check_email_address($wpzoom_intro_avatar) && $wpzoom_intro_avatar != '') {
        echo get_avatar($wpzoom_intro_avatar, $size = '95', $default = '<path_to_url>');
    } else {
        $wpzoom_intro_avatar = wpzoom_wpmu($wpzoom_intro_avatar);
        ?>
<img src="<?php 
        bloginfo('template_directory');
        ?>
/scripts/timthumb.php?src=<?php 
        echo $wpzoom_intro_avatar;
        ?>
&amp;w=95&amp;h=95&amp;zc=1" /><?php 
    }
    ?>
 		<h2><?php 
    echo $wpzoom_intro_title;
    ?>
</h2>
		<?php