You can use the media_upload_tabs filter
check for your post type and unset any tab you don’t want ex:
function remove_media_library_tab($tabs) {
if (isset($_REQUEST['post_id'])) {
$post_type = get_post_type($_REQUEST['post_id']);
if ('premium' == $post_type)
unset($tabs['library']);
unset($tabs['type_url']);
}
return $tabs;
}
add_filter('media_upload_tabs', 'remove_media_library_tab');
Related Posts:
- Add metabox with media uploader in a custom post type [duplicate]
- wp is not defined error using wp.media to create a custom image uploader
- window.send_to_editor and jQuery .attr() conflicts with multiple custom upload image meta boxes
- Duplicate Custom Header Functionality into the post edit screen
- WordPress 3.5 Media Uploader – Only allow 1 upload and certain file types
- How to Create an Image Upload Box for Custom Posts?
- Checking if $_FILE isset for an array of file upload metaboxes
- Create a custom post type for a photo post
- Invalid file type when using wp_upload_bits to upload PDF to a custom post type
- Metaboxes inside Tab
- Remove Custom Taxonomy Metabox from Custom Post Type Screen
- Do I need a nonce field for every meta box I add to my custom post type admin?
- How to change default position of WP meta boxes?
- Help Creating a Slideshow Custom Post Type with Custom Meta Boxes?
- Custom Taxonomy as checkbox or dropdown
- Submit post and upload image from front-end
- How to disable generation of default image sizes for some custom post types?
- How can I bulk upload images and automatically create posts for each one at the same time?
- Meta Boxes: ‘admin_init’ or ‘add_meta_boxes’ hook?
- Use a separate upload folder for custom post attachment upload
- Handling front-end file uploads, considering safety and ease of use
- Multiple Custom Metabox Help
- How to force one column layout on custom post type edit page?
- Hide “Add media”, HTML editor from TinyMCE
- Can you make a custom metabox field be required to save a new post?
- Why won’t my metabox data save?
- Custom Post Type – Taxonomy Dropdown Menu?
- Action hook on Edit custom post type?
- wp_dropdown_categories in custom post type with custom taxonomy
- Display content from custom meta boxes in revisions
- How can I add a column/s to wp_posts table?
- How to add meta box to backend menu page
- Creating a metabox to upload multiple images, Ignoring The Featured Image
- How to add multiple images to a custom post type single post?
- echo value from ‘select’ field type into page template using cmb2?
- How to add multiple images to custom post type?
- Set custom upload path for custom post type only?
- Listing Pages With Checkboxes In a Metabox (and saving them)
- Changing the priority of a custom taxonomy’s metabox
- How do I remove all the metaboxes for a custom post type?
- WP_List_Table Inside Metabox Not Working on Submit
- How To Set Custom Post Type Title Without Supports
- Custom post type metabox array
- How to hide CPT files from media library programmatically
- Creating a Custom Post Types dropdown in a Meta Box
- Find callback function for custom taxonomy metabox
- Remove custom metaboxes from custom post type
- wp_generate_attachment_metadata gives me an empty array
- How to get custom metabox image field?
- Get all posts from custom post type and insert in select input as metabox
- Detect meta value changes when post is updated (post_updated)
- Best way to arrange custom post types by Attributes -> Order metabox value?
- Add pre-existing meta box to new custom post type
- Dynamic page.php template for custom post types
- Create Post tabs in single-{content-type}.php with Custom Field values
- Add special meta box to custom post type
- Add comments meta fields to comments metabox on post edit screen
- Removing Edit Permalink/View “Custom Post Type” areas
- Unable to save custom taxonomy terms in a custom-built metabox
- Custom field values get deleted
- Custom field being erased after autosave
- Removing Image Sizes for Custom Post Type
- How to Removing fields from the Media Uploader/Gallery on a Custom Post Type Edit Page
- Order custom posts by a date metabox
- How to select one major category (or custom taxonomy) for a custom post type?
- How to sort CPT by custom meta value (date), and return posts month by month
- Priority of Meta Box for Custom Post Type
- How can i add a metabox to pull list of custom posts (any two) on edit or add post screen?
- WordPress metabox file upload in custom post [duplicate]
- How to add a select menu to this metabox code?
- Image size filtering in Media uploader according to custom post type
- Use Custom Post Type as Custom Field
- Saving multiple Metabox contents
- Cleanest way to code “Custom Write Panels/Meta Boxes”?
- Rename the insert button in media upload window
- Undefined index: at_nonce in custom post metabox
- Display metabox conditionally
- Using ‘strtotime’ function to convert a custom-meta-box to a date-stamp
- How to Change the Title of a Meta Box on a Specified Custom Post Type? [duplicate]
- How to save the checked boxes?
- Adding Custom Metaboxes to Custom Pages
- Custom post type’s slug gets wrong when adding a custom meta box
- Metabox saving values
- Having trouble with custom post type / meta box
- Possible to add meta box to edit.php pages?
- add_meta_box: Datepicker like the one for postdate?
- How can I include meta box content when searching?
- Save or update data when custom post published
- update a post meta from a single table cell TablePress
- update custom post type meta from a shortcode
- Embed ‘New Post’ Form Inside ‘New Post’ Form
- Custom Meta Boxes – Nonce Issue – Move to trash issue
- Calculate Repeater Meta Box Input Field Values and Display Total
- Custom metabox translation
- How to stop wordpress from mangling HTML in a metabox textarea
- How to create a repeatable / reusable divs in the metabox?
- How to add meta boxes(repeater fields) from WordPress back end?
- Displaying Meta Box Image
- Change Post Title Edit Box
- Change upload_dir folder at a certain cpt but cant change back