media_upload_{$tab}
Action HookDescription
Fires inside limited and specific upload-tab views in the legacy (pre-3.5.0) media popup. The dynamic portion of the hook name, `$tab`, refers to the specific media upload tab. Possible values include 'library' (Media Library), or any custom tab registered via the {@see 'media_upload_tabs'} filter.Hook Information
File Location |
wp-admin/media-upload.php
View on GitHub
|
Hook Type | Action |
Line Number | 117 |
Hook Parameters
This hook doesn't accept any parameters.
Usage Examples
Basic Usage
<?php
// Hook into media_upload_{$tab}
add_action('media_upload_{$tab}', 'my_custom_function');
function my_custom_function() {
// Your custom code here
}
Source Code Context
wp-admin/media-upload.php:117
- How this hook is used in WordPress core
<?php
112 * media upload tab. Possible values include 'library' (Media Library),
113 * or any custom tab registered via the {@see 'media_upload_tabs'} filter.
114 *
115 * @since 2.5.0
116 */
117 do_action( "media_upload_{$tab}" );
118 }
PHP Documentation
<?php
/**
* Fires inside limited and specific upload-tab views in the legacy
* (pre-3.5.0) media popup.
*
* The dynamic portion of the hook name, `$tab`, refers to the specific
* media upload tab. Possible values include 'library' (Media Library),
* or any custom tab registered via the {@see 'media_upload_tabs'} filter.
*
* @since 2.5.0
*/
Quick Info
- Hook Type: Action
- Parameters: 0
- File: wp-admin/media-upload.php
Related Hooks
Related hooks will be displayed here in future updates.