本文整理汇总了PHP中woo_image函数的典型用法代码示例。如果您正苦于以下问题:PHP woo_image函数的具体用法?PHP woo_image怎么用?PHP woo_image使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了woo_image函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: woo_widget_tabs_latest
function woo_widget_tabs_latest($posts = 5, $size = 45)
{
global $post;
$latest = get_posts(array('suppress_filters' => false, 'ignore_sticky_posts' => 1, 'orderby' => 'post_date', 'order' => 'desc', 'numberposts' => $posts));
foreach ($latest as $post) {
setup_postdata($post);
?>
<li>
<?php
if ($size != 0) {
woo_image('height=' . $size . '&width=' . $size . '&class=thumbnail&single=true');
}
?>
<a title="<?php
the_title_attribute();
?>
" href="<?php
the_permalink();
?>
"><?php
the_title();
?>
</a>
<span class="meta"><?php
the_time(get_option('date_format'));
?>
</span>
<div class="fix"></div>
</li>
<?php
}
wp_reset_postdata();
}
开发者ID:shramee,项目名称:test-ppb,代码行数:33,代码来源:woo-tabs.php
示例2: add_image_RSS
function add_image_RSS($content)
{
global $post, $id;
$blog_key = substr(md5(home_url('/')), 0, 16);
if (!is_feed()) {
return $content;
}
// Get the "image" from custom field
//$image = get_post_meta($post->ID, 'image', $single = true);
$image = woo_image('return=true&link=url');
$image_width = '240';
// If there's an image, display the image with the content
if ($image != '') {
$content = '<p style="float:right; margin:0 0 10px 15px; width:' . $image_width . 'px;">
<img src="' . $image . '" width="' . $image_width . '" />
</p>' . $content;
return $content;
} else {
$content = $content;
return $content;
}
}
开发者ID:hram908,项目名称:albertos-project,代码行数:22,代码来源:admin-functions.php
示例3: while
$count = 0;
?>
<?php
while (have_posts()) {
the_post();
$count++;
?>
<!-- Post Starts -->
<div <?php
post_class();
?>
>
<?php
woo_image('width=' . $woo_options['woo_thumb_w'] . '&height=' . $woo_options['woo_thumb_h'] . '&class=thumbnail ' . $woo_options['woo_thumb_align']);
?>
<h2 class="title"><a href="<?php
the_permalink();
?>
" rel="bookmark" title="<?php
the_title();
?>
"><?php
the_title();
?>
</a></h2>
<p class="post-meta">
开发者ID:aozora,项目名称:arashi,代码行数:31,代码来源:template-blog.php
示例4: woo_post_inside_before
<?php
woo_post_inside_before();
if (isset($woo_options['woo_magazine_b_w']) && ($woo_options['woo_magazine_b_w'] <= 0 || $woo_options['woo_magazine_b_w'] == '') || !isset($woo_options['woo_magazine_b_w'])) {
$woo_options['woo_magazine_b_w'] = '100';
}
if (isset($woo_options['woo_magazine_b_h']) && $woo_options['woo_magazine_b_h'] <= 0) {
$woo_options['woo_magazine_b_h'] = '100';
}
if (isset($woo_options['woo_magazine_grid_post_content']) && $woo_options['woo_magazine_grid_post_content'] != 'content') {
}
?>
<a href="<?php
echo get_permalink();
?>
"><?php
woo_image('link=img&width=' . $woo_options['woo_magazine_b_w'] . '&height=' . $woo_options['woo_magazine_b_h'] . '&class=thumbnail ' . $woo_options['woo_magazine_b_align']);
?>
</a>
<header>
<?php
the_title($title_before, $title_after);
?>
</header>
<?php
woo_post_meta();
?>
<section class="entry">
<?php
if (isset($woo_options['woo_magazine_grid_post_content']) && $woo_options['woo_magazine_grid_post_content'] == 'content') {
the_content();
开发者ID:klgrimley,项目名称:mzf,代码行数:31,代码来源:content-magazine-grid.php
示例5: add_image_RSS
/**
* Maybe add the featured image to the RSS feed.
* @param string $content The content of the specified RSS feed item.
* @since 1.0.0
* @return string
*/
function add_image_RSS($content)
{
if (!is_feed()) {
return $content;
}
global $post, $id;
// Get the "image" from custom field
$image = woo_image('return=true&link=url');
$image_width = intval(apply_filters('wf_add_image_to_rss_width', 240));
// If there's an image, display the image with the content
if ('' != $image) {
$content = '<p style="float: right; margin: 0 0 10px 15px; width:' . esc_attr(intval($image_width)) . 'px; height: auto;">
<img src="' . esc_url($image) . '" width="' . esc_attr(intval($image_width)) . '" style="max-width: 100%; height: auto;" />
</p>' . $content;
}
return $content;
}
开发者ID:davidHuanghw,项目名称:david_blog,代码行数:23,代码来源:admin-functions.php
示例6: woo_shortcode_pinterest
function woo_shortcode_pinterest($atts, $content = null)
{
global $post;
$defaults = array('count' => 'horizontal', 'float' => 'none', 'url' => '', 'image_url' => '', 'description' => '', 'use_post' => 'false');
$atts = shortcode_atts($defaults, $atts);
extract($atts);
$allowed_floats = array('left' => ' fl', 'right' => ' fr', 'none' => '');
if (!in_array($float, array_keys($allowed_floats))) {
$float = 'none';
}
$allowed_counts = array('horizontal', 'vertical', 'none');
if (!in_array($count, array_keys($allowed_counts))) {
$count = 'horizontal';
}
$output = '';
// Use the custom URL, if it has been specified.
if ($atts['url'] != '') {
$url = esc_url($atts['url']);
} else {
// Use the URL to the current $post in the loop.
$url = esc_url(get_permalink($post));
}
// Use the custom image URL, if it has been specified.
if ($atts['image_url'] != '') {
$image_url = esc_url($atts['image_url']);
} else {
// Use the image of the current $post in the loop.
$image_url = esc_url(woo_image('link=url&return=true'));
}
// Use the custom description, if it has been specified.
if ($atts['description'] != '') {
$description = esc_attr($atts['description']);
} else {
// Use the excerpt of the current $post in the loop, if no description is set and if instructed to do so.
if ($atts['use_post'] == 'true') {
$description = esc_attr(strip_shortcodes(apply_filters('get_the_excerpt', $post->post_excerpt)));
}
}
$output = apply_filters('woo_shortcode_pinterest', '<div class="shortcode-pinterest' . esc_attr($allowed_floats[$float]) . '"><a href="' . esc_url('http://pinterest.com/pin/create/button/?url=' . esc_url($url) . '&media=' . esc_url($image_url) . '&description=' . $description) . '" class="pin-it-button" count-layout="' . esc_attr($count) . '">' . __('Pin It', 'selftitled') . '</a></div><!--/.shortcode-pinterest-->' . "\n", $atts);
// Enqueue the Pinterest button JavaScript from their API.
add_action('wp_footer', 'woo_shortcode_pinterest_javascript');
add_action('woo_shortcode_generator_preview_footer', 'woo_shortcode_pinterest_javascript');
return $output . "\n";
}
开发者ID:phanhoanglong2610,项目名称:flowershop,代码行数:44,代码来源:admin-shortcodes.php
示例7: while
<div class="row spacing">
<div class="col-sm-9">
<?php
if (have_posts()) {
$count = 0;
while (have_posts()) {
the_post();
$count++;
?>
<div class="center news-summary">
<?php
if ($settings['thumb_single'] == 'true') {
woo_image('width=800px' . '&height=620px' . '&class=' . $settings['class']);
}
?>
<?php
woo_post_meta();
?>
<span class="tags date"><?php
the_time(get_option('date_format'));
?>
</span>
<a class="news-title" href="<?php
the_permalink();
?>
"><h3 class="news-title"><?php
the_title();
开发者ID:jonpalma,项目名称:bcc,代码行数:30,代码来源:single.php
示例8: the_ID
if ($custom_url != '') {
$settings['large'] = $custom_url;
}
?>
<article id="portfolio-item-id-<?php
the_ID();
?>
" <?php
post_class('portfolio-item');
?>
>
<?php
/* Setup image for display and for checks, to avoid doing multiple queries. */
$image = woo_image('width=207&height=212&link=img&return=true&class=thumbnail');
$image_src = woo_image('width=207&height=212&link=url&return=true&class=thumbnail');
if (!$image) {
$image = '<img src="' . get_template_directory_uri() . '/images/temp-portfolio.png" alt="" />';
}
?>
<a <?php
echo $settings['rel'];
?>
title="<?php
echo $settings['caption'];
?>
" href="<?php
echo $settings['large'];
?>
" class="item drop-shadow curved curved-hz-1">
<?php
开发者ID:realbig,项目名称:TH_MULLINS,代码行数:31,代码来源:loop-portfolio.php
示例9: post_class
exit;
}
/**
* The default template for displaying content
*/
global $woo_options;
?>
<article <?php
post_class();
?>
>
<?php
if (isset($woo_options['woo_post_content']) && $woo_options['woo_post_content'] != 'content') {
woo_image('width=100&height=100&class=thumbnail alignleft');
}
?>
<header>
<h1><a href="<?php
the_permalink();
?>
" rel="bookmark" title="<?php
the_title_attribute();
?>
"><?php
the_title();
?>
</a></h1>
<?php
开发者ID:maesson,项目名称:lyft,代码行数:31,代码来源:content-search.php
示例10: woo_display_post_image
function woo_display_post_image()
{
global $woo_options;
$display_image = false;
$width = $woo_options['woo_thumb_w'];
$height = $woo_options['woo_thumb_h'];
$align = $woo_options['woo_thumb_align'];
if (is_single() && isset($woo_options['woo_thumb_single']) && $woo_options['woo_thumb_single'] == 'true') {
$width = $woo_options['woo_single_w'];
$height = $woo_options['woo_single_h'];
$align = $woo_options['woo_thumb_align_single'];
$display_image = true;
}
if (get_option('woo_woo_tumblog_switch') == 'true') {
$is_tumblog = woo_tumblog_test();
} else {
$is_tumblog = false;
}
if ($is_tumblog || is_single() && @$woo_options['woo_thumb_single'] == 'false') {
$display_image = false;
}
if ($display_image == true && !woo_embed('')) {
woo_image('width=' . $width . '&height=' . $height . '&class=thumbnail ' . $align);
}
}
开发者ID:jospintedjou,项目名称:wordpress,代码行数:25,代码来源:theme-actions.php
示例11: the_title_attribute
} else {
if (isset($url) && $url != '') {
?>
<a href="<?php
echo $url;
?>
" rel="bookmark" title="<?php
the_title_attribute();
?>
">
<?php
}
if ($slidertype != "full") {
woo_image('width=960&height=' . $settings['featured_height'] . '&class=slide-image&link=img&noheight=true');
} else {
woo_image('width=2560&height=' . $settings['featured_height'] . '&class=slide-image full&link=img&noheight=true');
}
if (isset($url) && $url != '') {
?>
</a><?php
}
}
?>
<?php
if (!$has_embed or $has_embed && $settings['slider_video_title'] != "true") {
// Hide title/description if video post
?>
<div class="slide-content-container">
<article class="slide-content col-full <?php
if (!$has_embed) {
开发者ID:jaiweb,项目名称:ASP,代码行数:31,代码来源:featured.php
示例12: the_title
?>
<a href="<?php
echo $url;
?>
" title="<?php
the_title();
?>
"><?php
woo_image('key=image&width=920&height=338&class=slide-img&link=img');
?>
</a>
<?php
} else {
?>
<?php
woo_image('key=image&width=920&height=338&class=slide-img&link=img');
}
?>
</div><!-- /.slide-image -->
<?php
} elseif ($has_video) {
echo woo_embed('key=embed&width=500&class=video');
}
?>
<div class="fix"></div>
<?php
} else {
?>
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:31,代码来源:featured.php
示例13: WP_Query
<div id="featured-th">
<ul class="idTabs">
<?php
$the_query = new WP_Query('category_name=' . $featuredcat . '&showposts=5&orderby=post_date&order=desc');
$counter = 0;
while ($the_query->have_posts()) : $the_query->the_post(); $do_not_duplicate = $post->ID;
?>
<?php $counter++; ?>
<?php if ( get_post_meta($post->ID, 'image', true) ) { ?> <!-- DISPLAYS THE IMAGE URL SPECIFIED IN THE CUSTOM FIELD -->
<li <?php if ($counter == 5) { ?>class="last"<?php } ?>><a href="#post-<?php the_ID(); ?>">
<?php woo_image('height=57&width=100&link=img'); ?>
</a></li>
<?php } else { ?> <!-- DISPLAY THE DEFAULT IMAGE, IF CUSTOM FIELD HAS NOT BEEN COMPLETED -->
<li <?php if ($counter == 5) { ?>class="last"<?php } ?>><a href="#post-<?php the_ID(); ?>"><img src="<?php bloginfo('template_directory'); ?>/images/no-img-thumb.jpg" alt=""/></a></li>
<?php } ?>
<?php endwhile; ?>
</ul>
</div><!--/featured-th-->
开发者ID:stampil,项目名称:promo,代码行数:31,代码来源:featured.php
示例14: the_title_attribute
" title="<?php
the_title_attribute();
?>
">
<?php
}
// End If Statement
?>
<div class="slide-img">
<?php
$has_embed = woo_embed('width=864&key=embed&class=slide-video&id=' . $post->ID);
if ($has_embed) {
echo $has_embed;
// Minus 6px off the width to cater for the 3px border.
} else {
woo_image('key=image&width=864&h=&class=slide-image&link=img');
}
?>
</div>
<?php
if (isset($slide_url) && $slide_url != '') {
?>
</a>
<?php
}
// End If Statement
?>
<div class="slide-content">
<h2 class="title">
开发者ID:jospintedjou,项目名称:wordpress,代码行数:31,代码来源:index.php
示例15: woo_text_trim
if ('' == $excerpt) {
$excerpt = woo_text_trim(strip_tags(get_the_content()), 12);
}
?>
<li class="blog-post<?php
if ($count == 1) {
echo " first";
}
if ($count == 3) {
echo " last";
$count = 0;
}
?>
">
<?php
woo_image('noheight=true&width=' . $settings['blog_thumb_w'] . '&height=' . $settings['blog_thumb_h']);
?>
<h3><a href="<?php
the_permalink();
?>
"><?php
the_title();
?>
</a></h3>
<p><?php
echo $excerpt;
?>
</p>
<p><a class="button small" href="<?php
the_permalink();
?>
开发者ID:brian3t,项目名称:orchidmate,代码行数:31,代码来源:blog-posts.php
示例16: woo_widget_tabs_latest
function woo_widget_tabs_latest($posts = 5, $size = 45)
{
global $post;
$latest = get_posts('ignore_sticky_posts=1&numberposts=' . $posts . '&orderby=post_date&order=desc');
foreach ($latest as $post) {
setup_postdata($post);
?>
<li class="fix">
<?php
if ($size != 0) {
woo_image('height=' . $size . '&width=' . $size . '&class=thumbnail&single=true');
}
?>
<a title="<?php
the_title();
?>
" href="<?php
the_permalink();
?>
"><?php
the_title();
?>
</a>
<span class="meta"><?php
the_time(get_option('date_format'));
?>
</span>
</li>
<?php
}
nxt_reset_query();
}
开发者ID:nxtclass,项目名称:NXTClass-themes,代码行数:32,代码来源:widget-woo-tabs.php
示例17: the_title
the_title();
?>
</h1>
<?php
woo_post_meta();
?>
</header>
<?php
echo woo_embed('width=580');
?>
<?php
if ($settings['thumb_single'] == 'true' && !woo_embed('')) {
woo_image('width=' . $settings['single_w'] . '&height=' . $settings['single_h'] . '&class=thumbnail ' . $settings['thumb_single_align']);
}
?>
<section class="entry fix">
<?php
the_content();
?>
<?php
wp_link_pages(array('before' => '<div class="page-link">' . __('Pages:', 'woothemes'), 'after' => '</div>'));
?>
</section>
<?php
the_tags('<p class="tags">', '', '</p>');
?>
开发者ID:maesson,项目名称:lyft,代码行数:31,代码来源:single.php
示例18: get_permalink
/* If the theme option is set to link to the single portfolio item, adjust the $settings. */
if (isset($woo_options['woo_portfolio_linkto']) && $woo_options['woo_portfolio_linkto'] == 'post') {
$settings['large'] = get_permalink($post->ID);
$settings['rel'] = '';
}
?>
<div <?php
post_class($settings['css_classes']);
?>
style="max-width: <?php
echo intval($thumb_width);
?>
px;">
<?php
/* Setup image for display and for checks, to avoid doing multiple queries. */
$image = woo_image('return=true&key=portfolio-image&width=' . $thumb_width . '&height=' . $thumb_height . '&link=img&alt=' . the_title_attribute(array('echo' => 0)) . '');
if ($image != '') {
?>
<a <?php
echo $settings['rel'];
?>
title="<?php
echo esc_attr($settings['caption']);
?>
" href="<?php
echo esc_url($settings['large']);
?>
" class="thumb">
<?php
echo $image;
?>
开发者ID:klgrimley,项目名称:mzf,代码行数:31,代码来源:loop-portfolio.php
示例19: if
<div class="col1">
<?php if (have_posts()) : ?>
<div id="archivebox">
<h2><em><?php _e('Tag Archive',woothemes); ?> |</em> "<?php single_tag_title("", true); ?>"</h2>
</div><!--/archivebox-->
<?php while (have_posts()) : the_post(); ?>
<div class="post-alt blog" id="post-<?php the_ID(); ?>">
<?php woo_image('height=57&width=100&class=th'); ?>
<?php if (function_exists('the_tags')) { ?><h2><?php the_tags('Tags: ', ', ', ''); ?></h2><?php } ?>
<h3><a title="<?php _e('Permanent Link to',woothemes); ?> <?php the_title(); ?>" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3>
<p class="posted"><?php _e('Posted on',woothemes); ?> <?php the_time('d F Y'); ?> <?php _e('by',woothemes); ?> <?php the_author(); ?></p>
<div class="entry">
<?php the_content('<span class="continue">'.__('Continue Reading',woothemes).'</span>'); ?>
</div>
<p class="comments"><?php comments_popup_link(__('Comments (0)',woothemes), __('Comments (1)',woothemes), __('Comments (%)',woothemes)); ?></p>
</div><!--/post-->
<?php endwhile; ?>
开发者ID:stampil,项目名称:promo,代码行数:29,代码来源:tag.php
示例20: query_posts
query_posts($query_args);
if (have_posts()) {
$count = 0;
while (have_posts()) {
the_post();
$count++;
?>
<!-- Post Starts -->
<div <?php
post_class();
?>
>
<?php
if (wootique_get_woo_option('woo_post_content') != 'content') {
woo_image('width=' . wootique_get_woo_option('woo_thumb_w') . '&height=' . wootique_get_woo_option('woo_thumb_h') . '&class=thumbnail ' . wootique_get_woo_option('woo_thumb_align'));
}
?>
<h2 class="title"><a href="<?php
the_permalink();
?>
" rel="bookmark" title="<?php
the_title_attribute();
?>
"><?php
the_title();
?>
</a></h2>
<?php
开发者ID:Recongt,项目名称:www-ecommerce-,代码行数:31,代码来源:template-blog.php
注:本文中的woo_image函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论