Manually mark imported photo as selected in media library
var selection = wp.media.frame.state().get(‘selection’); var attachment = wp.media.attachment(image.ID); selection.add(attachment);
var selection = wp.media.frame.state().get(‘selection’); var attachment = wp.media.attachment(image.ID); selection.add(attachment);
WordPress Media Library: Custom tab content displayed in “Media Library” tab
Setting/unsetting terms using the Backbone JavaScript client
Got a TypeError after update and need to adapt found solution
Answering my own question. Since register_meta() actually appends to meta, not blocks, in the JSON output, I just added a new (redundant) attribute to my block using source:meta where I can manually manage outside the attributes I use to display the block. attributes: { api_coordinates: { type: ‘string’, source: ‘meta’, meta: ‘api_coordinates’, }, //… }
Use onfocus event in Contact Form 7
Open MediaUpload from external component in Gutenberg
Multiple media uploader buttons target only one input on the same page
const { __ } not working in IE11
Uncaught TypeError [closed]