/**
 * TODO: Add description
 * @return [type] [description]
 */
function makerfaire_news_rss()
{
    ?>
		<div class="newsies">
			<div class="news post">
				<h3 style="color: #fc040c;"><a href="http://makezine.com/tag/maker-faire/"><?php 
    _e('Latest Maker Faire News', 'make-mini-mf');
    ?>
</a></h3>
				<?php 
    $fs = makerfaire_index_feed();
    foreach ($fs as $f) {
        $a = $f['i']->get_authors();
        ?>
						<h4><a href="<?php 
        echo esc_url($f['i']->get_link());
        ?>
"><?php 
        echo esc_html($f['i']->get_title());
        ?>
</a></h4>
						<div class="row">
							<div class="span2">
								<a href="<?php 
        echo esc_url($f['i']->get_link());
        ?>
" title="<?php 
        echo esc_attr($f['i']->get_title());
        ?>
"><img class="thumbnail faire-thumb " alt="<?php 
        echo esc_attr($f['i']->get_title());
        ?>
" src="<?php 
        echo esc_url($f['src']);
        ?>
" /></a>
							</div>
							<div class="span6">
								<?php 
        echo str_replace(array($f['img'], '<p><a href="' . $f['i']->get_link() . '">Read the full article on MAKE</a></p>'), '', html_entity_decode(esc_html($f['i']->get_description())));
        ?>
								<p class="read_more" style="margin:10px 0"><strong><a class="btn btn-primary btn-mini" href="<?php 
        echo esc_url($f['i']->get_link());
        ?>
"><?php 
        _e('Read full story &raquo;', 'make-mini-mf');
        ?>
</a></strong></p>
							
								<ul class="unstyled">
									<li><?php 
        _e('Posted by', 'make-mini-mf');
        ?>
 <?php 
        echo esc_html($a[0]->name);
        ?>
 | <?php 
        echo esc_html($f['i']->get_date());
        ?>
</li>
									<li><?php 
        _e('Categories:', 'make-mini-mf');
        ?>
 <?php 
        foreach ($f['i']->get_categories() as $cat) {
            echo esc_html($cat->term . ', ');
        }
        ?>
</li>
								</ul>
							</div>
						</div>
					<?php 
    }
    ?>
 
			</div>
		</div>
		<h4><a href="http://makezine.com/tag/maker-faire/"><?php 
    _e('Read More &rarr;', 'make-mini-mf');
    ?>
</a></h4>
	<?php 
}
Esempio n. 2
0
function makerfaire_news_rss()
{
    ?>
	<div class="newsies">
		<div class="news post">
			<h3 style="color: #fc040c;">
				<a href="http://makezine.com/tag/maker-faire/">Latest Maker Faire News</a>
			</h3>
			<?php 
    $fs = makerfaire_index_feed();
    foreach ($fs as $f) {
        $a = $f['i']->get_authors();
        ?>
				<div class="row">
					<div class="col-md-2">
						<a href="<?php 
        echo esc_url($f['i']->get_link());
        ?>
" title="<?php 
        echo esc_attr($f['i']->get_title());
        ?>
"><img class="img-thumbnail faire-thumb " alt="<?php 
        echo legacy_get_resized_remote_image_url(esc_attr($f['i']->get_title()), 308, 202);
        ?>
" src="<?php 
        echo esc_url($f['src']);
        ?>
" /></a>
					</div>
					<div class="col-md-6">
					<h2><a href="<?php 
        echo esc_url($f['i']->get_link());
        ?>
"><?php 
        echo esc_html($f['i']->get_title());
        ?>
</a></h2>
					<?php 
        echo str_replace(array($f['img'], '<p><a href="' . $f['i']->get_link() . '">Read the full article on MAKE</a></p>'), '', html_entity_decode(esc_html($f['i']->get_description())));
        ?>
					
					<!-- READ FULL STORY BUTTON AND LINK
					 <p class="read_more" style="margin:10px 0"><strong>
					<a class="btn btn-primary btn-xs" href="<?php 
        /*  echo esc_url($f['i']->get_link()); */
        ?>
">Read full story &raquo;</a></strong></p> 
					-->

					<!-- AUTHOR AND CATEGORY DESCRIPTIONS
					<ul class="unstyled">
						<li>Posted by <?php 
        /* echo esc_html($a[0]->name); ?> | <?php echo esc_html($f['i']->get_date()); ?></li>
        			<li>Categories: <?php foreach($f['i']->get_categories() as $cat) : echo esc_html($cat->term.', '); endforeach; */
        ?>
</li>
					</ul> 
					-->
					</div>
				</div>
			<?php 
    }
    ?>
		</div>
	</div>
	<h4><a href="http://makezine.com/tag/maker-faire/">Read More &rarr;</a></h4>
<?php 
}