Exemplo n.º 1
0
    function get_default()
    {
        ob_start();
        ?>

		<li id="the_default_widget_latest_posts" class="span3 widget">
			<div class="widget-pad">
				<h3 class="widget-title"><?php 
        _e('Latest Posts', 'pagelines');
        ?>
</h3>
				<?php 
        pl_recent_posts();
        ?>
			</div>
		</li>

		<li id="the_default_widget_latest_comments" class="span3 widget">
			<div class="widget-pad">
				<h3 class="widget-title"><?php 
        _e('Recent Comments', 'pagelines');
        ?>
</h3>
				<ul class="quote-list">
					<?php 
        pl_recent_comments();
        ?>
				</ul>
			</div>
		</li>
		
		<li id="the_default_widget_latest_categories" class="span3 widget">
			<div class="widget-pad">
				<h3 class="widget-title"><?php 
        _e('Top Categories', 'pagelines');
        ?>
</h3>
				<ul class="media-list">
			<?php 
        echo pl_popular_taxonomy();
        ?>
				</ul>
			</div>
		</li>
		<li id="the_default_widget_more" class="span3 widget">
			<div class="widget-pad">
				<h3 class="widget-title"><?php 
        _e('About', 'pagelines');
        ?>
 <?php 
        bloginfo('name');
        ?>
</h3>
				<div class="textwidget">
					<?php 
        if ($this->opt('columnizer_description')) {
            echo $this->opt('columnizer_description');
        } else {
            ?>
					<p>Lorem ipsum dolor sit amet elit, consectetur adipiscing. Vestibulum luctus ipsum id quam euismod a malesuada sapien euismot. Vesti bulum ultricies elementum interdum. </p>

					<address>PageLines Inc.<br/>
					200 Brannan St.<br/>
					San Francisco, CA 94107</address>
				<?php 
        }
        ?>

				</div>
			</div>
		</li>


	<?php 
        return ob_get_clean();
    }
Exemplo n.º 2
0
    function section_template()
    {
        global $plpg;
        $pageID = $plpg->id;
        $num_posts = 4;
        ?>
	<div class="widget">
		<div class="widget-pad">
	<div class="the-rapid-tabs">
		<ul class="tabbed-list rapid-nav fix">
			<li><a href="#rapid-popular"><?php 
        _e('Popular', 'pagelines');
        ?>
</a></li>
			<li><a href="#rapid-recent"><?php 
        _e('Recent', 'pagelines');
        ?>
</a></li>
			<li><a href="#rapid-comments"><?php 
        _e('Comments', 'pagelines');
        ?>
</a></li>
			<li><a href="#rapid-tags"><?php 
        _e('Tags', 'pagelines');
        ?>
</a></li>
		</ul>

		<div id="rapid-popular">

				
				<ul class="media-list">
					<?php 
        foreach (get_posts(array('numberposts' => $num_posts, 'ignore_sticky_posts' => 1, 'orderby' => 'meta_value', 'meta_key' => '_pl_karma', 'exclude' => $pageID)) as $p) {
            $img = has_post_thumbnail($p->ID) ? sprintf('<div class="img"><a class="the-media" href="%s" style="background-image: url(%s)"></a></div>', get_permalink($p->ID), pl_the_thumbnail_url($p->ID, 'thumbnail')) : '';
            printf('<li class="media fix">%s<div class="bd"><a class="title" href="%s">%s</a><span class="excerpt">%s</span></div></li>', $img, get_permalink($p->ID), $p->post_title, pl_short_excerpt($p->ID));
        }
        ?>


				</ul>
	
		</div>
		<div id="rapid-recent">
			
				<ul class="media-list">
					<?php 
        foreach (get_posts(array('ignore_sticky_posts' => 1, 'orderby' => 'post_date', 'order' => 'desc', 'numberposts' => $num_posts, 'exclude' => $pageID)) as $p) {
            $img = has_post_thumbnail($p->ID) ? sprintf('<div class="img"><a class="the-media" href="%s" style="background-image: url(%s)"></a></div>', get_permalink($p->ID), pl_the_thumbnail_url($p->ID, 'thumbnail')) : '';
            printf('<li class="media fix">%s<div class="bd"><a class="title" href="%s">%s</a><span class="excerpt">%s</span></div></li>', $img, get_permalink($p->ID), $p->post_title, pl_short_excerpt($p->ID));
        }
        ?>


				</ul>
		</div>

		<div id="rapid-comments">
			
			<ul class="quote-list">
				<?php 
        pl_recent_comments();
        ?>

			</ul>
			
		</div>
		<div id="rapid-tags">
				
				<div class="tags-list">
					<?php 
        wp_tag_cloud(array('number' => 30, 'smallest' => 10, 'largest' => 10));
        ?>


				</div>
		
		</div>
				
		</div>
	</div>
</div>
		<?php 
    }