Problem:
In the WPMU environment, Thesis CSS link looks like:...?thesis_do=css&ref=...
instead of "normal" link to a .css file
Details:
The code responsible for that resides in the lib/core/skin/box.php, in class class thesis_stylesheets_link :'url' => !is_multisite() ? THESIS_USER_SKIN_URL . '/css.css' : site_url("?thesis_do=css&ref=". THESIS_MS_CSS_VAL . time()),
Note that the time() call at the end makes this link not cacheable.
The patch:
1. In the box.php:public function html() {
global $wpdb;
$styles = $links = array();
$styles['layout'] = array(
'url' => THESIS_USER_SKIN_URL . '/css' . (is_multisite() ? $wpdb->blogid : '') . '.css',
2. In lib/core/skin/css.php
public function write($skin, $custom) {
global $wpdb;
$css = $this->reset() . $this->update(apply_filters('thesis_css', $skin), $custom);
$css = strip_tags($css);
if (is_multisite()) {
update_option('thesis_raw_css', $css);
wp_cache_flush();
$lid = @fopen(THESIS_USER_SKIN . '/css' . $wpdb->blogid . '.css', 'w');
@fwrite($lid, trim($css));
@fclose($lid);
}
Thesis 2.0.2 did not change this. However, I was told that even a better solution is planned for the 2.0.3 release.
ReplyDeleteHello you seem to be the only person talking about wordpress mu and thesis 2.0.
ReplyDeleteI am having an issue with getting it working right on MU. When I go images under the skin editor it should images from other site vs the site I am working it. It seemed like this happened after the most recent patch to wordpress.
Any idea on a fix?
Hello Gera3d,
DeleteI did not have that issue, so I cannot help you with that.
Ask Chris at https://twitter.com/pearsonified - he is very helpful and usually answers right away.
Thank you!
I have this problem too, though your patch didn't allow me to write to the normal css file.
ReplyDeleteI believe that this is also the root of the problem that prevents the iPhone app from connecting to multisite blogs (if running thesis) because it creates invalid markup.