WordPress.org

Plugin Directory

Changeset 581407


Ignore:
Timestamp:
08/03/12 16:21:33 (21 months ago)
Author:
simonwheatley
Message:

Fixes for the 1 error whereby 1 shows instead of the tweet

Location:
twitter-tracker/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • twitter-tracker/trunk/model/twitter-profile.php

    r581221 r581407  
    1717        $this->include_retweets = $include_retweets; 
    1818        $this->construct_profile_url(); 
     19         
    1920        if ( $mandatory_hash && substr( $mandatory_hash, 0, 1 ) != '#' ) 
    2021            $mandatory_hash = '#' . $mandatory_hash; 
     
    6061        } 
    6162        $tweets_data = json_decode( $json ); 
    62          
     63 
    6364        foreach ( $tweets_data as $tweet_data ) { 
     65             
    6466            // Check for @ replies 
    6567            if ( $this->hide_replies && $this->is_reply( $tweet_data->text ) ) 
  • twitter-tracker/trunk/model/twitter-search.php

    r548106 r581407  
    77    protected $max_tweets; 
    88    protected $hide_replies; 
    9     protected $mandatory_hashtag; 
     9    protected $mandatory_hash; 
    1010    protected $tweets; 
    1111    protected $feed; 
  • twitter-tracker/trunk/twitter-tracker.php

    r581223 r581407  
    151151    { 
    152152        $defaults = array ( 
    153                     'hide_replies' => false, 
    154                 ); 
     153            'hide_replies' => false, 
     154            'include_retweets' => false, 
     155            'mandatory_hash' => '', 
     156            'max_tweets' => 3, 
     157            'html_after' => '', 
     158            'preamble' => '', 
     159        ); 
    155160        $args = wp_parse_args( $args, $defaults ); 
    156161        extract( $args ); 
    157  
    158         $mandatory_hash = isset( $mandatory_hash ) || $mandatory_hash = false; 
    159162 
    160163        // Let the user know if there's no search query 
     
    190193            'hide_replies' => false, 
    191194            'include_retweets' => false, 
     195            'mandatory_hash' => '', 
     196            'max_tweets' => 3, 
     197            'html_after' => '', 
     198            'preamble' => '', 
    192199        ); 
    193200        $args = wp_parse_args( $args, $defaults ); 
     201         
    194202        extract( $args ); 
    195  
    196         $html_after = isset( $html_after ) || $html_after = ''; 
    197         $mandatory_hash = isset( $mandatory_hash ) || $mandatory_hash = false; 
    198         $preamble = isset( $preamble ) || $preamble = ''; 
    199203 
    200204        require_once( dirname( __FILE__ ) . '/model/twitter-profile.php' ); 
     
    205209        if ( ! $local_username && ! $username ) 
    206210            return; 
     211         
    207212        $search = new TwitterProfile ( $username, $max_tweets, $hide_replies, $include_retweets, $mandatory_hash ); 
    208213        $vars = array(  
  • twitter-tracker/trunk/view/twitter-tracker/widget-contents.php

    r444668 r581407  
    1212        </div> 
    1313        <div class="info"> 
    14             <a target="_blank" class="tweet-link" href="<?php echo esc_url( $tweet->link ); ?>" alt="<?php __( 'View tweet', 'twitter-tracker' ); ?>"><?php echo esc_html( $tweet->time_since() );  ?></a> 
     14            <a target="_blank" class="tweet-link" href="<?php echo esc_url( $tweet->link ); ?>" title="<?php __( 'View tweet', 'twitter-tracker' ); ?>"><?php echo esc_html( $tweet->time_since() );  ?></a> 
    1515        </div> 
    1616        <p class="clearleft"/> 
Note: See TracChangeset for help on using the changeset viewer.