Skip to content

Commit

Permalink
Include ms.php theme-side for its filesize and available space functi…
Browse files Browse the repository at this point in the history
…ons.
  • Loading branch information
JJJ committed Aug 14, 2012
1 parent d43a2ba commit e691fe3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion liveblog.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
}
}

/**
Expand Down Expand Up @@ -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;
}
}
}

/**
Expand Down

0 comments on commit e691fe3

Please sign in to comment.