How to add user based tab to media upload manager with custom set of images?

Question

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

0
, , Krishna Veni 3 years 2020-03-24T08:52:07-05:00 0 Answers 126 views 0

Leave an answer

Browse
Browse