From 86d82ac795e45e56b49f3bd4793b1c21460583e0 Mon Sep 17 00:00:00 2001 From: Peter Westwood Date: Wed, 11 Jul 2012 10:20:15 +0000 Subject: [PATCH] Multisite: Tidy up [21256] and introduce/correct PHPDoc for a few other media upload functions. Fixes #21179 props SergeyBiryukov. git-svn-id: https://develop.svn.wordpress.org/trunk@21260 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/media.php | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index 1fa645896f..cbd0d1a079 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -2051,7 +2051,7 @@ function _insert_into_post_button($type) { } /** - * {@internal Missing Short Description}} + * Displays the multi-file uploader message. * * @since 2.6.0 */ @@ -2064,12 +2064,8 @@ function media_upload_flash_bypass() { } add_action('post-plupload-upload-ui', 'media_upload_flash_bypass'); -function multisite_over_quota_message() { - echo '

' . sprintf( __( 'Sorry, you have used all of your storage quota of %s MB.' ), get_space_allowed() ) . '

'; -} - /** - * {@internal Missing Short Description}} + * Displays the browser's built-in uploader message. * * @since 2.6.0 */ @@ -2082,6 +2078,11 @@ function media_upload_html_bypass() { } add_action('post-html-upload-ui', 'media_upload_html_bypass'); +/** + * Displays the "After a file has been uploaded..." message. + * + * @since 3.3.0 + */ function media_upload_text_after() { ?> @@ -2090,9 +2091,9 @@ function media_upload_text_after() { add_action('post-upload-ui', 'media_upload_text_after', 5); /** - * {@internal Missing Short Description}} + * Displays the checkbox to scale images. * - * @since 2.6.0 + * @since 3.3.0 */ function media_upload_max_image_resize() { $checked = get_user_setting('upload_resize') ? ' checked="true"' : ''; @@ -2113,6 +2114,15 @@ function media_upload_max_image_resize() { ' . sprintf( __( 'Sorry, you have used all of your storage quota of %s MB.' ), get_space_allowed() ) . '

'; +} + add_filter( 'async_upload_image', 'get_media_item', 10, 2 ); add_filter( 'async_upload_audio', 'get_media_item', 10, 2 ); add_filter( 'async_upload_video', 'get_media_item', 10, 2 );