Hi,
suppose i have #yourButtonID for open the wp media uploader. now i have an attribute (data-id="10") on the trigger button(#yourButtonID).
now, how can I get the attribute into the "select"
// Fires when a user has selected attachment(s) and clicked the select button.
customMediaLibrary.on( 'select', function() {
var selectionCollection = customMediaLibrary.state().get('selection');
} );
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi,
suppose i have #yourButtonID for open the wp media uploader. now i have an attribute (data-id="10") on the trigger button(#yourButtonID).
now, how can I get the attribute into the "select"
// Fires when a user has selected attachment(s) and clicked the select button.
customMediaLibrary.on( 'select', function() {
} );