Add commentmeta tables to an existing MU installation


Needs testing but it’s worked on two existing MU installations so far. I haven’t tested it on a single user setup but I guessed at the code it would probably need… Please share, test, fix, steal, reuse, and recycle this code as needed. There’s probably better ways of doing this, but this got me through it in a pinch.

jjj_addcommentmeta

,

  1. #1 by Ron on December 2, 2009 - 8:47 pm

    The get_site_option function exists in both WP & WPMU. For what you are doing here, you can use the site option functions in both code bases. What you need to check is global $wpmu_version; if( isset( $wpmu_version ) ) {
    // then MU
    } else {
    // WP
    }

  2. #2 by John on December 2, 2009 - 8:54 pm

    I knew that. I was just testing you. :)

  3. #3 by Ron on December 3, 2009 - 2:27 pm

    :D That was one of the things in my slides for wcnyc (which I didn’t have when I did the presentation).

  4. #4 by webmaestro on January 5, 2010 - 6:25 pm

    the pastebin link has expired…

  5. #5 by webmaestro on January 5, 2010 - 6:26 pm

    btw… thank you very much!

  6. #6 by John on January 5, 2010 - 6:28 pm

    Removed. Thanks for the heads up!

(will not be published)