Upload to FTP wordpress远程附件插件

screenshot-1.png

台湾伙伴写的wordpress ftp远程附件
唯一缺点对SSL 略不支持可以先正常保存后通过修改数据库使用。
假如作者不修改,那我有空修改让他支持
upload-to-ftp.1.0.5.zip

必须配合这个一起用

//remove insert images attribute
//add_filter( 'the_content', 'fanly_remove_images_attribute', 99 );
add_filter( 'post_thumbnail_html', 'fanly_remove_images_attribute', 10 );
add_filter( 'image_send_to_editor', 'fanly_remove_images_attribute', 10 );
function fanly_remove_images_attribute( $html ) {
        //$html = preg_replace( '/(width|height)="\d*"\s/', "", $html );
        $html = preg_replace( '/width="(\d*)"\s+height="(\d*)"\s+class="[^"]*"/', "", $html );
        $html = preg_replace( '/  /', "", $html );
        return $html;
}

此处评论已关闭