media_sideload_image
-
I am looking to run a stand alone file, one time, to attach images from an old non-WP system.
I have the ability to run:
require_once(ABSPATH . 'wp-admin/includes/media.php'); require_once(ABSPATH . 'wp-admin/includes/file.php'); require_once(ABSPATH . 'wp-admin/includes/image.php'); $image_result = media_sideload_image($images_url, $post_id); echo '<pre>'; var_dump($image_result);
for each image.
However, I need to know what to specify to ensure that it’s reading and inserting into the proper multisite tables. AKA site1, site2, site4, etc etc.
Any help appreciated.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘media_sideload_image’ is closed to new replies.