- This topic has 12 replies, 2 voices, and was last updated 11 years, 9 months ago by
Sebastian.
Author | Posts |
---|---|
Abland
July 3, 2013 at 2:12 pm
|
Heads up! this post was created when Microthemer was at version 2. The current version is 7. Some references to the interface may be out of date. Hi, I upgraded to the recent version 2.1.5, and multisite themes on sub blogs behave as though the microtheme was deactivated. It worked properly on version 2.1.2, though. I did notice that in the microtheme’s options there’s only “Delete” and no option to Deactivate or Activate. I tried saving the options again to the theme and it said saved and activated but it still behaved as if deactivated. I exported the microtheme, then deleted, then uploaded my backup which seemed to install automatically with no option to activate, and again still behaved as though not activated. Wordpress is current, it’s multisite, and I’m using an Artisteer theme on the blog and sub blogs. I’ve had to revert to 2.1.2 because it’s a production site. Thanks. ** NOTE: I cannot confirm whether the main blog behaves activated or deactivated as it was not designed via Microthemer |
Sebastian
July 3, 2013 at 2:19 pm
|
Ah, this is probably something to do with a change I made to get-dir-paths.inc.php where it checks the version number for backwards compatibility with pre WP 3.0 versions. There’s probably a mistake in the logic there. I will look into this now… Cheers, Seb |
Abland
July 3, 2013 at 2:33 pm
|
Hi, Sebastian, Confirmed. When I remove the version check it works. I’ve tried rewriting the version check a few ways and haven’t hit the correct way yet. I’ll post if I find it. Thanks for the quick reply ๐ |
Abland
July 3, 2013 at 2:43 pm
|
Hi again, Sebastian, Maybe this: global $wp_version; I changed my version file to 2.5 but cannot confirm the above works as my theme also required version 3 or higher. Just confirmed it works as changed above to require 3.2 and set my wp to 3.1 and Microthemer gave me the alert about version. |
Sebastian
July 3, 2013 at 3:13 pm
|
Hey, Your code would make all WordPress versions 3 or later not have any values set for micro_root_dir and micro_root_url (if not multi-site) Could you see if this works on multi-site please?
|
Abland
July 3, 2013 at 3:36 pm
|
Good Catch, Sebastian, I didn’t realize I had cut off all the options. (And people pay me to code – lol ๐ ) Yes, the above code works. |
Sebastian
July 3, 2013 at 4:23 pm
|
Great! Thanks for your help Abland. I removed the Activate Link from the Manage Theme page because the user can achieve the same result by importing their theme via the Microthemer UI (with the overwrite method). I decided it was best to only have one way to do this to prevent people from accidentally overwriting their work on the UI page. The connection between the UI and activating a Micro Theme isn’t necessarily obvious. I will release version 2.1.9 shortly which will contain the multi-site fix and some additional CSS properties (min/max width and height and cross-browser opacity). Cheers, Seb |
Abland
July 3, 2013 at 4:28 pm
|
Hi, Sebatian, The code does throw errors on a lower WP version. What if leave as only a multisite check and do versioning in “tvr-microthemer.php”? global $wp_version; I modified some of your own coding for the above. This way it doesn’t throw the errors but does keep the admin notice in the blog and the network admin, too. |
Sebastian
July 3, 2013 at 4:48 pm
|
Hey, Did you adjust the version number on your multi-site testing server? Because I just tested the code I suggested on a regular 2.8 install of WordPress and it works fine… I’d prefer to keep supporting older version if possible. Cheers, Seb |
Abland
July 3, 2013 at 4:53 pm
|
On my multisite the errors were for not finding the theme directory. Current code requires version 3 or higher for multisite to work. The alert for tvr-microthemer.php allows it to continue working but just adds a notice to the top of the admin pages, including network admin. Basically use the original if is_multisite without version check. Then use the admin notice in tvr-microthemer.php instead. |
Sebastian
July 3, 2013 at 5:07 pm
|
WordPress will throw a fatal error if the is_multisite() function gets called on older versions of WordPress. Hence the version check just before the call (if it returns false PHP won’t even evaluate the 2nd condition, so no fatal error). I think I may be beginning to get a bit lost in what you’re saying now though lol! ๐ Seb |
Abland
July 3, 2013 at 5:08 pm
|
My error – the code works fine. Multisite didn’t exist prior to version 3. My test was on multisite and versions were hypothetical. Quote me: (And people pay me to code – lol ๐ ) |
Sebastian
July 3, 2013 at 5:32 pm
|
Right, gotcha. And don’t worry, I make these kind of mistakes all day long! Cheers, Seb |