Changeset 1486111
- Timestamp:
- 08/30/2016 05:14:53 AM (10 years ago)
- Location:
- tweet-wheel
- Files:
-
- 2 edited
-
tags/1.0.6/includes/classes/class-twp-tweet.php (modified) (2 diffs)
-
trunk/includes/classes/class-twp-tweet.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tweet-wheel/tags/1.0.6/includes/classes/class-twp-tweet.php
r1478827 r1486111 224 224 'status' => stripslashes($tweet) 225 225 ); 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 245 227 // Parse short url data from transient and clean-up 246 228 $short_url_data = ''; … … 332 314 'status' => stripslashes($tweet) 333 315 ); 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;350 316 351 317 // Parse short url data from transient and clean-up -
tweet-wheel/trunk/includes/classes/class-twp-tweet.php
r1451952 r1486111 225 225 ); 226 226 227 // Attempt to upload an image if attached...228 if( $this->has_image( $post_id ) && ! isset( $_REQUEST['exclude_tweet_image'] ) // Queue229 ) :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 245 227 // Parse short url data from transient and clean-up 246 228 $short_url_data = ''; … … 332 314 'status' => stripslashes($tweet) 333 315 ); 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;350 316 351 317 // Parse short url data from transient and clean-up
Note: See TracChangeset
for help on using the changeset viewer.