media_upload_default_tab

media_upload_default_tab

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: wordpress-6.6

apply_filters('media_upload_default_tab') is found 2 times:

  • /wp-admin/includes/media.php line 90
    		} elseif ( isset( $_GET['tab'] ) && array_key_exists( $_GET['tab'], $tabs ) ) {
    			$current = $_GET['tab'];
    		} else {
    			/** This filter is documented in wp-admin/media-upload.php */
    			$current = apply_filters( 'media_upload_default_tab', $default );
    		}
    
    		foreach ( $tabs as $callback => $text ) {
    			$class = '';
    
    			if ( $current == $callback ) {
    
  • /wp-admin/media-upload.php line 78
    	 * @since 2.5.0
    	 *
    	 * @param string $tab The default media popup tab. Default 'type' (From Computer).
    	 */
    	$tab = apply_filters( 'media_upload_default_tab', 'type' );
    }
    
    $body_id = 'media-upload';
    
    // Let the action code decide how to handle the request.
    if ( 'type' === $tab || 'type_url' === $tab || ! array_key_exists( $tab, media_upload_tabs() ) ) {