media_upload_tabs

media_upload_tabs

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.5.2

apply_filters('media_upload_tabs') is found 2 times:

  • /wp-admin/includes/media.php line 31
    	 * @since 2.5.0
    	 *
    	 * @param string[] $_default_tabs An array of media tabs.
    	 */
    	return apply_filters( 'media_upload_tabs', $_default_tabs );
    }
    
    /**
     * Adds the gallery tab back to the tabs array if post has image attachments.
     *
     * @since 2.5.0
    
  • /wp-includes/media.php line 4597
    		'library'  => '',
    	);
    
    	/** This filter is documented in wp-admin/includes/media.php */
    	$tabs = apply_filters( 'media_upload_tabs', $tabs );
    	unset( $tabs['type'], $tabs['type_url'], $tabs['gallery'], $tabs['library'] );
    
    	$props = array(
    		'link'  => get_option( 'image_default_link_type' ), // DB default is 'file'.
    		'align' => get_option( 'image_default_align' ),     // Empty default.
    		'size'  => get_option( 'image_default_size' ),      // Empty default.
    

See this hook used in plugins: