The MU forums have moved to WordPress.org

Detecting WordPress MU versus vanilla WordPress? (7 posts)

  1. ceejayoz
    Member
    Posted 17 years ago #

    I'm working a bit on making Tarski MU-friendly out of the box.

    For this, I need to be able to do conditionals that remove certain functionality and messages based on whether it's WPMU or WP.

    Is there any standardised way of doing this, or will I need to kludge it with a function_exists() or something that detects an MU-only function?

  2. lunabyte
    Member
    Posted 17 years ago #

    Easiest way:

    if ( function_exists("is_site_admin") {
         $mu = true;
    } else {
         $mu = false;
    }

    That's an MU only function, which detects the presence of an overall MU admin, and isn't present in WP.

  3. drmike
    Member
    Posted 17 years ago #

    Greets:

    Save yourself a step:

    http://svn.automattic.com/wpcom-themes/tarski/

    Regards,
    -drmike

  4. ceejayoz
    Member
    Posted 17 years ago #

    Very old version, drmike, and they ripped out a lot of functionality. The theme seems to work fine on MU, I just want to take out a few things like notes about upload locations for custom CSS files, upgrade notification, etc. Thanks, though - I'll probably be looking at it for any tweaks they may have made to fix issues.

    lunabyte, that's great, thanks!

  5. Farms2
    Member
    Posted 17 years ago #

    Just download my theme pack for a working version.

  6. ceejayoz
    Member
    Posted 17 years ago #

    Easier for me to work from our codebase - 1.3 is out now, and 1.3.1 is underway on our dev site. I'm hoping to fold in WPMU stuff in 1.3.1.

    I'd welcome any tips/requests/etc. if you or others have 'em... more WPMU themes is good for everyone. :D

  7. lunabyte
    Member
    Posted 17 years ago #

    Nice to see a theme author take the initiative.

    Thanks. ;)

About this Topic

  • Started 17 years ago by ceejayoz
  • Latest reply from lunabyte