How do I remove the Insert from URL
link in the new Wordpress 3.5 Add Media popup page? In earlier versions of Wordpress, this worked fine:
// removes URL tab in image upload for post
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');
Who knows?