Permalink
Browse files

Include ms.php theme-side for its filesize and available space functi…

…ons.
  • Loading branch information...
1 parent d43a2ba commit e691fe35d97da3062aa02a829f0a7202805b16d5 @JJJ JJJ committed Aug 14, 2012
Showing with 7 additions and 1 deletion.
  1. +7 −1 liveblog.php
View
@@ -71,6 +71,12 @@ public static function load() {
private static function includes() {
require( dirname( __FILE__ ) . '/classes/class-wpcom-liveblog-entry.php' );
require( dirname( __FILE__ ) . '/classes/class-wpcom-liveblog-entry-query.php' );
+
+ // Manually include ms.php theme-side in multisite environments because
+ // we need its filesize and available space functions.
+ if ( ! is_admin() && is_multisite() ) {
+ require_once( ABSPATH . '/wp-admin/includes/ms.php' );
+ }
}
/**
@@ -753,7 +759,7 @@ private static function max_upload_size() {
$bytes = apply_filters( 'upload_size_limit', min( $u_bytes, $p_bytes ), $u_bytes, $p_bytes );
return $bytes;
- }
+ }
}
/**

0 comments on commit e691fe3

Please sign in to comment.