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: http://core.svn.wordpress.org/trunk@22840 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Ryan Boren 2012-11-26 14:42:43 +00:00
parent a4c7232ce6
commit 8dc401468e
2 changed files with 16 additions and 16 deletions

View File

@ -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.
*

View File

@ -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
*