Plugin Directory

Changeset 1486111


Ignore:
Timestamp:
08/30/2016 05:14:53 AM (10 years ago)
Author:
NerdCow
Message:

removed attachments

Location:
tweet-wheel
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tweet-wheel/tags/1.0.6/includes/classes/class-twp-tweet.php

    r1478827 r1486111  
    224224            'status' => stripslashes($tweet)
    225225        );
    226        
    227         // Attempt to upload an image if attached...
    228         if( $this->has_image( $post_id ) && ! isset( $_REQUEST['exclude_tweet_image'] ) // Queue
    229         ) :
    230        
    231             $image = get_attached_file( get_post_thumbnail_id( $post_id ) );
    232        
    233             if( file_exists( $image ) && filesize( $image ) / 1024 < ( 5 * 1024 ) ) :
    234        
    235                 $response = $connection->upload( "media/upload", array( "media" => $image ) );
    236        
    237                 if( isset( $response->media_id ) ) :
    238                     $args['media_ids'] = $response->media_id;
    239                 endif;
    240 
    241             endif;
    242 
    243         endif;
    244        
     226       
    245227        // Parse short url data from transient and clean-up
    246228        $short_url_data = '';
     
    332314            'status' => stripslashes($tweet)
    333315        );
    334        
    335         // Attempt to upload an image if attached...
    336         if( $this->has_image( $post_id ) ) :
    337        
    338             $image = get_attached_file( get_post_thumbnail_id( $post_id ) );
    339        
    340             if( filesize( $image ) / 1024 < ( 5 * 1024 ) ) :
    341        
    342                 $response = $connection->upload( "media/upload", array( "media" => $image ) );
    343        
    344                 if( isset( $response->media_id ) )
    345                     $args['media_ids'] = $response->media_id;
    346 
    347             endif;
    348 
    349         endif;
    350316       
    351317        // Parse short url data from transient and clean-up
  • tweet-wheel/trunk/includes/classes/class-twp-tweet.php

    r1451952 r1486111  
    225225        );
    226226       
    227         // Attempt to upload an image if attached...
    228         if( $this->has_image( $post_id ) && ! isset( $_REQUEST['exclude_tweet_image'] ) // Queue
    229         ) :
    230        
    231             $image = get_attached_file( get_post_thumbnail_id( $post_id ) );
    232        
    233             if( file_exists( $image ) && filesize( $image ) / 1024 < ( 5 * 1024 ) ) :
    234        
    235                 $response = $connection->upload( "media/upload", array( "media" => $image ) );
    236        
    237                 if( isset( $response->media_id ) ) :
    238                     $args['media_ids'] = $response->media_id;
    239                 endif;
    240 
    241             endif;
    242 
    243         endif;
    244        
    245227        // Parse short url data from transient and clean-up
    246228        $short_url_data = '';
     
    332314            'status' => stripslashes($tweet)
    333315        );
    334        
    335         // Attempt to upload an image if attached...
    336         if( $this->has_image( $post_id ) ) :
    337        
    338             $image = get_attached_file( get_post_thumbnail_id( $post_id ) );
    339        
    340             if( filesize( $image ) / 1024 < ( 5 * 1024 ) ) :
    341        
    342                 $response = $connection->upload( "media/upload", array( "media" => $image ) );
    343        
    344                 if( isset( $response->media_id ) )
    345                     $args['media_ids'] = $response->media_id;
    346 
    347             endif;
    348 
    349         endif;
    350316       
    351317        // Parse short url data from transient and clean-up
Note: See TracChangeset for help on using the changeset viewer.