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.
Related Posts:
- Custom “Uploads” Dir: “Edit Image” in Media Library broken
- Restrict file types in the uploader of a wp.media frame
- Only displaying zip files with wp media
- Insert HTML markup to page content from the Media Frame modal
- Trigger refresh for new media manager in 3.5
- Javascript WP Object Documentation?
- What type of template are WP media-modal’s templates?
- Modify Custom Field in Media Library using JavaScript
- Filter medias from the Media Uploader (wp.media) modal with a post meta
- What is “open()” in MediaUpload?
- How to retrieve a value from an input field in a media view template
- Uppload image from another source wp.media
- Search media with javascript
- Media library not working with wp_editor() on the front end
- WordPress Media Library: Custom tab content displayed in “Media Library” tab
- Manually mark imported photo as selected in media library
- Modal working only on home page
- Is there a media_upload_tabs-similar filter to add tabs to the simple/featured image picker?
- Update media library attachments
- How to locate the js code and php code for certain function?
- How to validate image with specific height and width selection in media selector
- Custom Media Meta fields to alter the generated image HTML that is inserted into a post for my animated GIF image player?
- Is there any halfway decent documentation on the wp.media JS class?
- add_attachment hook not firing on certain devices
- What’s the difference between “{}” and “[]” while declaring a JavaScript array?
- How do you check that a number is NaN in JavaScript?
- JQuery – $ is not defined
- Client on Node.js: Uncaught ReferenceError: require is not defined
- How can a Discord bot create a hyperlink in a Discord message in an embed or in general?
- Getting a UnhandledPromiseRejectionWarning when testing using mocha/chai
- Error: Can’t set headers after they are sent to the client
- Express error – TypeError: Router.use() requires middleware function but got a Object
- How can I check for “undefined” in JavaScript? [duplicate]
- How to filter an array/object by checking multiple values
- Does JavaScript pass by reference? [duplicate]
- How to resolve the C:\fakepath?
- React this.setState is not a function
- AngularJS- Login and Authentication in each route and controller
- Check if a variable is a string in JavaScript
- How to pass props to {this.props.children}
- Adding options to select with javascript
- MRAID file reference
- How to format numbers?
- Does parseDouble exist in JavaScript?
- What does !1 and !0 mean in Javascript?
- How to use searchFile and searchFolder at the same time correctly? – App Script
- node.js TypeError: path must be absolute or specify root to res.sendFile [failed to parse JSON]
- Delete first character of a string in Javascript
- How do I get the current time only in JavaScript
- Equivalent of jQuery .hide() to set visibility: hidden
- How can I get the last character in a string?
- Create table using Javascript
- Parse an HTML string with JS
- JS file gets a net::ERR_ABORTED 404 (Not Found)
- Shortest way to print current year in a website
- push object into array
- module.exports “Module is not defined”
- Why doesn’t JavaScript support multithreading?
- plain count up timer in javascript
- Uncaught TypeError: Cannot read property ‘name’ of undefined
- How to calculate date difference in JavaScript?
- React’s setState method with prevState argument
- Is it possible to simulate key press events programmatically?
- Vue template or render function not defined yet I am using neither?
- Cannot read property ‘length’ of null (javascript)
- Caesar Cipher in Javascript
- Can’t perform a React state update on an unmounted component
- How to simulate a click with JavaScript?
- Return array from function
- Why define an anonymous function and pass it jQuery as the argument?
- Error parsing XHTML: The content of elements must consist of well-formed character data or markup
- How to scroll an HTML page to a given anchor
- Javascript call() & apply() vs bind()?
- “google is not defined” when using Google Maps V3 in Firefox remotely
- how to call a onclick function in tag?
- what is the best way to check variable type in javascript
- JavaScript Array Push key value
- stopPropagation vs. stopImmediatePropagation
- typescript – cloning object
- Register and enqueue conditional (browser-specific) javascript files?
- How to replace regular jquery calls with CDN calls from Google?
- Refresh wp.media after ajax call
- Editing Source Code in WordPress
- How to extend Media Library (WP 4.4)
- How/Where is editor.min.js Added to the wp-admin Post Page?
- Why is this gutenberg custom format button only available from the toolbar as a dropdown?
- Script won’t execute in the media manager
- Close TinyMCE plugin window on click away
- Script Localization doesn’t work
- How to conditionally show/hide controls & sections in WordPress customizer?
- Uncaught TypeError [closed]
- Path to image in js with wp_localize_script [closed]
- Proper way to enqueue a generated script that isn’t in a .js file?
- How to load JavaScript modules with script_loader_tag hook?
- How to securely set dynamic HTML content with JavaScript?
- Processing javascript on wordpress
- How to use Javascript to get data from a WordPress form
- Metabox conditionals depending on post format and template in Gutenberg
- Javascript functions not running
- How to get selected category objects in the block editor?