mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-25 01:18:42 +00:00
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:
parent
a4c7232ce6
commit
8dc401468e
@ -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…
x
Reference in New Issue
Block a user