QQWorld Auto Save Images - Version 1.1

Version Description

Download this release

Release Info

Developer qqworld
Plugin Icon 128x128 QQWorld Auto Save Images
Version 1.1
Comparing to
See all releases

Code changes from version 1.0 to 1.1

Files changed (1) hide show
  1. qqworld-auto-save-images.php +4 -4
qqworld-auto-save-images.php CHANGED
@@ -1,10 +1,10 @@
1
  <?php
2
  /*
3
  Plugin Name: QQWorld Auto Save Images
4
- Plugin URI: http://wordpress.org/plugins/qqworld-auto-save-images/
5
  Description: Automatically keep the all remote picture to the local, and automatically set featured image. 自动保存远程图片到本地,自动设置特色图片,并且支持机器人采集软件从外部提交。
6
- Version: 1.0
7
- Author: Michael Wang
8
  Author URI: http://project.qqworld.org
9
  */
10
 
@@ -47,7 +47,7 @@ class QQWorld_auto_save_images {
47
  $file=file_get_contents($image_url);
48
  $filename=basename($image_url);
49
  preg_match( '/(.*?)(\.\w+)$/', $filename, $match );
50
- $im_name = md5($match[1]).$match[2];
51
  $res=wp_upload_bits($im_name,'',$file);
52
  $attach_id = $this->insert_attachment($res['file'],$post_id);
53
  if( $i==1 ) set_post_thumbnail( $post_id, $attach_id );
1
  <?php
2
  /*
3
  Plugin Name: QQWorld Auto Save Images
4
+ Plugin URI: http://project.qqworld.org
5
  Description: Automatically keep the all remote picture to the local, and automatically set featured image. 自动保存远程图片到本地,自动设置特色图片,并且支持机器人采集软件从外部提交。
6
+ Version: 1.1
7
+ Author: QQWorld
8
  Author URI: http://project.qqworld.org
9
  */
10
 
47
  $file=file_get_contents($image_url);
48
  $filename=basename($image_url);
49
  preg_match( '/(.*?)(\.\w+)$/', $filename, $match );
50
+ $im_name = $match[1].$match[2];
51
  $res=wp_upload_bits($im_name,'',$file);
52
  $attach_id = $this->insert_attachment($res['file'],$post_id);
53
  if( $i==1 ) set_post_thumbnail( $post_id, $attach_id );