diff -r 346c88efed21 -r 5e2f62d02dcd wp/wp-admin/async-upload.php --- a/wp/wp-admin/async-upload.php Mon Jun 08 16:11:51 2015 +0000 +++ b/wp/wp-admin/async-upload.php Tue Jun 09 03:35:32 2015 +0200 @@ -1,12 +1,18 @@ + echo '
' . __('Dismiss') . ' ' . sprintf(__('“%s” has failed to upload due to an error'), esc_html($_FILES['async-upload']['name']) ) . '
' . esc_html($id->get_error_message()) . '
'; @@ -89,10 +95,21 @@ } if ( $_REQUEST['short'] ) { - // short form response - attachment ID only + // Short form response - attachment ID only. echo $id; } else { - // long form response - big chunk o html + // Long form response - big chunk o html. $type = $_REQUEST['type']; - echo apply_filters("async_upload_{$type}", $id); + + /** + * Filter the returned ID of an uploaded attachment. + * + * The dynamic portion of the hook name, `$type`, refers to the attachment type, + * such as 'image', 'audio', 'video', 'file', etc. + * + * @since 2.5.0 + * + * @param int $id Uploaded attachment ID. + */ + echo apply_filters( "async_upload_{$type}", $id ); }