WordPress.org

Plugin Directory

Changeset 419993


Ignore:
Timestamp:
08/06/11 09:10:46 (3 years ago)
Author:
ozh
Message:

1.5.1:
Fixed: Remove spaces from tags & categories before making hashtags. Thanks Milan Petrovic!
Fixed: Compatibility with P2 theme. Thanks Milan Petrovic!

Location:
yourls-wordpress-to-twitter/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • yourls-wordpress-to-twitter/trunk/inc/core.php

    r398387 r419993  
    229229function wp_ozh_yourls_api_call( $api, $url, $keyword = '', $title = '' ) { 
    230230    global $wp_ozh_yourls; 
     231 
     232        if ( empty( $wp_ozh_yourls ) ) 
     233        $wp_ozh_yourls = get_option( 'ozh_yourls' ); 
    231234 
    232235    $shorturl = ''; 
     
    329332    global $wp_ozh_yourls; 
    330333 
     334        if ( empty( $wp_ozh_yourls ) ) 
     335        $wp_ozh_yourls = get_option( 'ozh_yourls' ); 
     336 
    331337    switch( $api ) { 
    332338 
     
    407413function wp_ozh_yourls_maketweet( $url, $title, $id ) { 
    408414    global $wp_ozh_yourls; 
    409      
     415 
     416        if ( empty( $wp_ozh_yourls ) ) 
     417        $wp_ozh_yourls = get_option( 'ozh_yourls' ); 
     418 
    410419    $tweet = $wp_ozh_yourls['twitter_message']; 
    411420     
     
    445454    $_tags = array_slice( (array)get_the_tags( $id ), 0, 3 ); 
    446455    $tags = array(); 
    447     foreach( $_tags as $tag ) { $tags[] = strtolower( $tag->name ); } 
     456    foreach( $_tags as $tag ) { $tags[] = strtolower( str_replace( " ", "", $tag->name ) ); } 
    448457    unset( $_tags ); 
    449458 
     
    451460    $_cats = array_slice( (array)get_the_category( $id ), 0, 3 ); 
    452461    $cats = array(); 
    453     foreach( $_cats as $cat ) { $cats[] = strtolower( $cat->name ); } 
     462    foreach( $_cats as $cat ) { $cats[] = strtolower( str_replace( " ", "", $cat->name ) ); } 
    454463    unset( $_cats ); 
    455464 
     
    518527function wp_ozh_yourls_generate_on( $type ) { 
    519528    global $wp_ozh_yourls; 
     529 
     530        if ( empty( $wp_ozh_yourls ) ) 
     531        $wp_ozh_yourls = get_option( 'ozh_yourls' ); 
     532 
    520533    return ( isset( $wp_ozh_yourls['generate_on_'.$type] ) && $wp_ozh_yourls['generate_on_'.$type] == 1 ); 
    521534} 
     
    524537function wp_ozh_yourls_tweet_on( $type ) { 
    525538    global $wp_ozh_yourls; 
     539 
     540        if ( empty( $wp_ozh_yourls ) ) 
     541        $wp_ozh_yourls = get_option( 'ozh_yourls' ); 
     542 
    526543    return ( isset( $wp_ozh_yourls['tweet_on_'.$type] ) && $wp_ozh_yourls['tweet_on_'.$type] == 1 ); 
    527544} 
  • yourls-wordpress-to-twitter/trunk/plugin.php

    r398391 r419993  
    66Author: Ozh 
    77Author URI: http:/ozh.org/ 
    8 Version: 1.5 
     8Version: 1.5.1 
    99*/ 
    1010 
     
    4949              Removed: Unneeded JSON class 
    5050 * 1.5:       Added: BuddyPress support (member and group URLs) 
    51           Added: Localization support 
    52           Fixed: A variety of PHP warnings 
     51              Added: Localization support 
     52              Fixed: A variety of PHP warnings 
     53 * 1.5.1:     Fixed: Remove spaces from tags & categories before making hashtags. Thanks Milan Petrovic! 
     54              Fixed: Compatibility with P2 theme. Thanks Milan Petrovic! 
    5355 */ 
    5456 
  • yourls-wordpress-to-twitter/trunk/readme.txt

    r398391 r419993  
    55Requires at least: 3.0 
    66Tested up to: 9.9 
    7 Stable tag: 1.5 
     7Stable tag: 1.5.1 
    88 
    99Use YOURLS (a free GPL URL shortener service) or another public service (tinyURL...) to create short URLs of your posts and tweet them, or to create short URLs for your BuddyPress groups and users 
Note: See TracChangeset for help on using the changeset viewer.