How to add user based tab to media upload manager with custom set of images?
By following the below link, I am able to create user-based tabs.
How to add new tab to media upload manager with custom set of images?
I need to render wp.media.attachments on the user base.
Wrote an ajax function but not able to render images
function doMyTabContent(groupid) {
html=groupid;
jQuery.ajax({
type: “POST”,
url: ajaxurl,
data: {
id:groupid,
‘action’: ‘group_attachments’
},
success: function (msg) {
var media = window.wp.media,
Attachment = media.model.Attachment,
Attachments = media.model.Attachments;
console.log(media.model.Attachments);
}
});
Help is very much appreciated
Leave an answer