admin管理员组

文章数量:1335349

I am working on my first script to create a WP post with images and upload those images to the uploads folder.

I am clear about wp_insert_post and was able to upload an image to the server with wp_handle_upload, but what do I do after it's uploaded to create all its resized versions (for responsive design) and add all the relevant metadata info to the database?

Also do I need wp_media_upload_handler (since it takes no parameters) and, if so, how/when do I run that in relation to wp_handle_upload?

本文标签: pluginswhat functions to use to resize images and create DB metadata for them afterduring upload