自动设置内容里的第一张图片为特色图片,并上传到Aliyun OSS
本文章测试于 WordPress 4.4.2 这儿需要用的两个插件 阿里云附件存储 [http://yii.im/posts/aliyun-oss-support-plugin-for-wordpress] Auto Post Thumbnail [https://wordpress.org/plugins/auto-post-thumbnail/] 接下来 要对 auto post thumbnail 里的函数 apt_generate_post_thumb 稍作修改,将文件下载保存在本地替换成使用 wp_handle_sideload 上传到OSS /** * Function to fetch the image from URL and …