Support » Plugins » Hacks » Passing xml file and skip the first screen on WordPress Importer

  • Ayman



    I’m creating a plugin that is downloading xml file from a remote server to the “local server”, but the next step is to pass that downloaded file to WordPress Importer plugin and make the importer process it with out asking to upload a file to import so basicly passing the file to the uploader/importer and skipping the first screen.

    Any suggestions or Ideas?

Viewing 1 replies (of 1 total)
  • Moderator bcworkz


    Your script would need to send a POST request that exactly mimics the request sent by the first screen when you click the “Upload file and import” button. This includes sending the correct nonce that is checked for validity as well as all the other data. Check the source for wp_import_upload_form() in wp-admin/includes/template.php as well as the greet() and dispatch() methods of the WP_Import class in the plugin source to see what is really happening in a normal import process.

Viewing 1 replies (of 1 total)
  • The topic ‘Passing xml file and skip the first screen on WordPress Importer’ is closed to new replies.