The MU forums have moved to WordPress.org

Built-in way to show plugin operation progress? (6 posts)

  1. vanillaxtrakt
    Member
    Posted 15 years ago #

    I'm writing a WPMU plugin to get rid of old/unused blogs. It's nothing fancy. It just exports and/or deletes blogs en masse. The problem is I'm deleting 1800 blogs. My code does the job fine, but I was wondering if there was something built-in to WPMU so I can show the status of the deletion process. It takes so long that the page times out before it's done. The blogs still get deleted, but I need to have a way to show an updated status of the process while I'm deleting them.

    This is my first foray into PHP, and it doesn't seem too bad. I've done a bunch of research and it looks like PHP can't really do this on its own and I'll need Javascript. That's where I get really lost. I know these aren't Javascript forums but I thought I'd check and see if anyone knew a quick way to do this using what already comes with WPMU before I go spending time creating something from scratch.

  2. andrea_r
    Moderator
    Posted 15 years ago #

    Nope, nothing built in MU for that.

    Count the blogs as you delete them, break after 100, display a message on the screen.

  3. tdjcbe
    Member
    Posted 15 years ago #

    The Dashboard -> Site Admin -> Upgrades page does this. I don;t have an open install handy to check the file name though.

  4. andrea_r
    Moderator
    Posted 15 years ago #

    "The Dashboard -> Site Admin -> Upgrades page does this."

    You mean as an example to look at to see how they did it, not as something to hook into. :)

    /clarification

  5. tdjcbe
    Member
    Posted 15 years ago #

    Actually the upgrade blog process is hookable I believe. You probably could hook into it and setup a method of deleting.

  6. tdjcbe
    Member
    Posted 15 years ago #

    Actually I stand corrected. A quick look at the trac doesn't show a hook on the upgrade process. At least I can't find one. Have to admit that I'm very surprised actually.

    It is a decent example of the break down into subpages and do something method though.

    Page is here: http://trac.mu.wordpress.org/browser/trunk/wp-admin/wpmu-upgrade-site.php

    I'm kind of slammed with a security issue today so I can't look into this.

About this Topic

  • Started 15 years ago by vanillaxtrakt
  • Latest reply from tdjcbe