WordPress.org

Make WordPress Core

Changeset 22840


Ignore:
Timestamp:
11/26/2012 02:42:43 PM (9 years ago)
Author:
ryan
Message:

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

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/ms.php

    r22497 r22840  
    273273}
    274274add_action( 'admin_notices', 'new_user_email_admin_notice' );
    275 
    276 /**
    277  * Determines if there is any upload space left in the current blog's quota.
    278  *
    279  * @since 3.0.0
    280  * @return bool True if space is available, false otherwise.
    281  */
    282 function is_upload_space_available() {
    283     if ( get_site_option( 'upload_space_check_disabled' ) )
    284         return true;
    285 
    286     if ( !( $space_allowed = get_upload_space_available() ) )
    287         return false;
    288 
    289     return true;
    290 }
    291275
    292276/**
  • trunk/wp-includes/ms-functions.php

    r22497 r22840  
    19891989
    19901990/**
     1991 * Determines if there is any upload space left in the current blog's quota.
     1992 *
     1993 * @since 3.0.0
     1994 * @return bool True if space is available, false otherwise.
     1995 */
     1996function is_upload_space_available() {
     1997    if ( get_site_option( 'upload_space_check_disabled' ) )
     1998        return true;
     1999
     2000    if ( !( $space_allowed = get_upload_space_available() ) )
     2001        return false;
     2002
     2003    return true;
     2004}
     2005
     2006/**
    19912007 * @since 3.0.0
    19922008 *
Note: See TracChangeset for help on using the changeset viewer.