Filter hook 'media_upload_default_tab'

in WP Core File wp-admin/includes/media.php at line 90

View Source

media_upload_default_tab

Filter Hook
Description
Outputs the legacy media upload tabs UI.

Hook Information

File Location wp-admin/includes/media.php View on GitHub
Hook Type Filter
Line Number 90

Hook Parameters

This hook doesn't accept any parameters.

Usage Examples

Basic Usage
<?php
// Hook into media_upload_default_tab
add_filter('media_upload_default_tab', 'my_custom_filter');

function my_custom_filter() {
    // Your custom filtering logic here
    return 'modified_value';
}

Source Code Context

wp-admin/includes/media.php:90 - How this hook is used in WordPress core
<?php
  85  			$current = $redir_tab;
  86  		} elseif ( isset( $_GET['tab'] ) && array_key_exists( $_GET['tab'], $tabs ) ) {
  87  			$current = $_GET['tab'];
  88  		} else {
  89  			/** This filter is documented in wp-admin/media-upload.php */
  90  			$current = apply_filters( 'media_upload_default_tab', $default );
  91  		}
  92  
  93  		foreach ( $tabs as $callback => $text ) {
  94  			$class = '';
  95  

PHP Documentation

<?php
/**
 * Outputs the legacy media upload tabs UI.
 *
 * @since 2.5.0
 *
 * @global string $redir_tab
 */
Quick Info
  • Hook Type: Filter
  • Parameters: 0
  • File: wp-admin/includes/media.php
Related Hooks

Related hooks will be displayed here in future updates.