[Plugin: HTML Import 2] importing images to media – fix – WP 3.4.1
-
After I made the below changes importing images worked right. Before it imported images but file type was blank when viewed from media page, and so thumbnails were not being generated and img tags were not displaying properly. I’m not sure if this is right way to do it, but it worked. Hope this helps someone.
WordPress 3.4.1
HTML Import 2.2Line 553:
Change
$return = apply_filters( 'wp_handle_upload', array( 'file' => $new_file, 'url' => $url, 'type' => $type ) );
to
$return = apply_filters( 'wp_handle_upload', array( 'file' => $new_file, 'url' => $url, 'type' => wp_check_filetype( $file, null ) ) );
Line 579
Change
$attachment = array( 'post_mime_type' => $type,
to
$attachment = array( 'post_mime_type' => wp_check_filetype( $file, null ),
https://www.ads-software.com/extend/plugins/import-html-pages/
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘[Plugin: HTML Import 2] importing images to media – fix – WP 3.4.1’ is closed to new replies.