From d26d83a36dd10aea932dd9193768cbfa1a9537f5 Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Sat, 26 Oct 2013 21:40:13 +0000 Subject: [PATCH] Inline documentation for hooks in wp-admin/async-upload.php. Props rzen for the initial patch. Fixes #25517. git-svn-id: https://develop.svn.wordpress.org/trunk@25942 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/async-upload.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/wp-admin/async-upload.php b/src/wp-admin/async-upload.php index 3a24b52572..a16c8d3aa8 100644 --- a/src/wp-admin/async-upload.php +++ b/src/wp-admin/async-upload.php @@ -94,5 +94,16 @@ if ( $_REQUEST['short'] ) { } else { // 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 'iamge', 'audio', 'video', 'file', etc. + * + * @since 2.5.0 + * + * @param int $id Uploaded attachment ID. + */ + echo apply_filters( "async_upload_{$type}", $id ); }