From 8bf86e30f7979e196a191bca107b1842e224fff9 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Mon, 26 Nov 2012 14:42:43 +0000 Subject: [PATCH] Make is_upload_space_available() available for front end page loads. Fixes fatal error when calling wp_editor() from the front end. Props scribu, itworx fixes #22585 git-svn-id: https://develop.svn.wordpress.org/trunk@22840 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/ms.php | 16 ---------------- wp-includes/ms-functions.php | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/wp-admin/includes/ms.php b/wp-admin/includes/ms.php index 004b9b8b06..b62e1d0b2d 100644 --- a/wp-admin/includes/ms.php +++ b/wp-admin/includes/ms.php @@ -273,22 +273,6 @@ function new_user_email_admin_notice() { } add_action( 'admin_notices', 'new_user_email_admin_notice' ); -/** - * Determines if there is any upload space left in the current blog's quota. - * - * @since 3.0.0 - * @return bool True if space is available, false otherwise. - */ -function is_upload_space_available() { - if ( get_site_option( 'upload_space_check_disabled' ) ) - return true; - - if ( !( $space_allowed = get_upload_space_available() ) ) - return false; - - return true; -} - /** * Check whether a blog has used its allotted upload space. * diff --git a/wp-includes/ms-functions.php b/wp-includes/ms-functions.php index 10fc11f894..7a8ecfb251 100644 --- a/wp-includes/ms-functions.php +++ b/wp-includes/ms-functions.php @@ -1987,6 +1987,22 @@ function get_upload_space_available() { return $space_allowed - $space_used; } +/** + * Determines if there is any upload space left in the current blog's quota. + * + * @since 3.0.0 + * @return bool True if space is available, false otherwise. + */ +function is_upload_space_available() { + if ( get_site_option( 'upload_space_check_disabled' ) ) + return true; + + if ( !( $space_allowed = get_upload_space_available() ) ) + return false; + + return true; +} + /** * @since 3.0.0 *