diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2022-11-20 21:19:08 +0100 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2022-11-20 21:19:08 +0100 |
commit | e3d29ee8cb3b314bc6b068bd67dd06a752beb2cb (patch) | |
tree | 39551733a9d2b97c2f6b8269e9e7aa2d0ec324de /import-posts.php | |
parent | 785c83658e3f5b0bae6ad064010970ad6fdc33e7 (diff) | |
download | migrate-e3d29ee8cb3b314bc6b068bd67dd06a752beb2cb.tar.gz migrate-e3d29ee8cb3b314bc6b068bd67dd06a752beb2cb.tar.bz2 migrate-e3d29ee8cb3b314bc6b068bd67dd06a752beb2cb.zip |
Set thumbnail size before migrating images.
Diffstat (limited to 'import-posts.php')
-rw-r--r-- | import-posts.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/import-posts.php b/import-posts.php index 113d356..70aa7a4 100644 --- a/import-posts.php +++ b/import-posts.php @@ -29,6 +29,10 @@ require_once getcwd() . '/wp-admin/includes/taxonomy.php'; // Required for kses functionality require_once getcwd() . '/wp-includes/kses.php'; +// Import media handling to get post thumbnails to work +require_once getcwd() . '/wp-includes/media.php'; + +set_post_thumbnail_size( 500, 300, true ); $archive = new ZipArchive(); if ( true === $archive->open( $filename, ZipArchive::RDONLY ) ) { |