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
This commit is contained in:
parent
9dd670c47a
commit
8bf86e30f7
@ -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.
|
||||
*
|
||||
|
@ -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
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user