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
- Submit post and upload image from front-end
- How to disable generation of default image sizes for some custom post types?
- Meta Boxes: ‘admin_init’ or ‘add_meta_boxes’ hook?
- Can you make a custom metabox field be required to save a new post?
- Display content from custom meta boxes in revisions
- Changing the priority of a custom taxonomy’s metabox
- Removing Image Sizes for Custom Post Type
- How to Removing fields from the Media Uploader/Gallery on a Custom Post Type Edit Page
- 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?
- How to add a select menu to this metabox code?
- 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?
- Metabox saving values
- Having trouble with custom post type / meta box
- update custom post type meta from a shortcode
- Calculate Repeater Meta Box Input Field Values and Display Total
- Change Post Title Edit Box
- Limit upload by file type only for certain custom post type
- Multiple information using custom post type
- How to keep a check box in custom meta box for custom post type checked by default for add new post?
- Show metabox in custom-post-template depending on taxonomy term?
- get_terms won’t display product_cat or any other custom taxonomies when specified
- Display custom post on home page based on a metabox selection
- How to add a “custom” date field to a custom post type?
- adding checkbox to meta
- Meta Box Only in CPT Edit Page, Not in Add New
- Why do I lose the content of meta boxes when I leave the page?
- List custom post types in metabox
- Populate Custom Fields in a Custom Post Type?
- Cannot save Checkbox meta box value from a Custom Post Type
- Custom meta box data array: foreach not working correctly?
- Troubles with saving metabox
- How to check if user meta field is empty in conditional else statement
- Add a button or image button that calls wp functions in the wp-admin
- Post Quote with image on header for news site
- How to store multiple values in 1 meta_key with radio input?
- How to get the upcoming post ID from front end?
- Why are taxonomy terms not saving when using custom meta boxes with radio button taxonomy selectors?
- Plugin – Combine Meta Box Input Fields into single saveble record
- Metabox not show in categories custom post type cmb2
- Disable closing on metaboxes
- Cannot save CPT meta box
- How to make custom taxonomy into drop down select in a custom metabox
- Create a Dropdown from Custom Post Type
- meta box on custom post type
- How to Echo Metadata Value in Currency Format
- Retrieving meta-box from a custom-post-type
- How to insert data into meta box from another plugin?
- File sharing platform for user contributions? [closed]
- Display metaboxes if checkbox ir marked
- Create a select metabox that the user can pupolate?
- Display custom meta on page that has been check in custom post type
- Meta box data is saved but NOT displayed in the meta box text field. Why?
- Sanitaizing Select Optin For Custom Post Type Metabox in WP
- Saving metabox keys and storing values as array
- How to recover the post ID earlier in the WP admin hook action “firing” sequence?
- Publish box in CPT remove ‘edit’ link
- Adding accordion-section to custom post type edit screen
- I’m having trouble with Related Product “tax_query” ‘terms’ value
- Multiple Loops In Tabs Only Displaying First Loop
- WP_List_Table Inside Metabox Not Working on Clicking Search Button
- wp_editor in custom post type is not saving formatted text like bold, italic etc
- Admin metabox with custom post type dropdown option not update choosed input after saving
- Add other all taxonomies as meta boxes to custom post type
- Dropdown of existing posts in a metabox
- Metaboxes in Loop
- How save custom meta type posts multicheck grouped by taxonomy (with CMB2) [closed]
- php output of generated custom metabox
- Custom meta box data not saving
- Collect custom post in a calendar
- Meta Box not being added in plugin
- Problem with ‘save_post’ hook not running
- Custom meta-box for all custom post types
- Meta-Box to add multiple items one at a time and on publish save all
- WPAlchemy Metabox rewriting slug
- Displaying wp post categories into my custom metabox
- adding a shortcode into a custom post type
- Filter CPT based on meta box value using Flexible Posts widget?
- Add Metabox to all custom post types
- Loading one meta box only on post-new.php with a forward link
- Creating entries with image attachements within posts and managing them in a list
- Adding a custom “Add Custom Field” button to Custom Meta boxes
- add a “list” into add meta box : problem
- Show search for data extracted from metabox
- Issues on saving data from CPT select metabox
- Remove custom meta boxes from custom post type
- Multiple posts selection [closed]