• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP woo_embed函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中woo_embed函数的典型用法代码示例。如果您正苦于以下问题:PHP woo_embed函数的具体用法?PHP woo_embed怎么用?PHP woo_embed使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了woo_embed函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: the_title

		            	    <h1><?php 
        the_title();
        ?>
</h1>
		            	    <span class="post-category"><?php 
        the_category(', ');
        ?>
</span>
	                		
	                	</header>
	                	
	                	<?php 
        echo woo_embed('width=580');
        ?>
	               		<?php 
        if ($settings['thumb_single'] == 'true' && !woo_embed('') && '' != $image_src) {
            ?>
<img src="<?php 
            echo $image_src;
            ?>
" alt="" class="feature-thumb <?php 
            echo $settings['thumb_single_align'];
            ?>
" /><?php 
        }
        ?>
	                	
	                	<section class="entry">
	                		<?php 
        the_content();
        ?>
开发者ID:jaiweb,项目名称:ASP,代码行数:31,代码来源:single-features.php


示例2: the_title_attribute

            if (isset($slide_url) && $slide_url != '') {
                ?>
					    	    		<a href="<?php 
                echo $slide_url;
                ?>
" 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
开发者ID:jospintedjou,项目名称:wordpress,代码行数:31,代码来源:index.php


示例3: woo_portfolio_item_settings

 function woo_portfolio_item_settings($id)
 {
     global $woo_options;
     // Sanity check.
     if (!is_numeric($id)) {
         return;
     }
     $website_layout = 'two-col-left';
     $website_width = '960px';
     if (isset($woo_options['woo_layout'])) {
         $website_layout = $woo_options['woo_layout'];
     }
     if (isset($woo_options['woo_layout_width'])) {
         $website_width = $woo_options['woo_layout_width'];
     }
     $dimensions = woo_portfolio_image_dimensions($website_layout, $website_width);
     $width = $dimensions['width'];
     $height = $dimensions['height'];
     $enable_gallery = false;
     if (isset($woo_options['woo_portfolio_gallery'])) {
         $enable_gallery = $woo_options['woo_portfolio_gallery'];
     }
     $settings = array('large' => '', 'caption' => '', 'rel' => '', 'gallery' => array(), 'css_classes' => 'group post portfolio-img', 'embed' => '', 'enable_gallery' => $enable_gallery, 'testimonial' => '', 'testimonial_author' => '', 'display_url' => '', 'width' => $width, 'height' => $height);
     $meta = get_post_custom($id);
     // Check if there is a gallery in post.
     // woo_get_post_images is offset by 1 by default. Setting to offset by 0 to show all images.
     $large = '';
     if (isset($meta['portfolio-image'][0])) {
         $large = $meta['portfolio-image'][0];
     }
     $caption = '';
     if ($settings['enable_gallery'] == 'true') {
         $gallery = woo_get_post_images('0');
         if ($gallery) {
             // Get first uploaded image in gallery
             $large = $gallery[0]['url'];
             $caption = $gallery[0]['caption'];
         }
     }
     // End IF Statement
     // If we only have one image, disable the gallery functionality.
     if (is_array($gallery) && count($gallery) <= 1) {
         $settings['enable_gallery'] = 'false';
     }
     // Check for a post thumbnail, if support for it is enabled.
     if ($woo_options['woo_post_image_support'] == 'true' && current_theme_supports('post-thumbnails')) {
         $image_id = get_post_thumbnail_id($id);
         if (intval($image_id) > 0) {
             $large_data = wp_get_attachment_image_src($image_id, 'large');
             if (is_array($large_data)) {
                 $large = $large_data[0];
             }
         }
     }
     // See if lightbox-url custom field has a value
     if (isset($meta['lightbox-url']) && $meta['lightbox-url'][0] != '') {
         $large = $meta['lightbox-url'][0];
     }
     // Set rel on anchor to show lightbox
     if (is_array($gallery) && count($gallery) <= 1) {
         $rel = 'rel="lightbox"';
     } else {
         $rel = 'rel="lightbox[' . $id . ']"';
     }
     // Create CSS classes string.
     $css = '';
     $galleries = array();
     $terms = get_the_terms($id, 'portfolio-gallery');
     if (is_array($terms) && count($terms) > 0) {
         foreach ($terms as $t) {
             $galleries[] = $t->slug;
         }
     }
     $css = join(' ', $galleries);
     // If on the single item screen, check for a video.
     if (is_singular()) {
         $settings['embed'] = woo_embed('width=540');
     }
     // Add testimonial information.
     if (isset($meta['testimonial']) && $meta['testimonial'][0] != '') {
         $settings['testimonial'] = $meta['testimonial'][0];
     }
     if (isset($meta['testimonial_author']) && $meta['testimonial_author'][0] != '') {
         $settings['testimonial_author'] = $meta['testimonial_author'][0];
     }
     // Look for a custom display URL of the portfolio item (used if it's a website, for example)
     if (isset($meta['url']) && $meta['url'][0] != '') {
         $settings['display_url'] = $meta['url'][0];
     }
     // Assign the values we have to our array.
     $settings['large'] = $large;
     $settings['caption'] = $caption;
     $settings['rel'] = $rel;
     $settings['gallery'] = $gallery;
     $settings['css_classes'] .= ' ' . $css;
     // Disable "enable_gallery" option is gallery is empty.
     if (!is_array($settings['gallery']) || $settings['gallery'] == '' || count($settings['gallery']) <= 0) {
         $settings['enable_gallery'] = 'false';
     }
     // Allow child themes/plugins to filter these settings.
//.........这里部分代码省略.........
开发者ID:jospintedjou,项目名称:wordpress,代码行数:101,代码来源:theme-functions.php


示例4: locate_template

            if ($gallery) {
                // include('includes/gallery.php'); // Photo gallery
                $tpl_gallery = '';
                $tpl_gallery = locate_template(array('includes/gallery.php'));
                if ($tpl_gallery) {
                    include $tpl_gallery;
                }
                // End IF Statement
            } else {
                woo_image('key=portfolio-image&width=534&class=portfolio-img');
            }
            ?>
					</div>
					
					<?php 
        } elseif (!woo_embed('')) {
            ?>
<!-- End If portfolio_gallery -->
					
					<div id="gallery">
					<div class="entry">
                    	<?php 
            woo_image('key=portfolio-image&width=534&class=portfolio-img');
            ?>
					</div>
					</div>
					<?php 
        }
        ?>
					
					<?php 
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:31,代码来源:single-portfolio.php


示例5: while

			
	        <?php 
if (have_posts()) {
    $count = 0;
    while (have_posts()) {
        the_post();
        $count++;
        ?>
				
	            
	            <div class="single-portfolio-gallery fix">
				
				<?php 
        $width = 864;
        $args = 'width=' . $width;
        $embed = woo_embed($args);
        if ($embed != '') {
            echo $embed;
        } else {
            $args .= '&return=true&link=img&noheight=true';
            $html = '';
            $rel = 'lightbox';
            // Get the other images.
            $images = woo_get_post_images(0, 'full');
            if (count($images) > 0) {
                $rel = 'lightbox[' . $post->ID . ']';
            }
            // Store featured image ID for exclusion
            if (isset($woo_options['woo_post_image_support']) && $woo_options['woo_post_image_support'] == 'true' && current_theme_supports('post-thumbnails') && function_exists('get_post_thumbnail_id')) {
                $featured_image_id = get_post_thumbnail_id($post->ID);
            } else {
开发者ID:jospintedjou,项目名称:wordpress,代码行数:30,代码来源:single-portfolio.php


示例6: the_post_thumbnail

                ?>
" rel="nofollow"><?php 
                the_post_thumbnail('loop');
                ?>
</a>
				</figure>
				
				<figure class="video column-8">
					<?php 
                $has_embed = false;
                $custom_meta = get_post_custom($post->ID);
                if (isset($custom_meta['embed']) && $custom_meta['embed'][0] != '') {
                    $has_embed = true;
                }
                if ($has_embed == true) {
                    echo woo_embed('key=embed&width=642&class=video-embed');
                }
                ?>
				</figure>
				
				<?php 
            } else {
                // ANY OTHER POST THUMBNAIL
                ?>
							
				<figure class="column-8">
					<a href="<?php 
                the_permalink();
                ?>
" rel="nofollow"><?php 
                the_post_thumbnail('type-photo');
开发者ID:digideskio,项目名称:Travelllll,代码行数:31,代码来源:loop-grid.php


示例7: woo_tumblog_video_content

function woo_tumblog_video_content($post_id)
{
    $content_tumblog = '<div class="video-wrap">' . woo_embed('key=video-embed&width=' . get_option('woo_tumblog_video_width')) . '</div>';
    return $content_tumblog;
}
开发者ID:stevehanlon,项目名称:WooThemes-Canvas-Foundation-Zombie,代码行数:5,代码来源:theme-tumblog.php


示例8: 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


示例9: the_title

>
					<header>
						<h1><?php 
        the_title();
        ?>
</h1>

						<?php 
        brave_blank_post_meta();
        ?>

					</header>

					<div class="fix"></div>
					<?php 
        echo woo_embed('width=' . $embed_width);
        ?>
					<?php 
        if ($settings['thumb_single'] == 'true') {
            $image = woo_image('return=true&width=' . $settings['single_w'] . '&height=' . $settings['single_h'] . '&link=img&class=thumbnail');
            if ($image != '') {
                ?>
							<?php 
                if (isset($woo_options['woo_post_content']) && $woo_options['woo_post_content'] != 'content') {
                    ?>
							<div class="drop-shadow curved curved-hz-1 <?php 
                    echo $settings['thumb_single_align'];
                    ?>
">
								<a title="<?php 
                    the_title_attribute();
开发者ID:boyd109,项目名称:BraveBlank,代码行数:31,代码来源:single-unit.php


示例10: get_post_meta

                echo get_post_meta($post->ID, "slide_url", $single = true);
                ?>
"><img src="<?php 
                echo get_post_meta($post->ID, "slide_image", $single = true);
                ?>
" alt="" style="margin-bottom:<?php 
                echo $woo_options['woo_featured_image_margin'];
                ?>
px;" /></a>
            </div>
            <?php 
            } elseif (get_post_meta($post->ID, 'slide_embed', true)) {
                ?>
  
            	<?php 
                echo woo_embed('key=slide_embed&width=460&height=320&class=video');
                ?>
            <?php 
            }
            ?>
            
            <div class="wrap">
                <?php 
            the_content();
            ?>
            </div>
            
        </div><!-- /.slide -->
        <?php 
        }
    }
开发者ID:aozora,项目名称:arashi,代码行数:31,代码来源:featured.php


示例11: woo_portfolio_image_dimensions

// Determine whether to display the embed code, if one exists, in place of the post gallery/image.
$dimensions = woo_portfolio_image_dimensions($woo_options['woo_layout'], $woo_options['woo_layout_width']);
$settings['width'] = $dimensions['width'];
$settings['height'] = $dimensions['height'];
$settings['thumb_width'] = $dimensions['thumb_width'];
$settings['thumb_height'] = $dimensions['thumb_height'];
if ($settings['height'] > 0) {
    $settings['use_height'] = true;
}
if ($post_settings['embed'] != '') {
    $settings['use_embed'] = true;
}
$embed_args = 'width=' . ($settings['width'] - 6);
// Cater for the 3px border.
// Look for a video embed code.
$embed = woo_embed($embed_args);
if ($embed != '' && $settings['use_embed'] == true) {
    $settings['width'] = $settings['width'] - 6;
    // Cater for the 3px border.
    $settings['embed'] = $embed;
    $container_class = 'video_container';
    // Change the container class to be specific to videos.
}
// Allow child themes and plugins to filter these settings on a per-post basis.
$settings = apply_filters('woo_post_gallery_settings', $settings, $settings['post_id']);
/*-----------------------------------------------------------------------------------*/
/* Process code - Setup the query arguments and get the attachmented images. */
/*-----------------------------------------------------------------------------------*/
$images = array();
// Default value, to prevent images from displaying if we have an embedded video.
if ($settings['embed'] != '' && $settings['use_embed'] == true) {
开发者ID:nxtclass,项目名称:NXTClass-themes,代码行数:31,代码来源:gallery.php


示例12: woo_image

	</div><!--/.entry-->
<?php 
        }
        // Check for a slide image.
        if ($post->has_image) {
            ?>
	<div class="slide-image fl">
<?php 
            echo $anchor_start . woo_image($image_args) . $anchor_end;
            ?>
	</div><!--/.slide-image-->
<?php 
        }
        // Check for a video and no image.
        if ($post->has_video && !$post->has_image) {
            echo woo_embed('width=500');
        }
        ?>
	<div class="fix"></div><!--/.fix-->
</div><!--/.slide-->
<?php 
    }
    ?>
			</div><!--/.slides_container .col-full-->
		</div><!--/#slide-box-->
	</div><!--/#slides-->
<?php 
}
// End IF Statement
/* Reset the query. */
nxt_reset_query();
开发者ID:nxtclass,项目名称:NXTClass-themes,代码行数:31,代码来源:featured.php


示例13: woo_embed

<p><?php 
                        echo $content;
                        ?>
</p><?php 
                    }
                    ?>
    		  		<a class="slide-overlay-toggle">#</a>
    			</div>
    			<?php 
                }
                ?>
    	
    			<div class="image">
    	
    				<?php 
                echo woo_embed('key=embed&width=760');
                ?>
    	
    			</div>
    		  
    		</div>
    		<?php 
            } else {
                ?>
    		<div class="slide <?php 
                if ($featposts == 1) {
                    echo 'single-slide';
                }
                ?>
">
    		
开发者ID:nuevomediagroup,项目名称:nmg-code,代码行数:30,代码来源:featured.php


示例14: woo_image

"><?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 {
            ?>
<!-- // End $type IF Statement -->
                
                	<div class="entry">
	                    <?php 
            the_content();
            ?>
                    </div>                        
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:31,代码来源:featured.php


示例15: widget

    function widget($args, $instance)
    {
        extract($args);
        $title = $instance['title'];
        $limit = $instance['limit'];
        $cat_id = $instance['cat_id'];
        $tag = $instance['tag'];
        $width = 100;
        if (!empty($tag)) {
            $myposts = get_posts("numberposts={$limit}&tag={$tag}");
        } else {
            $myposts = get_posts("numberposts={$limit}&cat={$cat_id}");
        }
        $post_list = '';
        $count = 0;
        $active = "active";
        $display = "";
        echo $before_widget;
        ?>
       
        <?php 
        echo $before_title . $title . $after_title;
        ?>

            <?php 
        // Add actions for plugins/themes to hook onto.
        do_action('widget_woo_embed_top');
        if (isset($myposts)) {
            foreach ($myposts as $mypost) {
                $embed = woo_embed('width=' . $width . '&key=embed&class=widget_video&id=' . $mypost->ID);
                if ($embed) {
                    $count++;
                    if ($count > 1) {
                        $active = '';
                        $display = "style='display:none'";
                    }
                    ?>
						<div class="widget-video-unit" <?php 
                    echo $display;
                    ?>
 >
						<?php 
                    echo '<h4>' . get_the_title($mypost->ID) . "</h4>\n";
                    echo $embed;
                    $post_list .= "<li class='{$active}'><a href='#'>" . get_the_title($mypost->ID) . "</a></li>\n";
                    ?>
						</div>
						<?php 
                }
            }
        }
        ?>
        <ul class="widget-video-list">
        	<?php 
        echo $post_list;
        ?>
        </ul>

        <?php 
        // Add actions for plugins/themes to hook onto.
        do_action('widget_woo_embed_bottom');
        echo $after_widget;
    }
开发者ID:stevehanlon,项目名称:WooThemes-Canvas-Foundation-Zombie,代码行数:63,代码来源:widget-woo-embed.php


示例16: get_post_meta

" <?php 
        if ($slidertype != "full") {
            echo 'style="opacity: ' . $settings['featured_opacity'] . ';"';
        }
        ?>
>
	        		
    				<?php 
        $url = get_post_meta($post->ID, 'url', true);
        ?>

    	    		<?php 
        if ($slidertype == "full") {
            $has_embed = woo_embed('width=800&class=slide-video');
        } else {
            $has_embed = woo_embed('width=960&height=' . $settings['featured_height'] . '&class=slide-video-carousel');
        }
        if ($has_embed) {
            echo $has_embed;
        } else {
            if (isset($url) && $url != '') {
                ?>
	        				<a href="<?php 
                echo $url;
                ?>
" rel="bookmark" title="<?php 
                the_title_attribute();
                ?>
">
	        				<?php 
            }
开发者ID:jaiweb,项目名称:ASP,代码行数:31,代码来源:featured.php


示例17: while

        <?php 
    while (have_posts()) {
        the_post();
        $count++;
        ?>
        
			<div <?php 
        post_class();
        ?>
>

				<?php 
        echo woo_embed('width=500');
        ?>
                <?php 
        if (wootique_get_woo_option('woo_thumb_single') == "true" && !woo_embed('')) {
            woo_image('width=' . wootique_get_woo_option('woo_single_w') . '&height=' . wootique_get_woo_option('woo_single_h') . '&class=thumbnail ' . wootique_get_woo_option('woo_thumb_single_align'));
        }
        ?>

                <h1 class="title"><?php 
        the_title();
        ?>
</h1>
                                
                <?php 
        woo_post_meta();
        ?>
                
                <div class="entry">
                	<?php 
开发者ID:Recongt,项目名称:www-ecommerce-,代码行数:31,代码来源:single.php


示例18: woo_get_embed

function woo_get_embed($key = 'embed', $width, $height, $class = 'video', $id = null)
{
    // Run new function
    return woo_embed('key=' . $key . '&width=' . $width . '&height=' . $height . '&class=' . $class . '&id=' . $id);
}
开发者ID:agassner,项目名称:organizadores,代码行数:5,代码来源:admin-functions.php


示例19: while

    ?>
			</div><!--/#breadcrumbs -->
		<?php 
}
?>
                      
<?php 
if (have_posts()) {
    $count = 0;
    while (have_posts()) {
        the_post();
        $count++;
        $css_class = 'image';
        /* If we have a video embed code. */
        if ($post_settings['embed'] != '') {
            echo woo_embed('width=575');
            $css_class = 'video-excerpt';
        }
        /* If we have a gallery and don't have a video embed code. */
        if ($post_settings['enable_gallery'] == 'true' && $post_settings['embed'] == '') {
            locate_template(array('includes/gallery.php'), true);
            $css_class = 'gallery';
        }
        /* If we don't have a gallery and don't have a video embed code. */
        if ($post_settings['enable_gallery'] == 'false' && $post_settings['embed'] == '') {
            echo '<div id="post-gallery" class="portfolio-img">' . woo_image('return=true&key=portfolio-image&width=' . $post_settings['width'] . '&class=portfolio-img&noheight=true') . '</div><!--/#post-gallery .portfolio-img-->' . "\n";
        }
        ?>
	<div id="post-<?php 
        the_ID();
        ?>
开发者ID:nxtclass,项目名称:NXTClass-themes,代码行数:31,代码来源:single-portfolio.php


示例20: while

        <?php 
    while (have_posts()) {
        the_post();
        $count++;
        ?>
        
			<div <?php 
        post_class();
        ?>
>

				<?php 
        echo woo_embed('width=500');
        ?>
                <?php 
        if ($woo_options['woo_thumb_single'] == "true" && !woo_embed('')) {
            woo_image('width=' . $woo_options['woo_single_w'] . '&height=' . $woo_options['woo_single_h'] . '&class=thumbnail ' . $woo_options['woo_thumb_single_align']);
        }
        ?>

                <h1 class="title"><?php 
        the_title();
        ?>
</h1>
                                
                <?php 
        woo_post_meta();
        ?>
                
                <div class="entry">
                	<?php 
开发者ID:hram908,项目名称:albertos-project,代码行数:31,代码来源:single.php



注:本文中的woo_embed函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP woo_generate_font_css函数代码示例发布时间:2022-05-23
下一篇:
PHP woo_custom_navigation_output函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap