WordPress.org

Plugin Directory

Changeset 1180563


Ignore:
Timestamp:
06/14/15 09:48:40 (23 months ago)
Author:
ozh
Message:

2.0.4
put retweeted tweets on their own line to allow for auto embed -- see issue 12

Location:
ozh-tweet-archiver/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ozh-tweet-archiver/trunk/inc/utils.php

    r1160748 r1180563  
    208208    global $ozh_ta; 
    209209     
    210     if( $ozh_ta['un_tco'] == 'yes' ) { 
    211         $replace = sprintf( '<a href="%s" title="%s" class="link link_untco">%s</a>', 
    212                             $expanded_url, $expanded_url, $display_url ); 
     210    // If the expanded URL is on twitter.com, return the tweet with a leading newline for autoembedding 
     211    if( parse_url( $expanded_url, PHP_URL_HOST ) == 'twitter.com' ) { 
     212        $replace = "\n\n" . $expanded_url . "\n"; 
     213     
     214    // Other URLs 
    213215    } else { 
    214         $replace = sprintf( '<a href="%s" class="link link_tco">%s</a>', 
    215                             $tco_url, $tco_url ); 
     216     
     217        if( $ozh_ta['un_tco'] == 'yes' ) { 
     218            $replace = sprintf( '<a href="%s" title="%s" class="link link_untco">%s</a>', 
     219                                $expanded_url, $expanded_url, $display_url ); 
     220        } else { 
     221            $replace = sprintf( '<a href="%s" class="link link_tco">%s</a>', 
     222                                $tco_url, $tco_url ); 
     223        } 
     224         
    216225    } 
    217226     
  • ozh-tweet-archiver/trunk/ozh-ta.php

    r1160748 r1180563  
    44Plugin URI: http://planetozh.com/blog/my-projects/ozh-tweet-archiver-backup-twitter-with-wordpress/ 
    55Description: Archive your tweets and import them as posts 
    6 Version: 2.0.3 
     6Version: 2.0.4 
    77Author: Ozh 
    88Author URI: http://ozh.org/ 
     
    2929 * 
    3030 * 2.0.3   fix hashtags with umlauts (and probably other funky chars) -- thanks to pep 
     31 * 
     32 * 2.0.4   put retweeted tweets on their own line to allow for auto embed -- see issue 12 
    3133 * 
    3234 */ 
Note: See TracChangeset for help on using the changeset viewer.