WordPress.org

Make WordPress Core

Changeset 21256


Ignore:
Timestamp:
07/10/2012 01:33:44 PM (6 years ago)
Author:
westi
Message:

Multisite: Make it easy to replace or augment the over-quota message displayed when you try and upload new media and you have reached your quota.

Fixes #21179 props dllh, jkudish.

Location:
trunk
Files:
2 edited

Legend:

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

    r21240 r21256  
    13271327?></div>
    13281328<?php
    1329 // Check quota for this blog if multisite
    13301329if ( is_multisite() && !is_upload_space_available() ) {
    1331     echo '<p>' . sprintf( __( 'Sorry, you have filled your storage quota (%s MB).' ), get_space_allowed() ) . '</p>';
     1330    do_action( 'upload_ui_over_quota' );
    13321331    return;
    13331332}
     
    20662065add_action('post-plupload-upload-ui', 'media_upload_flash_bypass');
    20672066
     2067function multisite_over_quota_message() {
     2068    echo '<p>' . sprintf( __( 'Sorry, you have used all of your storage quota of %s MB.' ), get_space_allowed() ) . '</p>';
     2069}
     2070
    20682071/**
    20692072 * {@internal Missing Short Description}}
  • trunk/wp-includes/ms-default-filters.php

    r20461 r21256  
    4646add_filter( 'upload_mimes', 'check_upload_mimes' );
    4747add_filter( 'upload_size_limit', 'upload_size_limit_filter' );
     48add_action( 'upload_ui_over_quota', 'multisite_over_quota_message' );
    4849
    4950// Mail
Note: See TracChangeset for help on using the changeset viewer.