mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Docs: Add examples of possible names for various hooks whose name contains a dynamic portion.
This provides greater discoverability of such hooks in search results on the Code Reference site as well as increased clarity when reading the source. See #50734, #52628 git-svn-id: https://develop.svn.wordpress.org/trunk@50505 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -87,13 +87,19 @@ if ( 'type' === $tab || 'type_url' === $tab || ! array_key_exists( $tab, media_u
|
||||
* media popup based on the current tab.
|
||||
*
|
||||
* The dynamic portion of the hook name, `$type`, refers to the specific
|
||||
* media upload type. Possible values include 'image', 'audio', 'video',
|
||||
* 'file', etc.
|
||||
* media upload type.
|
||||
*
|
||||
* The hook only fires if the current `$tab` is 'type' (From Computer),
|
||||
* 'type_url' (From URL), or, if the tab does not exist (i.e., has not
|
||||
* been registered via the {@see 'media_upload_tabs'} filter.
|
||||
*
|
||||
* Possible hook names include:
|
||||
*
|
||||
* - `media_upload_audio`
|
||||
* - `media_upload_file`
|
||||
* - `media_upload_image`
|
||||
* - `media_upload_video`
|
||||
*
|
||||
* @since 2.5.0
|
||||
*/
|
||||
do_action( "media_upload_{$type}" );
|
||||
|
||||
Reference in New Issue
Block a user