Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I need to change the values and hide some of the default media manager Attachment Display settings. Like setting the "Link to" to none, and hiding it so that the registered user can't change it. It would also be nice if I could delete the "size" option "original size from the dropdown.

I googled a bit and it seems to be very tricky to make changes to the new media manager, therefore I found no solution so far.. I hope you can help me with some insights.

Thank you!

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

I got the solution. I used the following script: Wordpress Media Manager 3.5 - default link to

and altered it to my needs with this modification:

(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();
        this.$el.find('select.link-to').parent('label').hide();

        this.$el.find('select.size option[value=full]').hide();
        this.model.set('size', 'medium');
        this.updateLinkTo();

    }
});
})();
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.