How to open the add media dialogue it in a certain state / tab?

Suppose you want to open the modal to the create gallery section: var options = { frame: ‘post’, state: ‘gallery’, title: wp.media.view.l10n.createGalleryTitle, multiple: true }; var frame = wp.media.editor.open(null,options) If you want something else, I suggest you search through the core js source to change the Library ID as appropriate for the section you need.

How to add if lt IE9 conditional scripts to functions.php

Yes, that looks broadly correct (barring a missing ‘). That isn’t a jQuery $, so shouldn’t cause any problems – the dollar prefix here is the usual convention for PHP variable names and won’t make it into the included script. Or if I’ve misunderstood and you meant your ie.js script assumes jQuery is $ then … Read more