You can do what you want by overriding appropriate Backbone view, which is responsible for rendering attachments display settings form.
plugin.php
add_action( 'load-post.php', 'wpse8170_media_popup_init' );
add_action( 'load-post-new.php', 'wpse8170_media_popup_init' );
function wpse8170_media_popup_init() {
wp_enqueue_script( 'wpse8170-media-manager', plugins_url( '/js/media.js', __FILE__ ), array( 'media-editor' ) );
}
media.js
(function() {
var _AttachmentDisplay = wp.media.view.Settings.AttachmentDisplay;
wp.media.view.Settings.AttachmentDisplay = _AttachmentDisplay.extend({
render: function() {
_AttachmentDisplay.prototype.render.apply(this, arguments);
this.$el.find('select.link-to').val('none');
this.model.set('link', 'none');
this.updateLinkTo();
}
});
})();
Related Posts:
- How to Protect Uploads, if User is not Logged In?
- Add a menu item to WordPress 3.5 Media Manager
- Delete an attachment in the WP media modal window
- Media library to list images only user uploaded
- Rendering the uploaded file in a wp.media object
- How do I force WordPress to show most recent version of images in the media library?
- Proper way to add a button to the top menu of the media library?
- display image size in media library screen
- How to capture the selection:toggle event fired by wp.media
- Changing the media library default tab
- Best plugin to manage media library? [closed]
- Change default tab of media manager
- Restricting access to files within a specific folder [duplicate]
- get total number of images from media using xml-rpc
- Audio Playlist : How to bind events for “track change”, “track end”?
- Images are registered in media library but still won’t show up
- How do I control video media display sizing with native wordpress player
- Upload mobi and epub file in the MEDIA of WP
- Handle lots of images within the media uploader / selector
- Rest API rename media
- Custom media picker in meta box: how to select available image sizes?
- WordPress 3.0 Media Upload Directory
- Can’t edit media details in new role
- 3.5 Media Manager – callout in metaboxes
- How to bulk Edit Dates in Media Library?
- Add instructions For Media Library Uploads
- Audio file’s length (duration) is missing from Attachment Details in Media Library [closed]
- Media Manager: refresh library after new selection
- Cannot upload anything via wordpress
- Video uploaded with the native media uploader gives Error 404
- Overriding of the template for the Attachment “thumbnails” in the Media Grid isn’t working
- Importing Media IDs but not related attachment
- Allow Editor Role to Edit Media
- Bulk image importing from folders
- Creating subfolders in the media library
- how to upload file to media library using link [closed]
- Media Library empty after server move (exact copy of files and db’s)
- Media Manager (since 3.5): How to show an empty Media Library when creating a media frame?
- Media Library not showing images but still acknowledges existence
- Too slow Image upload in WordPress Media Library as image number increases
- Remove delete-attachment button for every media
- How to disable Media Library?
- How to disable (and hide) the Media Library for certain users?
- Attaching images to multiple galleries
- How to re-house images in uploads/YYYY/MM
- Publish / unpublish media items in the media library
- Media Library modal customization
- How to Protect Uploads, if User is not Logged In?
- Creating multiple instances of Media Uploader
- Handle image file and save it to media
- Insert Link to Audio versus Embed Audio Player
- Can we reuse WordPress drag drop media upload in plugins?
- Change default ‘file not supported’ error message
- How to create different media uploader frames / filter library depending on a custom action
- Import of 200+ sermons
- Pictures won’t display in media library and also won’t show preview when selected
- How to batch-add image file extension without losing DB refs?
- Add link to media files in backend and modify linked images in the frontend
- Looking for a way to insert PDF image preview in TinyMCE
- WordPress 3.5: Setting custom “full URL path to files” in the Media Library?
- WordPress 3.5 Media Manager – add a button
- “Add Media” only shows “Full Size” under Attachment Display Settings
- Is it possible to trigger some JavaScript when Media Popup is opened?
- Get all posts (of any post type) an attachment is used in
- Failed to import media from a local wordpress site to a live one
- Rename “Add Media” Button To “Add Images”
- Filter what image sizes get generated
- Use Media Library to manage galleries like Nextgen (with folders, albums, collections, tags, categories, terms…)
- Modify how gallery.js builds the shortcode [gallery ...] in tinyMCE?
- Failed media import
- Image archive without date
- Restrict file types in the uploader of a wp.media frame
- How to import 55k images (uploaded via FTP) into WordPress Media libary? [closed]
- Proper way to change the path of uploads folder for existing WordPress site
- How do I get allowed Media Library upload file extension list?
- Force WordPress, themes & plugins into using defined sizes
- How to replicate Media Library “Add New” on Plugin Settings Page
- Automatically assign video ‘poster’ value to ‘filename’ for archive listing
- It is possible to add custom media size in admin media edit?
- Link to resized media file
- WordPress media file link with fancybox
- Custom dropdown field added to media gallery; how to get it to save properly?
- WordPress media uploader – upload tabs not hiding
- Set Maximum Width for an uploaded image
- Getting a specific value out of array using get_attached_media
- WordPress 3.6 native player is not responsive?
- Get images attached to a specific page
- Uploading a media item with the wp-json API to a specific path
- Open Media Uploader Link in single post or page
- Bulk Image Resize for Media Library, but for ENLARGING instead of Shrinking
- Using WP-CLI “wp media import” to sync files to the media library
- How to manually set an attachment in a post?
- Adding attachment custom field metadata to TinyMCE tag
- TwentySeventeen $content_width not updated in admin
- Unable to delete images in Media Library
- Change image in media library at specific time
- Hook into backbone to add js to wp-admin -> media library?
- After import, oEmbeds non-functional until manual republish
- How to make media URLs Unique
- Save Custom Meta Value on Media Upload