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
Is there a standard way to listen for an on change event of a posts featured image
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’, }, //… }
Gutenberg: import dependency or assign from global variable?
Use onfocus event in Contact Form 7
wp.template() returns tags in Ajax response
You can’t “redirect” to the external site in .htaccess – there is no way for your script to do the “MITM” bit to check their credentials. Instead, you would need to internally rewrite the request to your PHP script (in .htaccess). Your PHP script then checks that the user is logged in, etc. as you … Read more