<?php

/**
 * Tutorial: Twitter feed com jQuery e PHP (api 1.1)
 *
 * @author   Fernando Moreira <*****@*****.**>
 * @license  MIT License
 * @link     http://nandomoreira.me/twitter-feed-com-jquery-e-php-api-1-1/
 */
include 'config.php';
include 'functions.php';
$tweets = twitter_feed();
echo json_encode($tweets);
die;
    }
    ?>
      <?php 
}
?>
	  
	  
      <?php 
if (have_rows('twitter_feeds')) {
    ?>
        <?php 
    while (have_rows('twitter_feeds')) {
        the_row();
        ?>
          <?php 
        $tweets = twitter_feed(get_sub_field('username'), get_sub_field('number_of_items'));
        ?>
          <?php 
        if ($tweets) {
            ?>
            <?php 
            foreach ($tweets as $item) {
                ?>
              <li>
                <div  class="social__slider--feed__item">
                  <ul class="social__slider__icons">
                    <li><a class="icon-button icon-button--twitter" href="https://twitter.com/<?php 
                echo $item->user->screen_name;
                ?>
" target="_blank"><span>Twitter</span></a></li>
                    <li><a class="icon-button icon-button--link" href="https://twitter.com/statuses/<?php 
Exemple #3
0
    ?>
/i/delicious.png" title="Find <?php 
    echo $curauth->display_name;
    ?>
 on Delicious" /></a> 
		<?php 
}
?>
	</p>
	<div class="span-6">
		<?php 
if (get_the_author_meta('twitter', $curauth->ID)) {
    ?>
		<h3>Latest From Twitter</h3>
		<?php 
    twitter_feed(get_the_author_meta('twitter', $curauth->ID));
    ?>
		<?php 
}
?>
	</div>
	<div class="span-6">
		<?php 
function new_excerpt_length($length)
{
    return 20;
}
add_filter('excerpt_length', 'new_excerpt_length');
?>
		<h3>From The Blog</h3>
		<?php