Showing progress for long process?
-
I’ve got a plugin that allows mass-importing of posts based on files (it’s a webcomics thing). On an admin page, administrators can select an arbitrary number of files, hit Submit, and a post is generated for each one. The actual PHP that processes this is on the admin page itself.
This works great, but if there are a lot of files to import, it can take a long time. Obviously, this is not a good user experience, as WordPress displays nothing until it’s finished processing the entire thing.
Does anyone have a method (maybe involving AJAX?) that would allow an admin page to do this process in the background and provide status updates, maybe using a progress bar?
I note that some processes — such as upgrading WordPress — give status as it happens, such as “Unpacking the Update.” How does it get around the “do the whole thing, then display” feature of PHP in cases like this?
The topic ‘Showing progress for long process?’ is closed to new replies.