/wp-media-selector-wrapper

A convenient Promise-based wrapper for wp.media selector API

Primary LanguageJavaScript

This plugin wraps WordPress media selector into a simple Promise-based API.

Usage

const select = require('wp-image-selector-wrapper')
select({
  id: [100, 101]
  multiple: true,
  title: 'Select image',
  buttonText: 'Select'
})
.then((images)=> {console.info(images)})