Skip to content

Instantly share code, notes, and snippets.

@alisspers
Created February 15, 2013 08:45
Show Gist options
  • Save alisspers/4959191 to your computer and use it in GitHub Desktop.
Save alisspers/4959191 to your computer and use it in GitHub Desktop.
Shows how WP core uses the hook upload_ui_over_quota
<?php
// ./wp-includes/ms-default-filters.php, line 48
add_action( 'upload_ui_over_quota', 'multisite_over_quota_message' );
// ./wp-admin/includes/media.php, line 2256-2263
/**
* Displays the out of storage quota message in Multisite.
*
* @since 3.5.0
*/
function multisite_over_quota_message() {
echo '<p>' . sprintf( __( 'Sorry, you have used all of your storage quota of %s MB.' ), get_space_allowed() ) . '</p>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment