Ejemplo n.º 1
0
		            	    <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();
        ?>
Ejemplo n.º 2
0
            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
Ejemplo n.º 3
0
 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.
     $settings = apply_filters('woo_portfolio_item_settings', $settings, $id);
     return $settings;
 }
            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 
Ejemplo n.º 5
0
			
	        <?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 {
Ejemplo n.º 6
0
                ?>
" 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');
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;
}
Ejemplo n.º 8
0
 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);
     }
 }
Ejemplo n.º 9
0
>
					<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();
Ejemplo n.º 10
0
                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 
        }
    }
Ejemplo n.º 11
0
// 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) {
Ejemplo n.º 12
0
	</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();
Ejemplo n.º 13
0
<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';
                }
                ?>
">
    		
Ejemplo n.º 14
0
"><?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>                        
    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;
    }
Ejemplo n.º 16
0
" <?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 
            }
Ejemplo n.º 17
0
        <?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 
Ejemplo n.º 18
0
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);
}
Ejemplo n.º 19
0
    ?>
			</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();
        ?>
Ejemplo n.º 20
0
        <?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 
Ejemplo n.º 21
0
    ?>
">
	<ul class="slides">
<?php 
    foreach ($slides as $k => $post) {
        setup_postdata($post);
        $count++;
        $url = get_post_meta(get_the_ID(), 'url', true);
        $layout = get_post_meta(get_the_ID(), '_layout', true);
        $title = get_the_title();
        if ($url != '') {
            $title = '<a href="' . esc_url($url) . '" title="' . esc_attr($title) . '">' . $title . '</a>';
        }
        $css_class = 'slide-number-' . esc_attr($count);
        $slide_media = '';
        $embed = woo_embed('width=' . intval($media_settings['width']) . '&height=' . intval($media_settings['height']) . '&class=slide-video');
        if ('' != $embed) {
            $css_class .= ' has-video';
            $slide_media = $embed;
        } else {
            $image = woo_image('width=320&noheight=true&class=slide-image&link=img&return=true');
            if ('' != $image) {
                $css_class .= ' has-image no-video';
                $slide_media = $image;
            } else {
                $css_class .= ' no-image';
            }
        }
        if ($layout) {
            $css_class .= ' ' . $layout;
        }
Ejemplo n.º 22
0
function woo_get_embed($key = 'embed', $width, $height, $class = 'video', $id = null, $preserve_dimensions = false)
{
    // Run new function
    return woo_embed('key=' . $key . '&width=' . $width . '&height=' . $height . '&class=' . $class . '&id=' . $id . '&preserve_dimensions=' . $preserve_dimensions);
}
Ejemplo n.º 23
0
 function woo_display_post_image()
 {
     $display_image = false;
     $options = woo_get_dynamic_values(array('thumb_w' => '100', 'thumb_h' => '100', 'thumb_align' => 'alignleft', 'single_w' => '100', 'single_h' => '100', 'thumb_align_single' => 'alignright', 'thumb_single' => 'false'));
     $width = $options['thumb_w'];
     $height = $options['thumb_h'];
     $align = $options['thumb_align'];
     if (is_single() && 'true' == $options['thumb_single']) {
         $width = $options['single_w'];
         $height = $options['single_h'];
         $align = $options['thumb_align_single'];
         $display_image = true;
     }
     if ('true' == get_option('woo_woo_tumblog_switch')) {
         $is_tumblog = woo_tumblog_test();
     } else {
         $is_tumblog = false;
     }
     if ($is_tumblog || is_single() && 'false' == $options['thumb_single']) {
         $display_image = false;
     }
     if (true == $display_image && !woo_embed('')) {
         woo_image('width=' . esc_attr($width) . '&height=' . esc_attr($height) . '&class=thumbnail ' . esc_attr($align));
     }
 }
Ejemplo n.º 24
0
if (have_posts()) {
    $count = 0;
    while (have_posts()) {
        the_post();
        $count++;
        ?>
				<article <?php 
        post_class('fix');
        ?>
>
	
					<?php 
        echo woo_embed('width=580');
        ?>
	                <?php 
        if ($settings['thumb_single'] == 'true' && !woo_embed('')) {
            woo_image('noheight=true&width=' . $settings['thumb_w'] . '&height=' . $settings['thumb_h'] . '&class=thumbnail ' . $settings['thumb_align']);
        }
        ?>
	                
	                <?php 
        woo_post_meta();
        ?>
	                
	                <div class="post-body">
	
	                	<header>
	                	
		            	    <h1><?php 
        the_title();
        ?>
Ejemplo n.º 25
0
                    <h1 class="title"><a href="<?php 
        the_permalink();
        ?>
" rel="bookmark" title="<?php 
        the_title();
        ?>
"><?php 
        the_title();
        ?>
</a></h1>

                    <div class="entry">
                    	<?php 
        echo woo_embed('width=640');
        if (!woo_embed('width=640')) {
            woo_image('key=portfolio-image&width=640&class=portfolio-img');
        }
        ?>
	                	<?php 
        the_content();
        ?>
	               	</div><!-- /.entry -->

					<?php 
        edit_post_link(__('{ Edit }', 'woothemes'), '<span class="small">', '</span>');
        ?>
                    
                </div><!-- /.post -->
                
                <?php