From 95bf041b3a02e73423affe6ee2f1e1f762533143 Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Sat, 26 Oct 2013 21:41:09 +0000 Subject: [PATCH] Inline documentation for hooks in wp-admin/async-upload.php. Props rzen for the initial patch. Fixes #25517. Built from https://develop.svn.wordpress.org/trunk@25942 git-svn-id: http://core.svn.wordpress.org/trunk@25901 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/async-upload.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/wp-admin/async-upload.php b/wp-admin/async-upload.php index 3a24b52572..a16c8d3aa8 100644 --- a/wp-admin/async-upload.php +++ b/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 ); }