function widget($args, $instance)
    {
        extract($args, EXTR_SKIP);
        /* Our variables from the widget settings. */
        $title = apply_filters('woo_home_blog_title', $instance['title'], $instance, $this->id_base);
        $title = apply_filters('widget_title', $instance['title'], $instance, $this->id_base);
        $limit = $instance['limit'];
        /* Before widget (defined by themes). */
        echo $before_widget;
        /* Display the widget title if one was input (before and after defined by themes). */
        if ($title != '') {
            echo $before_title . $title . $after_title;
        }
        // End IF Statement
        /* Widget content. */
        // Add actions for plugins/themes to hook onto.
        do_action($this->woo_widget_cssclass . '_top');
        // Load widget content here.
        global $woo_options;
        $paged = get_query_var('paged') ? get_query_var('paged') : 1;
        $query_args = array('paged' => $paged, 'posts_per_page' => $limit);
        query_posts($query_args);
        if (have_posts()) {
            $count = 0;
            while (have_posts()) {
                the_post();
                $count++;
                ?>
		                                                            
		    <div <?php 
                post_class();
                ?>
>
		        
		        <h2 class="title"><a href="<?php 
                the_permalink();
                ?>
" rel="bookmark" title="<?php 
                the_title_attribute();
                ?>
"><?php 
                the_title();
                ?>
</a></h2>
		                        
		        <div class="entry">
		            <?php 
                the_excerpt();
                ?>
		        </div>
		
		        <?php 
                woo_post_meta();
                ?>
		       
		    </div><!-- /.post -->                                     
		<?php 
            }
            // End WHILE Loop
        } else {
            ?>
		
		    <div <?php 
            post_class();
            ?>
>
		        <p><?php 
            _e('Sorry, no posts matched your criteria.', 'woothemes');
            ?>
</p>
		    </div><!-- /.post -->
		<?php 
        }
        nxt_reset_query();
        // Add actions for plugins/themes to hook onto.
        do_action($this->woo_widget_cssclass . '_bottom');
        /* After widget (defined by themes). */
        echo $after_widget;
    }
Esempio n. 2
0
				<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();
        ?>
</h1>
		            	    <p class="post-category"><?php 
        _e('Categories:', 'woothemes');
        ?>
 <?php 
        the_category(', ');
Esempio n. 3
0
function woo_tumblog_audio($post_id = 0, $count = 0, $pagetype = '')
{
    $service = get_option('woo_url_shorten');
    $category_link = woo_tumblog_category_link($post_id, 'audio');
    ?>
	<div class="post audio-post">
				
        <div class="posttype">
        	<a href="<?php 
    echo $category_link;
    ?>
" title="<?php 
    echo esc_attr(get_post_format_string(get_post_format()));
    ?>
"><img src="<?php 
    bloginfo('template_directory');
    ?>
/images/ico-audio.png" alt="" /></a>
        </div><!-- /.posttype -->
                
	    <?php 
    if (is_singular()) {
        ?>
	    <h1 class="title"><a href="<?php 
        the_permalink();
        ?>
" rel="bookmark" title="<?php 
        the_title();
        ?>
"><?php 
        the_title();
        ?>
</a></h1>
	    <?php 
    } else {
        ?>
	    <h2 class="title"><a href="<?php 
        the_permalink();
        ?>
" rel="bookmark" title="<?php 
        the_title();
        ?>
"><?php 
        the_title();
        ?>
</a></h2>
	    <?php 
    }
    ?>
	    
	    <?php 
    woo_post_meta();
    ?>
             
	            
        <div class="media">
		    <div id='mediaspace<?php 
    echo $post_id;
    ?>
'></div>
		    <?php 
    //Post Args
    $args = array('post_type' => 'attachment', 'numberposts' => -1, 'post_status' => null, 'post_parent' => $post_id);
    //Get attachements
    $attachments = get_posts($args);
    if ($attachments) {
        foreach ($attachments as $attachment) {
            $link_url = $attachment->guid;
        }
    } else {
        $link_url = get_post_meta($post_id, 'audio', true);
    }
    if (!empty($link_url)) {
        ?>
		    <script type='text/javascript'>
		      var so = new SWFObject('<?php 
        bloginfo('template_directory');
        ?>
/includes/tumblog/player.swf','mpl','440','32','9');
		      so.addParam('allowfullscreen','true');
		      so.addParam('allowscriptaccess','always');
		      so.addParam('wmode','opaque');
		      so.addParam('wmode','opaque');
		      so.addVariable('skin', '<?php 
        bloginfo('template_directory');
        ?>
/includes/tumblog/stylish_slim.swf');
		      so.addVariable('file','<?php 
        echo $link_url;
        ?>
');
		      so.addVariable('backcolor','000000');
		      so.addVariable('frontcolor','FFFFFF');
		      so.write('mediaspace<?php 
        echo $post_id;
        ?>
');
		    </script>
		    <?php 
    }
    ?>
		</div><!-- /.audioplayer -->
        
        <div class="entry">
        	<?php 
    if (get_option('woo_home_content') == 'false' && is_home() || get_option('woo_archive_content') == 'false' && (is_archive() || is_search() || is_tax())) {
        the_excerpt();
    } elseif ($pagetype == 'archive' && get_option('woo_archive_content') == 'false') {
        the_excerpt();
    } elseif ($pagetype == 'home' && get_option('woo_home_content') == 'false') {
        the_excerpt();
    } else {
        the_content();
    }
    ?>
        </div>

	    <div class="post-more">      
	    		<span class="comments"><?php 
    comments_popup_link(__('0 Comments', 'woothemes'), __('1 Comments', 'woothemes'), __('% Comments', 'woothemes'));
    ?>
</span>
	    		<?php 
    if ($service != 'Off') {
        ?>
<span class="shorturl"><a href="<?php 
        echo woo_short_url(get_permalink());
        ?>
" title="<?php 
        _e('Short URL for', 'woothemes');
        ?>
 <?php 
        the_title();
        ?>
"><?php 
        _e('Short URL', 'woothemes');
        ?>
</a></span><?php 
    }
    ?>
				<?php 
    the_tags('<span class="tags">', ', ', '</span>');
    ?>
	    </div>  
                                    
    </div><!-- /.post -->
	
	<?php 
}